y_ini saving help
#4

try this

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new playname[MAX_PLAYER_NAME];
    new userfile[128];
    new string[128];
    GetPlayerName(playerid, playname, sizeof(playname));
    format(string, sizeof(string), "%s.ini", playname);
    if(fexist(string))
    {
        new Float:pHealth, Float:pArmour;
        new INI:file = INI_Open(string);
        INI_WriteInt(file, "Level", GetPlayerScore(playerid));
        INI_WriteInt(file, "Money", GetPlayerMoney(playerid));
        INI_WriteInt(file, "Health", GetPlayerHealth(playerid, pHealth));
        INI_WriteInt(file, "Armour", GetPlayerArmour(playerid, pArmour));
        INI_WriteInt(file, "Skin", GetPlayerSkin(playerid));
        INI_Close(file);
    }
    return 1;
}
EDIT: why this
pawn Код:
INI_WriteInt(file, "Level", GetPlayerScore(playerid));
used GetPlayerScore? xD use AccInfo [ playerid ] [ ENUM ] ;
Reply


Messages In This Thread
y_ini saving help - by Tommy_Mandaz - 18.04.2011, 00:51
Re: y_ini saving help - by AK47317 - 18.04.2011, 01:11
Re: y_ini saving help - by Tommy_Mandaz - 18.04.2011, 01:17
Re: y_ini saving help - by AK47317 - 18.04.2011, 01:26
Re: y_ini saving help - by Tommy_Mandaz - 18.04.2011, 01:43
Re: y_ini saving help - by AK47317 - 18.04.2011, 01:45
Re: y_ini saving help - by Tommy_Mandaz - 18.04.2011, 01:52
Re: y_ini saving help - by AK47317 - 18.04.2011, 01:56
Re: y_ini saving help - by Tommy_Mandaz - 18.04.2011, 02:08
Re: y_ini saving help - by AK47317 - 18.04.2011, 02:19

Forum Jump:


Users browsing this thread: 3 Guest(s)