18.10.2010, 08:10
Quote:
Here is my code for a /me command with zcmd + sscanf.
pawn Код:
|
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;
}
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;
}
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");
else {
format(str, sizeof(str), "* %s %s", pName(playerid), str);
SendClientMessageToAll(PURPLE, str);
}
return 1;
}