10.01.2013, 03:16
Using zcmd, and sscanf
pawn Код:
CMD:ask(playerid, params[])
{
new string[128], pname[24];
if(!sscanf(params,"s[128]",string))
{
GetPlayerName(playerid, pname, 24);
format(string,128,"[ASK] %s is asking: %s",pname,string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerAdmin(i)) SendClientMessage(i, -1, string);
}
}
else SendClientMessage(playerid, 0xFF0000AA, "Usage: /ASK [Message]");
}