Rachhet Posted January 29, 2017 Share Posted January 29, 2017 function siema (playerSource) outputChatBox(getPlayerName(playerSource),playerSource ":Siema!") end addCommandHandler ( s, function siema ) Error: ERROR: Loading script failed: [gameplay]/szybkieprzywitanie/server.lua:4: '(' expected near 'siema' Link to comment
Hoffmann Posted January 29, 2017 Share Posted January 29, 2017 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! 1 Link to comment
Rachhet Posted January 29, 2017 Author Share Posted January 29, 2017 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
Hoffmann Posted January 29, 2017 Share Posted January 29, 2017 (edited) 1 minute ago, Rachhet said: addCommandHandler ("s", function(playerSource) outputChatBox(getPlayerName(playerSource),playerSource ":Siema!") end ) i think im closer to solving this. As I said, see how this function works https://wiki.multitheftauto.com/wiki/OutputChatBox Edited January 29, 2017 by NeverUnbeatable Link to comment
Rachhet Posted January 29, 2017 Author Share Posted January 29, 2017 Just now, NeverUnbeatable said: As I said, see how this function works https://wiki.multitheftauto.com/wiki/OutputChatBox Ok, thanks Link to comment
Hoffmann Posted January 29, 2017 Share Posted January 29, 2017 Just now, Rachhet said: Ok, thanks You're welcome! 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