22.11.2013, 15:56
Hello guys,
I'm very new to scripting and still trying to learn. I'm currently following a tutorial for it on ******* which I lateron want to edit more into something of myself. Currently (and probably in the future I will too) I am running in to some problems that I don't know by myself how to solve. I appreciate answers I get to help me further, but please keep in mind that I'm trying to learn. So when something is wrong or should be different, please also explain me why that is so rather than just giving me the solution to the problem.
Okay, here's my problem now:
I have the /me and /act command scripted and when I use them ingame it shows the proper message for when /me is done without params. However if I type for example "/me test" is returns the message "unknown command". Can anyone explain to why /me works, but /me with params doesn't? Here's the code:
I'm very new to scripting and still trying to learn. I'm currently following a tutorial for it on ******* which I lateron want to edit more into something of myself. Currently (and probably in the future I will too) I am running in to some problems that I don't know by myself how to solve. I appreciate answers I get to help me further, but please keep in mind that I'm trying to learn. So when something is wrong or should be different, please also explain me why that is so rather than just giving me the solution to the problem.
Okay, here's my problem now:
I have the /me and /act command scripted and when I use them ingame it shows the proper message for when /me is done without params. However if I type for example "/me test" is returns the message "unknown command". Can anyone explain to why /me works, but /me with params doesn't? Here's the code:
Код:
CMD:me(playerid, params[]) { new string[126]; if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /me [action] - For example: /me kneels down and picks up the helmet from the ground."); format(string, sizeof(string), "* %s %s", GetName(playerid), params); NearbyMessage(playerid, -1, string); return 1; }