18.10.2010, 02:21
Just this cuestion, what command procesor is the more faster and efficent, i wanna script my gm but i want choose the right coomand procesor.
Thanks.
Thanks.
Strcmp
pawn Код:
|
can give me the post of zcmd i dont find it, and you can giveme a example for zmcd + sccanf plz.
Thanks. |
CMD:me(playerid, params[])
{
if(sscanf(params, "s[128]", str))
{
return SendClientMessage(playerid, LBLUE, "Usage: /me (action)") &&
SendClientMessage(playerid, ORANGE, "Function: make a me action");
}
format(str, sizeof(str), "* %s %s", pName(playerid), str);
SendClientMessageToAll(PURPLE, str);
return 1;
}
pawn Код:
|
Here is my code for a /me command with zcmd + sscanf.
pawn Код:
|
Here is my code for a /me command with zcmd + sscanf.
pawn Код:
|
CMD:me(playerid, params[])
{
if(sscanf(params, "s[128]", str)) return SendClientMessage(playerid, LBLUE, "Usage: /me (action)") &&
SendClientMessage(playerid, ORANGE, "Function: make a me action");
format(str, sizeof(str), "* %s %s", pName(playerid), str);
SendClientMessageToAll(PURPLE, str);
return 1;
}
CMD:me(playerid, params[])
{
if(sscanf(params, "s[128]", str))return SendClientMessage(playerid, LBLUE, "Usage: /me (action)") && SendClientMessage(playerid, ORANGE, "Function: make a me action");
format(str, sizeof(str), "* %s %s", pName(playerid), str);
SendClientMessageToAll(PURPLE, str);
return 1;
}
CMD:me(playerid, params[])
{
if(sscanf(params, "s[128]", str)) return SendClientMessage(playerid, LBLUE, "Usage: /me (action)") && SendClientMessage(playerid, ORANGE, "Function: make a me action");
else {
format(str, sizeof(str), "* %s %s", pName(playerid), str);
SendClientMessageToAll(PURPLE, str);
}
return 1;
}