Save System - 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: Save System (
/showthread.php?tid=558494)
Save System -
nezo2001 - 17.01.2015
I made a filterscript with save system with Y_INI,
But how can i load info from the file.
Please Help
!
Re: Save System -
Kruno88 - 17.01.2015
Read this:
https://sampforum.blast.hk/showthread.php?tid=558266
If you have enums it should be easy.
Like
Код:
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]
Re: Save System -
nezo2001 - 17.01.2015
I have the enum and i saved the player state but the problem how to load the player status after he leae or after the server restart ?
Re: Save System -
Kruno88 - 17.01.2015
Quote:
Originally Posted by nezo2001
I have the enum and i saved the player state but the problem how to load the player status after he leae or after the server restart ?
|
Код:
public OnPlayerDisconnect(playerid, reason)
{
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,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
Change this...
Re: Save System -
nezo2001 - 17.01.2015
To Loaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad when the player connect loaaaaaad not to saveee