DriftCount Didnt Save Score
#1

DriftCount Not Give Money , didnt save score and once again after i do second drift , score will reset and will get new score . how to fix it ?

Link - CLICK PLEASE
Reply
#2

anyone ? please help
Reply
#3

no body can help me ?
Reply
#4

You must use a saving system to player data (Y_INI supported on that) do you have any register/login system ? if you have post the saving codes here please (OnPlayerDisconnect) mostly used on saving.
Reply
#5

at OnplayerDisconnect
Код:
	SavePosStats(playerid);
	SaveGunStats(playerid);

 	RemovePlayerAttachedObject(playerid, 0);
	RemovePlayerAttachedObject(playerid, 1);
	
    if(IsPlayerConnected(playerid) && IsLoggedIn{playerid} == 1)
	{
	    //
	    if(JailTime[playerid] > 0)
	    {
	        PlayerInfo[playerid][jTime] = JailTime[playerid];
	    }
	    //
	    
		SaveBankStats(playerid);
    	SaveFightStats(playerid);
    	SaveUserStats(playerid);
    	SaveDegreeStats(playerid);
    }
and at top add
Код:
#include <YSI_Y_ini>
hope that works
Reply
#6

just copy paste ?
Reply
#7

Yes, basically.
CTRL + F - Seach for #include <a_samp> and put it under that line.

pawn Код:
#include <YSI_Y_ini>

Search for "OnPlayerDisconnect" and paste it inside somewhere, so looks like this.

pawn Код:
public OnPlayerDisconnect(playerid)
{
    SavePosStats(playerid);
    SaveGunStats(playerid);

    RemovePlayerAttachedObject(playerid, 0);
    RemovePlayerAttachedObject(playerid, 1);
   
    if(IsPlayerConnected(playerid) && IsLoggedIn{playerid} == 1)
    {
        //
        if(JailTime[playerid] > 0)
        {
            PlayerInfo[playerid][jTime] = JailTime[playerid];
        }
        //
       
        SaveBankStats(playerid);
        SaveFightStats(playerid);
        SaveUserStats(playerid);
        SaveDegreeStats(playerid);
    }
}
Reply
#8

why bank stats ? not score ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)