DriftCount Didnt Save Score - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DriftCount Didnt Save Score (
/showthread.php?tid=482931)
DriftCount Didnt Save Score -
Awankz - 23.12.2013
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
Re: DriftCount Didnt Save Score -
Awankz - 24.12.2013
anyone ? please help
Re: DriftCount Didnt Save Score -
Awankz - 24.12.2013
no body can help me ?
Re: DriftCount Didnt Save Score -
SilentSoul - 24.12.2013
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.
Re: DriftCount Didnt Save Score -
Kells - 24.12.2013
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
Re: DriftCount Didnt Save Score -
Awankz - 28.12.2013
just copy paste ?
Re: DriftCount Didnt Save Score -
Tayab - 28.12.2013
Yes, basically.
CTRL + F - Seach for #include <a_samp> and put it under that line.
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);
}
}
Re: DriftCount Didnt Save Score -
Awankz - 01.01.2014
why bank stats ? not score ?