31.12.2012, 10:58
As the title says, the following command is supposed to show a list of players with the name containing what was typed.
EG: If I type in game: /id jam
It should appear as (If there are 3 people online with the letters jam in the name):
James Girvan - ID 1
Jamie Clark - ID 5
Chris Jameson - ID 24
But it doesn't.
If anyone can help, I'd be grateful.
EG: If I type in game: /id jam
It should appear as (If there are 3 people online with the letters jam in the name):
James Girvan - ID 1
Jamie Clark - ID 5
Chris Jameson - ID 24
But it doesn't.
pawn Код:
command(id, playerid, params[])
{
new name[24], string[1024];
if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, GREY, "Usage: /id [player name or part of name]");
{
format(string, sizeof(string), "%s\n%s - ID %d", string, RemoveUnderScore(GetPlayerIDFromName(name, 1)), GetPlayerIDFromName(name, 1));
SendClientMessage(playerid, WHITE, string);
}
return 1;
}