MiniGoveya Posted September 27, 2010 Share Posted September 27, 2010 Hey Ppl, sorry the inconvenience but I would like you to help me with something! I have created a command script, everything was fine until I started to put the commands that would be directed towards other people, such as /Noob /f-uck /gogo /Wb /Hi etc ... when I put in the script: outputChatBox ("# 808080 <# 00FFFF" .. getPlayerName (playerSource ).."# 808080> Welcome Back, ".. targetPlayerName (playerSource) .."! "getRootElement (), 255, 255, 255, true) the console gives me an error! , The console tells me this: ERROR: com / com.lua: 122: Attempt to call global 'targetPlayerName' (a nil value) So what should I do here? P.S: Sorry if my English is bad and forgive me the inconvenience. ( outputchatbox is line 122 ) Link to comment
dzek (varez) Posted September 27, 2010 Share Posted September 27, 2010 there is no such function as targetPlayerName. did you mean getPlayerName? https://wiki.multitheftauto.com/ Link to comment
MiniGoveya Posted September 27, 2010 Author Share Posted September 27, 2010 Ohh... i go try now. ;D ty Link to comment
MiniGoveya Posted September 27, 2010 Author Share Posted September 27, 2010 I'm stupid script: function wb ( playerSource, command )outputChatBox ("# 808080 <# 00FFFF" .. getPlayerName (playerSource ).."# 808080> Welcome Back, ".. getPlayerName (playerSource) .." ! "getRootElement (), 255, 255, 255, true) end addCommandHandler ( "wb", wb ) NOTE: can u show me, how can do /wb mini and not /wb #FF0000MiniGoveya ?? Link to comment
Castillo Posted September 27, 2010 Share Posted September 27, 2010 (edited) uhm you forgot a comma after "!" function wb ( playerSource, command, who ) outputChatBox ("# 808080 <# 00FFFF" .. getPlayerName (playerSource).."# 808080> Welcome Back, ".. getPlayerName (playerSource) .." ! ",getRootElement (), 255, 255, 255, true) end addCommandHandler ( "wb", wb ) Edited October 1, 2010 by Guest Link to comment
MiniGoveya Posted September 27, 2010 Author Share Posted September 27, 2010 hahahhhahaahhahaha looooool thanks solid .. u always help me Somehow I must thank you! Link to comment
Castillo Posted September 27, 2010 Share Posted September 27, 2010 hahahhhahaahhahaha looooool thanks solid .. u always help me Somehow I must thank you! Not needed to post all this, just a "thank you it works" its enough. i help everyone and they help me thats how it works Link to comment
[DMC] Posted September 27, 2010 Share Posted September 27, 2010 hahahhhahaahhahaha looooool thanks solid .. u always help me Somehow I must thank you! Not needed to post all this, just a "thank you it works" its enough. i help everyone and they help me thats how it works or 100$ Link to comment
Castillo Posted September 27, 2010 Share Posted September 27, 2010 hahahhhahaahhahaha looooool thanks solid .. u always help me Somehow I must thank you! Not needed to post all this, just a "thank you it works" its enough. i help everyone and they help me thats how it works or 100$ wtf?? Link to comment
MiniGoveya Posted September 28, 2010 Author Share Posted September 28, 2010 lol, i have a problem again remember, i'm stupid ;] ok, that's happen: i change targetPlayerName for getPlayerName but....................... when i say : /wb yakko this say: welcome back, minigoveya! 0.o soooooooo .. ? what should do i? Link to comment
dzek (varez) Posted September 28, 2010 Share Posted September 28, 2010 we dont have your code? HOW COULD WE KNOW WHATS WRONG? Link to comment
Wojak Posted September 28, 2010 Share Posted September 28, 2010 we dont have your code? HOW COULD WE KNOW WHATS WRONG? yes we do... viewtopic.php?p=321948#p321948 @MiniGoveya if you want to dyspley "target player name" you should use "who" instead of "getPlayerName (playerSource)" function wb ( playerSource, command, who ) outputChatBox ("# 808080 <# 00FFFF" .. getPlayerName (playerSource).."# 808080> Welcome Back, "..who.." ! ",getRootElement (), 255, 255, 255, true) end addCommandHandler ( "wb", wb ) Link to comment
MiniGoveya Posted September 28, 2010 Author Share Posted September 28, 2010 ;O i go try now, thanks for advance to everyone! 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