Save name on connect
#1

Nevermind, i fixed it

Solution

pawn Код:
#define PlayerName(%0)    pName[%0]

new pName[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, sizeof(name));
    format(pName[playerid], 24, name);
    return 1;
}
Reply
#2

EDIT: I was wrong..
Reply
#3

no, i mean to save the name into "pName" i have seen someone do that to save CPU or something

i used this before
pawn Код:
stock PlayerName(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
but someone told me that use more CPU and he said i could try save the name in "pName"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)