15.08.2013, 11:25
pawn Код:
dcmd_id(playerid, params[])
{
new pid,PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
if(sscanf(params, "u", pid)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /id <part of name>");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid,COLOR_RED, "Player not found.");
SendClientMessage(playerid, 0xE89B5BBB, "Players found:");
format(str, sizeof(str), "> %s (ID:%i) ",PlayerName[pid] ,pid );
SendClientMessage(playerid, COLOR_WHITE, str);
return 1;
}