aliensky Posted January 11, 2015 Posted January 11, 2015 (edited) 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 January 11, 2015 by Guest
n3wage Posted January 11, 2015 Posted January 11, 2015 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)
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