Wisin Posted May 13, 2010 Posted May 13, 2010 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)
dzek (varez) Posted May 13, 2010 Posted May 13, 2010 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
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