Jump to content

Simple script error. Help?


Rachhet

Recommended Posts

function siema(playerSource)
  outputChatBox(getPlayerName(playerSource)..":Siema!", playerSource)
end
addCommandHandler("s", siema)

Try to understand what have changed. Firstly, if you want to show this message to playerSource use it as second argument(see https://wiki.multitheftauto.com/wiki/OutputChatBox).

Secondly, you should put your command in "" as it is a string.

As for third, you don't need to write function, just enter a name.

Good luck!

  • Like 1
Link to comment
1 minute ago, NeverUnbeatable said:

function siema(playerSource)
  outputChatBox(getPlayerName(playerSource)..":Siema!", playerSource)
end
addCommandHandler("s", siema)

Try to understand what have changed. Firstly, if you want to show this message to playerSource use it as second argument(see https://wiki.multitheftauto.com/wiki/OutputChatBox).

Secondly, you should put your command in "" as it is a string.

As for third, you don't need to write function, just enter a name.

Good luck!

addCommandHandler ("s",
function(playerSource) 
outputChatBox(getPlayerName(playerSource),playerSource ":Siema!")
end
) i think im closer to solving this.

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