ALE34 Posted March 26, 2013 Posted March 26, 2013 (edited) 14: Bad argument @ 'setPlayerNametagColor' "namecolormanual" works but im having problem with executeCommandHandler function nametagColorChangeManual ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "namecolormanual", nametagColorChangeManual ) function namecolorred ( thePlayer, commandName, ... ) local red = #arg local arg = { 255,0,0 } executeCommandHandler ( "namecolormanual", thePlayer, red ) end addCommandHandler ( "namecolor-red", namecolorred ) Sorry for bad english Edited March 26, 2013 by Guest
codeluaeveryday Posted March 26, 2013 Posted March 26, 2013 The way you did it was very untidy. I have fixed the problem, all the functions were jumbled and out of order, also you didnt have 'g' and 'b' defined in the 'nametagColorChangeManual' function. New Code: function nametagColorChangeManual ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "namecolormanual", nametagColorChangeManual ) function namecolorred ( thePlayer ) local arg = { 255,0,0 } executeCommandHandler ( "namecolormanual", thePlayer, arg[1], arg[2], arg[3]) end addCommandHandler ( "namecolor-red", namecolorred )
EstrategiaGTA Posted March 26, 2013 Posted March 26, 2013 Thanks! im new in scripting This can help you.
ALE34 Posted March 26, 2013 Author Posted March 26, 2013 The way you did it was very untidy. I have fixed the problem, all the functions were jumbled and out of order, also you didnt have 'g' and 'b' defined in the 'nametagColorChangeManual' function.New Code: function nametagColorChangeManual ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "namecolormanual", nametagColorChangeManual ) function namecolorred ( thePlayer ) local arg = { 255,0,0 } executeCommandHandler ( "namecolormanual", thePlayer, arg[1], arg[2], arg[3]) end addCommandHandler ( "namecolor-red", namecolorred ) When testing still same problem
Castillo Posted March 26, 2013 Posted March 26, 2013 function nametagColorChangeManual ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "namecolormanual", nametagColorChangeManual ) function namecolorred ( thePlayer ) executeCommandHandler ( "namecolormanual", thePlayer, 255, 0, 0 ) end addCommandHandler ( "namecolor-red", namecolorred )
ALE34 Posted March 27, 2013 Author Posted March 27, 2013 function nametagColorChangeManual ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "namecolormanual", nametagColorChangeManual ) function namecolorred ( thePlayer ) executeCommandHandler ( "namecolormanual", thePlayer, 255, 0, 0 ) end addCommandHandler ( "namecolor-red", namecolorred ) doesnt work...
codeluaeveryday Posted March 27, 2013 Posted March 27, 2013 This is impossible, your code should be working, are you using the client-sided or server sided?
ALE34 Posted March 27, 2013 Author Posted March 27, 2013 server, but my friend solved the problem:DDD i tried this one before but "function namered ( thePlayer, r, g, b )" function namered ( thePlayer ) setPlayerNametagColor ( thePlayer, 255, 0, 0 ) end addCommandHandler ("red", namered ) -- Fixed by sande.
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