save score
#8

Quote:
Originally Posted by Equuuuin0X
Посмотреть сообщение
I can make you a Y_INI saving system, aight ?

put this ontop of the script

pawn Код:
#define PATH "/Users/%s.ini"
put this anywhere
pawn Код:
stock UserPath(playerid)
    {
        new string[128],playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid,playername,sizeof(playername));
        format(string,sizeof(string),PATH,playername);
        return string;
    }
Put this somewhere (if you have already the public, then put it at the public)

pawn Код:
public OnPlayerDisconnect(playerid, reason)
    {
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
        INI_WriteInt(File,"Score",GetPlayerScore);
        INI_Close(File);
        return 1;
    }
Isn't it simple ? instead of using dini, which is more complicated.
i did that the Score in tab will be money , it will be save me Score as money now ?
Reply


Messages In This Thread
save score - by WorldPro - 10.04.2014, 20:56
Re: save score - by DerickClark - 10.04.2014, 21:03
Re: save score - by WorldPro - 11.04.2014, 13:09
Re: save score - by Affan - 11.04.2014, 14:16
Re: save score - by DerickClark - 11.04.2014, 22:19
Re: save score - by WorldPro - 12.04.2014, 10:27
Re: save score - by Equuuuin0X - 12.04.2014, 11:56
Re: save score - by WorldPro - 12.04.2014, 13:55
Re: save score - by Equuuuin0X - 12.04.2014, 13:58
Re: save score - by WorldPro - 12.04.2014, 14:01

Forum Jump:


Users browsing this thread: 4 Guest(s)