Command: /id [player name or part of name]
#1

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.

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;
}
If anyone can help, I'd be grateful.
Reply


Messages In This Thread
Command: /id [player name or part of name] - by JoelR - 31.12.2012, 10:58
Re: Command: /id [player name or part of name] - by JaKe Elite - 31.12.2012, 11:01
Re: Command: /id [player name or part of name] - by JoelR - 31.12.2012, 11:01
Re: Command: /id [player name or part of name] - by JaKe Elite - 31.12.2012, 11:03
Re: Command: /id [player name or part of name] - by Aldo. - 31.12.2012, 11:05
Re: Command: /id [player name or part of name] - by Konstantinos - 31.12.2012, 11:06
Re: Command: /id [player name or part of name] - by Threshold - 31.12.2012, 11:14
Re: Command: /id [player name or part of name] - by Vince - 31.12.2012, 11:19

Forum Jump:


Users browsing this thread: 2 Guest(s)