Score Wont Save
#1

PHP код:
#define PATH "/Users/%s.ini" 
PHP код:
enum pInfo
{
    
pLevel,
    
pPass,
    
pScore,
    
pCash,
    
pAdmin,
    
pVip,
    
pKill,
    
pDeath,
    
pSkin,
    
pAllKill,
    
pAllDeath,

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    if(
tijek == 2)
    {
        new 
msg[128];
        
format(msgsizeof(msg), "{ff0000}Duel izmedju %s(%d) i %s(%d) je zavrsio. Razlog: Vrijeme isteklo!"PlayerName(duel1), duel1PlayerName(duel2), duel2);
        
SendClientMessageToAll(-1msg);
        
tijek =0;
    }
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    
INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
    
INI_WriteInt(File,"Kill",PlayerInfo[playerid][pKill]);
    
INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
    
INI_WriteInt(File,"Death",PlayerInfo[playerid][pDeath]);
    
INI_Close(File);
    
////////////
    
return 1;

PHP код:
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    
INI_Int("Vip",PlayerInfo[playerid][pVip]);
    
INI_Int("Kill",PlayerInfo[playerid][pKill]);
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    
INI_Int("Death",PlayerInfo[playerid][pDeath]);
    
INI_Int("Skin"PlayerInfo[playerid][pSkin]);
     return 
1;

PHP код:
stock SavePlayer(playerid)
{
    new 
INI:File INI_Open(Korisnici(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
    
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    
INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
    
INI_WriteInt(File,"Kill",PlayerInfo[playerid][pKill]);
    
INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
    
INI_WriteInt(File,"Death",PlayerInfo[playerid][pDeath]);
    
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
    
INI_Close(File);
    return 
1;

I think its all defined but when i relog score back to zero, please help and thanks in advance
Reply


Messages In This Thread
Score Wont Save - by RoX123 - 30.06.2017, 20:58
Re: Score Wont Save - by Eoussama - 30.06.2017, 21:09
Re: Score Wont Save - by RoX123 - 30.06.2017, 21:15
Re: Score Wont Save - by Eoussama - 30.06.2017, 22:12
Re: Score Wont Save - by RoX123 - 30.06.2017, 22:35
Re: Score Wont Save - by Toroi - 30.06.2017, 22:39
Re: Score Wont Save - by RoX123 - 30.06.2017, 22:47
Re: Score Wont Save - by RoX123 - 01.07.2017, 00:26
Re: Score Wont Save - by Beryllium - 01.07.2017, 02:05
Re: Score Wont Save - by RoX123 - 01.07.2017, 09:41

Forum Jump:


Users browsing this thread: 1 Guest(s)