glowdemon1 Posted August 22, 2013 Share Posted August 22, 2013 Hi, I'm trying to make it so when I join the server and I have no team, it automatically puts me into the "Unemployed" team, however this does not work, here's my code. addEventHandler("onPlayerJoin", getRootElement(), function(thePlayer) if getPlayerTeam == false and getPlayerTeam ~= "pizzaBoy" --pizzaBoy is used to detect wether he has a job or not (there's only 1 job yet) then setPlayerTeam(thePlayer, "Unemployed") end end) Link to comment
manve1 Posted August 22, 2013 Share Posted August 22, 2013 (edited) addEventHandler("onPlayerJoin", getRootElement(), function() if not getPlayerTeam(source) then setPlayerTeam(source,getTeamFromName("Unemployed")) end end) Edited August 22, 2013 by Guest Link to comment
iPrestege Posted August 22, 2013 Share Posted August 22, 2013 Unemployed , As string? This is wrong . Link to comment
glowdemon1 Posted August 22, 2013 Author Share Posted August 22, 2013 Thanks manve1. And I'm still learning Prestege. Link to comment
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