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 On 29/01/2017 at 23:02, 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! Expand 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) On 29/01/2017 at 23:04, Rachhet said: addCommandHandler ("s", function(playerSource) outputChatBox(getPlayerName(playerSource),playerSource ":Siema!") end ) i think im closer to solving this. Expand 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 On 29/01/2017 at 23:06, NeverUnbeatable said: As I said, see how this function works https://wiki.multitheftauto.com/wiki/OutputChatBox Expand Ok, thanks Link to comment
Hoffmann Posted January 29, 2017 Share Posted January 29, 2017 On 29/01/2017 at 23:07, Rachhet said: Ok, thanks Expand 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