06.03.2014, 22:44
pawn Код:
CMD:id(playerid, params[])
{
new string[128], name[24];
if(sscanf(params, "u[24]", name)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /id [Name/PartOfName]");
else
{
new count;
foreach(Player, i)
{
new pname[24];
GetPlayerName(i, pname, sizeof(pname));
if(strfind(pname, name, true) != -1)
{
format(string, sizeof(string), "(ID: %d) - (Name: %s) - (Level: %d) - (Ping: %d)", i, GetPlayerNameEx(i), PlayerInfo[i][pLevel], GetPlayerPing(i));
SendClientMessageEx(playerid, COLOR_WHITE, string);
count ++;
}
}
if(count == 0) return SendClientMessageEx(playerid, COLOR_GRAD2, " No players found.");
}
return 1;
}