GetPlayerName Edit

Uzima igracevo ime.


(playerid, const name[], len)

playerid // Igracev ID
const name[] // String gde se cuva ime
const name[] // Velicina tog stringa

Return: Velicinu stringa

public OnPlayerConnect(playerid)
    //Ispisuje igracevo ime svima pri ulasku na server
    new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s je upravo usao na server.", name);
    SendClientMessageToAll(0xC4C4C4FF, string);
    return 1;

NAPOMENA: 24 karaktera je maksimum za ime igraca!

String za spremanje ide ovako: new pName[MAX_PLAYER_NAME+]

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.