Get player name from ID
#7

Try this:
pawn Код:
CMD:id(playerid, params[])
{
    new string[128], giveplayerid;
    if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /id [playerid]");

    if(IsPlayerConnected(giveplayerid))
    {
        format(string, sizeof(string), "(ID: %d) - (Name: %s) ", giveplayerid, GetPlayerName(giveplayerid));
        SendClientMessage(playerid, string);
    }
    else
    {
        SendClientMessage(playerid, "Invalid player specified.");
    }
    return 1;
}
My bad :P, I use other includes I guess
Reply


Messages In This Thread
Get player name from ID - by bitakid - 29.06.2014, 09:41
Re: Get player name from ID - by DaniceMcHarley - 29.06.2014, 09:47
Re: Get player name from ID - by bradleyofniet - 29.06.2014, 09:47
Re: Get player name from ID - by bitakid - 29.06.2014, 10:00
Re: Get player name from ID - by Stanford - 29.06.2014, 10:02
Re: Get player name from ID - by bitakid - 29.06.2014, 10:06
Re: Get player name from ID - by bradleyofniet - 29.06.2014, 10:11
Re: Get player name from ID - by bitakid - 29.06.2014, 10:16
Re: Get player name from ID - by bradleyofniet - 29.06.2014, 10:17
Re: Get player name from ID - by DaniceMcHarley - 29.06.2014, 10:28

Forum Jump:


Users browsing this thread: 1 Guest(s)