31.08.2009, 16:20
Код:
if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0) { if (AccountInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, ADMIN_RED, "USAGE: (/w)hisper [playerid/PartOfName] [whisper text]"); return 1; } giveplayerid = ReturnUser(tmp); if (IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "Admin %s whispers: %s", sendername, playerid); SendClientMessage(giveplayerid, YELLOW, string); } else { format(string, sizeof(string), " %d is not an active player.", giveplayerid); SendClientMessage(playerid, YELLOW, string); } } return 1; }