Jump to content

Again me T_T


MiniGoveya

Recommended Posts

Posted

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 )

Posted

there is no such function as targetPlayerName.

did you mean getPlayerName?

https://wiki.multitheftauto.com/

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

errorcq.jpg

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 ?? :D

Posted (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 by Guest

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
hahahhhahaahhahaha looooool xD 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 :)

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
hahahhhahaahhahaha looooool xD 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$

logo_left.png
Posted
hahahhhahaahhahaha looooool xD 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??

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

lol, i have a problem again :DxD

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?

Posted

we dont have your code? HOW COULD WE KNOW WHATS WRONG?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
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 ) 

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