12.06.2009, 13:03
Код:
if(strcmp(cmd, "/command", true) == 0 ) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_ERROR, "USAGE: /command (id)"); return 1; } giveplayerid = strval(tmp); if(!IsNumeric(tmp)) { SendClientMessage(playerid, COLOR_ERROR, "USAGE: /command (id) ID Must be a number"); return 1; } if (IsPlayerConnected(giveplayerid)) { SendClientMessage(giveplayerid, COLOR_ROYALBLUE, "your message"); } else { format(string, sizeof(string), "ID (%d) Is not an active player", giveplayerid); SendClientMessage(playerid, COLOR_ERROR, string); } return 1; }