Jump to content

Litlle help with setplayernametag


PyTrO

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...