MasKPro Posted July 13, 2015 Posted July 13, 2015 i think it maybe rubbish as its my first script.. Hope u guys help me with the problem (SetPlayerTeam(Criminal(getPlayerTeam(source)) end end addCommandHandler("criminal", getRootElement(),setplayerteam)
Price. Posted July 13, 2015 Posted July 13, 2015 you have to start the script with a "function name ()" also command handler doesn't need a "getRootElement()" only the command and the function's name it goes like this function teamTest () local playerTeam = getPlayerTeam ( source ) local team = getTeamFromName ( "Criminal" ) setPlayerTeam ( source, team ) end addCommandHandler("criminal", teamTest )
MasKPro Posted July 13, 2015 Author Posted July 13, 2015 you have to start the script with a "function name ()" also command handler doesn't need a "getRootElement()" only the command and the function's nameit goes like this function teamTest () local playerTeam = getPlayerTeam ( source ) local team = getTeamFromName ( "Criminal" ) setPlayerTeam ( source, team ) end addCommandHandler("criminal", teamTest ) Thanks @Price.
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