GetPlayerName PL

From SA-MP Wiki

Jump to: navigation, search

GetPlayerName

Description:

Pobieranie nicku gracza.


Parametry:
(playerid, const name[], len)


playeridID gracza, któremu chcemy pobrać nick.
const name[]Zmienna do której zostanie przypisany nick.
lenDługość zmiennej do której zostanie przypisany nick.


Return Values:

Zwracanie nicku gracza.


public OnPlayerConnect(playerid)
{    
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s dołączył do serwera!",name);
    SendClientMessageToAll(0xFFFF00AA, string);
    return true;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages