PyTrO Posted December 3, 2016 Share Posted December 3, 2016 i just want to move player to another team with chaging his tag color of the team that he want to move to it what worng with that ;3 function lol(player) local r, g, b if exports.SAWGacl:isPlayerInGroup(player,"Admin") then setPedSkin(player, 217) setPlayerTeam(player,getTeamFromName("Admins")) setElementData(player,"class", "Admin") setElementHealth( player, 100 ) setPlayerArmor( player, 100 ) r, g, b = getTeamColor ( Admins ) setPlayerNametagColor ( thePlayer, r , g , b ) else exports.SAWGcommands:sendMessage("*Commands* You :Oing Moron You're not a sexy HQ Member to use this sexy command.",0,255,0,player) end end addCommandHandler("A", lol) Link to comment
Addlibs Posted December 4, 2016 Share Posted December 4, 2016 -- the problem: r, g, b = getTeamColor ( Admins ) -- the correction: r, g, b = getTeamColor ( getTeamFromName("Admins") ) Link to comment
Walid Posted December 4, 2016 Share Posted December 4, 2016 thePlayer is not defined here 1 hour ago, PyTrO said: setPlayerNametagColor ( thePlayer, r , g , b ) function lol(player) if exports.SAWGacl:isPlayerInGroup(player,"Admin") then local team = getTeamFromName("Admins") if team then setPedSkin(player, 217) setPlayerTeam(player,team) setElementData(player,"class", "Admin") setElementHealth( player, 100 ) setPlayerArmor( player, 100 ) local r, g, b = getTeamColor (team) setPlayerNametagColor (player, r , g , b ) else exports.SAWGcommands:sendMessage("*Commands* You :Oing Moron You're not a sexy HQ Member to use this sexy command.",0,255,0,player) end end end addCommandHandler("A", lol) 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