05.03.2010, 11:14
pawn Код:
if(strcmp(cmd, "/911", true) == 0)
{
new tmp[128];
new tmp2[128];
new crime;
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /911 [ID] [CRIME]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /911 [ID] [CRIME]");
giveplayerid = strval(tmp);
crime= strval(tmp2);
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[RADIO] %s reported %s %s", sendername,giveplayer, crime);
SendClientMessageToAll(COLOR_YELLOW, string);
}else {
format(string, sizeof(string), "%d : Wrong ID!", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}