How do I create a pname
#4

pawn Код:
enum pInfo
{
    pName[MAX_PLAYER_NAME],
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteString(File, "Name", GetName(playerid) );
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}

stock GetName(playerid)
{
        new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply


Messages In This Thread
How do I create a pname - by lramos15 - 31.05.2013, 00:33
Respuesta: How do I create a pname - by JustBored - 31.05.2013, 00:39
Re: How do I create a pname - by lramos15 - 31.05.2013, 01:05
Re: How do I create a pname - by Glad2BeHere - 31.05.2013, 01:19
Re: How do I create a pname - by lramos15 - 31.05.2013, 18:54
Re: How do I create a pname - by OxyG3N - 31.05.2013, 19:02
Re: How do I create a pname - by lramos15 - 31.05.2013, 19:17
Re: How do I create a pname - by Littlehelper - 31.05.2013, 19:19
Re: How do I create a pname - by OxyG3N - 31.05.2013, 19:33

Forum Jump:


Users browsing this thread: 3 Guest(s)