Jump to content

color


Wisin

Recommended Posts

Hi, i have a bug in my code and i cant detect where is it, i hope someone can help me :)

client side

function nameTagColor ( )
text = guiGetText(nickE)
triggerServerEvent ("nameTag", getLocalPlayer(), text)
end
addEventHandler("onClientGUIClick",nickSet,nameTagColor,false)

server side

function nameTagColor ( thePlayer,commandName, text )
setPlayerNametagColor ( thePlayer, text )
end
addEvent( "nameTag", true )
addEventHandler ( "nameTag", getRootElement(), nameTagColor)

Link to comment

read about evens again,

and start to debugging scripts before asking for help (open console and type "debugscript 3" -- your errors will be there!)

function nameTagColor ( thePlayer,commandName, text ) -- these parameters are from COMMAND handler, and this function handles EVENT
setPlayerNametagColor ( thePlayer, text ) -- thePlayer isn't exist
end
 
 
-- fix time:
-- remove 2 first parameters from nameTagColor
-- and replace thePlayer with source
 
-- please try to understand it, not only apply this fix

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...