VenomOG Posted December 24, 2018 Share Posted December 24, 2018 local theTeam = "Thugs" local players = getPlayersInTeam ( theTeam ) if (getElementData(players,"Clan" == 5)then outputChatBox("Thugs: There are already 5 of your members ",source) end end This is what im trieing to do , if there are 5 of the same clan members in a team then put that message Link to comment
Investor Posted December 24, 2018 Share Posted December 24, 2018 (edited) local theTeam = "Thugs" local players = getPlayersInTeam(getTeamFromName(theTeam)) -- this part will break with debug error, getPlayersInTeam expecting team got nil, if a team under that name does not exist if (#players >= 5) then -- count (#) the values in the table outputChatBox("Thugs: There are already 5 of your members ",source) end Edited December 24, 2018 by Investor Link to comment
VenomOG Posted December 24, 2018 Author Share Posted December 24, 2018 4 minutes ago, Investor said: local theTeam = "Thugs" local players = getPlayersInTeam(getTeamFromName(theTeam)) -- added getTeamFromName if (#players >= 5) then -- count (#) the values in the table outputChatBox("Thugs: There are already 5 of your members ",source) end How can i make if there are an ammount of members in a clan there aka if there are 5 terrorists, then outpu that message format : getElementData(source,"Clan" Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now