Save System
#1

I made a filterscript with save system with Y_INI,
But how can i load info from the file.
Please Help !
Reply
#2

Read this:
https://sampforum.blast.hk/showthread.php?tid=558266
If you have enums it should be easy.
Like
Код:
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]
Reply
#3

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 ?
Reply
#4

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...
Reply
#5

To Loaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad when the player connect loaaaaaad not to saveee
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)