Jump to content

Balancing Teams Wiki Does'nt Work Bad Arg.


Recommended Posts

Well The Script From The Wiki Gives Me A Bad Arg. @ setPlayerTeam

addEvent("balance",true) 
function balanceTeams ( thePlayer ) 
    --get the team pointers from their names 
    local rEdTeam = getTeamFromName ( "Red Team" ) 
    local blUeTeam = getTeamFromName ( "Blue Team" ) 
    --count the number of players in each team, and store them 
    local rEdCount = countPlayersInTeam ( rEdTeam ) 
    local blUeCount = countPlayersInTeam ( blUeTeam ) 
    if rEdCount == blUeCount then --if the teams are equal 
        setPlayerTeam ( thePlayer , rEdTeam ) --place the player in grove 
    elseif rEdCount > blUeCount then --if there are more in grove 
        setPlayerTeam ( thePlayer , blUeTeam ) --place him in ballas 
    elseif rEdCount < blUeCount then --if there are more in ballas 
        setPlayerTeam ( thePlayer , rEdTeam ) --place him in grove. 
    end 
end 
addEventHandler("balance",root, balanceTeams) 
setTimer( balanceTeams, 180000, 100000000 ) 
  
addEvent("balance1",true) 
function balanceTeamsChat ( ) 
    outputChatBox("Balancing Teams.", root) 
end 
setTimer( balanceTeamsChat, 180000, 100000000 ) 
addEventHandler("balance1",root, balanceTeamsChat) 

Link to comment
thePlayer is not defined.

show your trigger, it's often will be source not thePlayer.

about the timer it's won't work, you have to special who is thePlayer.

I Dont Understand What Your Mean By Special Who It Is?

You just put thePlayer and you don't know who it's?

lol.

show your client, did you try source? it's often will be source.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...