27.11.2011, 03:53
(
Последний раз редактировалось Meta; 27.11.2011 в 14:39.
)
~~~ cMd v0.1a ~~~
Hello guys!Today, I release some very small command processor, like almost everyone else did
It's very fast and REALLY SMALL (some test returned a time of 3ms! Please test yourself xD)
Usage (also included to the include )
- Use "do_cMd;" in "OnPlayerCommandText" to call the command like that:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
// code ...
do_cMd;
// code ...
}
pawn Код:
cMd:command_name;
{
// code ...
}
- playerid and params[] are available in every command, params[] includes the command's parameters you can split with sscanf
(Optional: you can use the variable "cMd" after "do_cMd;" to check if a command was called. It should return 1 then.)
Changelog:
[v0.1a]:
- Made commands non-casesensitive. Please define commands with lowercase names
- First release
Pastebin
Greetz
PS: Critics and comments are welcome