31.03.2012, 20:23
Sure here you go using ZCMD and sscanf:
pawn Код:
CMD:showid(playerid, params[])
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /showid [Player ID/Part of Name]");
new str[128], FullName[MAX_PLAYER_NAME], FirstName[MAX_PLAYER_NAME], LastName[MAX_PLAYER_NAME];
GetPlayerName(id, FullName, sizeof(FullName));
strmid(FirstName, FullName, 0, strfind(FullName, "_"));
strmid(LastName, FullName, strfind(FullName, "_")+1, strlen(FullName));
format(str, sizeof(str), "FIRST NAME: %s", FirstName);
SendClientMessage(playerid, -1, str);
format(str, sizeof(str), "Last NAME: %s", LastName);
SendClientMessage(playerid, -1, str);
return 1;
}