boro Posted August 2, 2013 Posted August 2, 2013 Hi i make player check script when round start but it for only when i am in team 1 and if i am in team 2 then it don't work why? please help.ty.. function OnCheckRound () local team1 = getTeamFromName ( "Team-1" ) local team2 = getTeamFromName ( "Team-2" ) local team1Count = countPlayersInTeam ( team1 ) local team2Count = countPlayersInTeam ( team1 ) if team1Count == 0 and team2Count == 0 then outputChatBox ( "Not active players for start round", getRootElement(), 255, 255, 255, true ) siteRound() end end I'll help When I Can.
Castillo Posted August 2, 2013 Posted August 2, 2013 I don't get what do you mean. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
boro Posted August 2, 2013 Author Posted August 2, 2013 i mean. this is for join function, when player join on server and is team 1 and team 2 empety then start siteRound() event -(restart round)- I'll help When I Can.
Castillo Posted August 2, 2013 Posted August 2, 2013 And what is the problem...? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted August 2, 2013 Posted August 2, 2013 How are you executing that function? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
boro Posted August 2, 2013 Author Posted August 2, 2013 function processPlayerRespawn ( player ) player = player or source if not isElement(player) then return end -- set player spectate team setPlayerTeam(player, team3 ) OnCheckRound () end end addEventHandler ( "onPlayerJoin", getRootElement(), processPlayerRespawn ) I'll help When I Can.
Castillo Posted August 2, 2013 Posted August 2, 2013 Debug the script, see what "team1Count" and "team2Count" returns. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
boro Posted August 2, 2013 Author Posted August 2, 2013 yes i check it but debug is without erros or warnings i don't know why this dont work I'll help When I Can.
Castillo Posted August 2, 2013 Posted August 2, 2013 I didn't say look for errors, I said see what these two variables return, their values. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
bandi94 Posted August 2, 2013 Posted August 2, 2013 Bk you c+p the line local team1Count = countPlayersInTeam ( team1 ) --team1 local team2Count = countPlayersInTeam ( team1 ) -- and team1 again it think it should be local team1Count = countPlayersInTeam ( team1 ) local team2Count = countPlayersInTeam ( team2 ) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
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