Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Score Wont Save

$
0
0
PHP Code:

#define PATH "/Users/%s.ini" 

PHP Code:

enum pInfo
{
    
pLevel,
    
pPass,
    
pScore,
    
pCash,
    
pAdmin,
    
pVip,
    
pKill,
    
pDeath,
    
pSkin,
    
pAllKill,
    
pAllDeath,


PHP Code:

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 Code:

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 Code:

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

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>