maskatchi Posted July 19, 2011 Share Posted July 19, 2011 (edited) try this: function nametagColorChange ( thePlayer, commandName, r, g, b ) if hasObjectPermissionTo ( thePlayer, "command.kick", true ) then setPlayerNametagColor ( thePlayer, r, g, b ) end end addCommandHandler ( "nametagcolor", nametagColorChange ) type /nametagcolor number1,number2,number3 Edited July 19, 2011 by Guest Link to comment
maskatchi Posted July 19, 2011 Share Posted July 19, 2011 oh btw remove line: if hasObjectPermissionTo ( thePlayer, "command.kick", true ) then if you want for all players ( that line makes it for admins only ) Link to comment
DarkLink Posted July 19, 2011 Author Share Posted July 19, 2011 oh btw remove line: if hasObjectPermissionTo ( thePlayer, "command.kick", true ) then if you want for all players ( that line makes it for admins only ) What bro? Link to comment
AGENT_STEELMEAT Posted July 19, 2011 Share Posted July 19, 2011 Look at the player's actual nametag in-game - does it change color? If so, this is working properly, there is another script interfering with it. Link to comment
qaisjp Posted July 19, 2011 Share Posted July 19, 2011 What John said, if you are using another chat script, use getPlayerNametagColor(p) in replace of r,g,b Link to comment
DarkLink Posted July 19, 2011 Author Share Posted July 19, 2011 What John said, if you are using another chat script, use getPlayerNametagColor(p) in replace of r,g,b I use the get and then the set? Thanks. Link to comment
Try Posted July 20, 2011 Share Posted July 20, 2011 Hmm... You need set player name color? its this yeah? function ntag ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, true ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "nametagcolor", ntag ) try this Link to comment
Castillo Posted July 20, 2011 Share Posted July 20, 2011 "setPlayerNametagColor ( thePlayer, true )" What is that o_O, your code is the same as his, but with that line which will cause a bad argument, setPlayerNametagColor uses RED, GREEN, BLUE, not a boolean. Link to comment
DarkLink Posted July 21, 2011 Author Share Posted July 21, 2011 Ye castilo is right, the arguments are only rgb and the player but thanks for your help. Link to comment
qaisjp Posted July 22, 2011 Share Posted July 22, 2011 Also use the fucking code tags. 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