Hassam Posted July 20, 2013 Posted July 20, 2013 Hello fellow guys, I'm posting here due I need help, when I use "/swatadd name", I can't put one guy on team swat. addCommandHandler("swatadd", function(player, command, plr) local name = getPlayerFromName (plr) if (name) then local accname = getAccountName ( getPlayerAccount ( player) ) if ( isObjectInACLGroup ( "user.".. accname, aclGetGroup ( ( "GolawSwat" ) ) ) ) then setPlayerTeam(plr, SWAT) setPlayerNametagColor (plr, 65, 105, 225) setElementModel(plr, 285) setElementData(plr, "Occupation", "SWAT Team", true ) outputChatBox(plr.." is now SWAT Team.",source,0,255,0) else outputChatBox("You aren't allowed use this command.",source,0,255,0) end end end )
Vision Posted July 20, 2013 Posted July 20, 2013 Try this addCommandHandler("swatadd", function(player, command, plr) local name = getPlayerFromName (plr) if (name) then local accname = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ( "user.".. accname, aclGetGroup ( ( "Admin" ) ) ) ) then setPlayerTeam(name, getTeamFromName ( "SWAT" ) ) setPlayerNametagColor (name, 65, 105, 225) setElementModel(name, 285) setElementData(name, "Occupation", "SWAT Team", true ) outputChatBox( getPlayerName ( name ) .." is now SWAT Team.",player,0,255,0) else outputChatBox("You aren't allowed use this command.",player,0,255,0) end end end )
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