28.02.2010, 00:55
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new
idx,
cmd[128] = strtok(cmdtext, idx);
if(strcmp(cmd, "/b", true) == 0)
{
new
string[128];
tmp[128] = strtok(cmdtext, idx);
if(strlen(tmp) < 1) return SendClientMessage(playerid, COLOR, "Usage: /b [local ooc chat]");
else
{
new
Name[24];
GetPlayerName(playerid, Name, 24);
format(string, sizeof(string), "((%s says: %s))", Name, string);
SendClientMessageToAll(COLOR_OOC, string);
printf(string);
}
return 1;
}
return 0;
}