ID Command
#2

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;
}
Change "s[24]" to "u[24]". U is for names/id's.
Reply


Messages In This Thread
ID Command - by Drago987 - 06.03.2014, 22:27
Re: ID Command - by Keyhead - 06.03.2014, 22:44
Re: ID Command - by XK - 06.03.2014, 22:49
Re: ID Command - by FutureGenerationGaming - 06.03.2014, 22:54
Re: ID Command - by XK - 06.03.2014, 22:57
Respuesta: ID Command - by CuervO - 06.03.2014, 23:17
Re: ID Command - by Drago987 - 07.03.2014, 15:18
Re: ID Command - by Drago987 - 08.03.2014, 16:59
Re: ID Command - by jueix - 08.03.2014, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)