Jump to content

[HELP] setPlayerTeam [SOLVED]


aliensky

Recommended Posts

Hello guys, i want to set player team when player joined to server. I want them to join Civilian team. I created civilian team with another script.

What should i do about that script please help. Thank you.

function whenJoin (player)

setPlayerTeam (player,Civilian)

end

addEventHandler ("onPlayerJoin", getRootElement (), whenJoin)

Edited by Guest
Link to comment

if 'Civilian' is the team name, you have to use getTeamFromName, and player of 'onPlayerJoin' is source.

function whenJoin () -- no parameters... 
    setPlayerTeam ( source, getTeamFromName ( "Civilian" )) 
end 
addEventHandler ("onPlayerJoin", getRootElement (), whenJoin) 

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