Jump to content

[Help] SetTeam


AlexWo

Recommended Posts

Hello I want to make a team script.

I want that every player who enters the server will be setted to "Unemployed" group.

The script is only Server:

Staff = createTeam("Staff", 255, 255, 255) 
Unemployed = createTeam("Unemployed", 200, 200, 255) 
  
function StaffTeam (thePlayer) 
setPlayerTeam (thePlayer, Staff) 
setElementModel (thePlayer, 217)  
setElementHealth(thePlayer, 100) 
setPedArmor(thePlayer, 100) 
end 
addCommandHandler( "staff", StaffTeam) 
  
function setteam(thePlayer) 
setPlayerTeam (thePlayer, Unemployed) 
end 
addEventHandler ("onPlayerConnect", root, setteam) 

I'm not sure how to manage the addEventHandler

Thank you for helping me ;)

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