[Include] PlayerName
#7

Yes, and just -very old- a PlayerName(playerid); function (or just use: playerName[playerid] (var). The most PlayerName functions looks like this:
pawn Код:
stock PlayerName(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName)); //Or instead of 'sizeof(pName)' just 'MAX_PLAYER_NAME' (my style)
    return pName;
}
My script has the global variable "playerName[playerid]". (new playerName[MAX_PLAYERS][MAX_PLAYER_NAME];). When a player connects, the script automatic gets the name, store it into playerName[playerid] so you can safe it later (yes it's being changed when you use SetPlayerName).
And so, the PlayerName function of mine looks like this:
pawn Код:
stock PlayerName(playerid)
    return playerName[playerid];
:P
Reply


Messages In This Thread
PlayerName - by Kwarde - 04.07.2011, 19:51
Re: PlayerName - by XpDeviL - 04.07.2011, 19:54
AW: PlayerName - by Forbidden - 04.07.2011, 20:10
Re: AW: PlayerName - by iPLEOMAX - 04.07.2011, 20:23
Re: PlayerName - by Kwarde - 04.07.2011, 20:29
Re: PlayerName - by FireCat - 04.07.2011, 20:42
Re: PlayerName - by Kwarde - 04.07.2011, 20:45
Re: PlayerName - by legodude - 05.07.2011, 09:34
Re: PlayerName - by Kwarde - 05.07.2011, 12:23
Re: PlayerName - by juraska - 05.07.2011, 13:46
Re: PlayerName - by SmileyForCheat - 05.07.2011, 13:49
Re: PlayerName - by Stepashka - 05.07.2011, 13:57
Re: PlayerName - by Hiddos - 05.07.2011, 14:01
Re: PlayerName - by Stepashka - 05.07.2011, 14:06
Re: PlayerName - by Hiddos - 05.07.2011, 16:01
Re: PlayerName - by System64 - 05.07.2011, 17:03
Re: PlayerName - by SPAWN_METAL - 05.07.2011, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)