Jump to content

i'm getting sick from teams script :(


homar

Recommended Posts

i'm getting sick from teams script :(

look , i want this autoteams not with tag , but it's will be for admins

if you admin you will be removed auto , but aren't work with me :o

correct = createTeam ( Admins, 225, 0, 0 ) 
  
function team (player) 
local theAccount = getPlayerAccount(player) 
    if theAccount then 
    local accountName = getAccountName(theAccount) 
        if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then 
        setPlayerTeam" class="kw6">setPlayerTeam ( theAccount, correct ) 
        end  
    end 
end  
addEventHandler ("onPlayerLogin" team, correct) 

Link to comment

correct = createTeam ( "Admins", 225, 0, 0 )  
  
function joinTeam( prev, currAcc )  
  local accountName = getAccountName( currAcc ) 
  if isObjectInACLGroup ( "user." .. accountName, aclGetGroup( "Admin" ) ) then 
    setPlayerTeam( source, correct ) 
  end 
end  
addEventHandler( "onPlayerLogin", getRootElement(), joinTeam ) 
  

I put the code without highlighting since setPlayerTeam is bugged a bit.

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...