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

save score problem

$
0
0
Ok i made a login system which save score obviously and it worked no all of a sudden it doesnt save the player score and but if i edit it in the user files it will load the amount i set it to. but when i use /setscore I.G it doesnt save the score when the player disconnect, but it sets the score but doest save it when the player leave , please help me out someone.

the code i use to save the player stats when they disconnet
Code:

//onplayedisconnet
        new INI:ACCOUNT = INI_Open(UserPath(playerid));
        INI_SetTag(ACCOUNT,"data");
        INI_WriteInt(ACCOUNT,"Level",pInfo[playerid][aAdmin]);
        INI_WriteInt(ACCOUNT,"Cash",GetPlayerCash(playerid));
        INI_WriteInt(ACCOUNT,"Kills",pInfo[playerid][Kills]);
        INI_WriteInt(ACCOUNT,"Deaths",pInfo[playerid][Deaths]);
        INI_WriteInt(ACCOUNT, "Banned",pInfo[playerid][Banned]);
        INI_WriteInt(ACCOUNT, "Donator",pInfo[playerid][Donator]);
        INI_WriteInt(ACCOUNT, "Score", pInfo[playerid][Score]);
        INI_WriteInt(ACCOUNT, "Skin", pInfo[playerid][Skin]);
          INI_WriteInt(ACCOUNT, "Muted",pInfo[playerid][Muted]);
    INI_Close(ACCOUNT);

And i dont think its the loaduser has the issue cause as i have stated earlier if i set it from the user file it load perfectly but if i set it in game it doesnt save when they player leaves..

Viewing all articles
Browse latest Browse all 18226

Trending Articles



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