Save Liters
#1

As you know a few days ago I made ​​a thread where I asked how to do each gas station have a liters fuel.Now here in this thread I asking how do when I stop the server the liters of fuel to retain and when re-start the server the liters are the same as retain ?
Reply
#2

pawn Код:
public OnGameModeExit()
{
     for(new i=0; i<MAX_PLAYERS; i++)
     {
         SaveLiters[i];
     }
     return 1;
}
Use a loop to save the data in an array to store the value and include a recommend SII, as in the example above.
Reply
#3

No no I don't have this forward.
Here's my codes:

Код:
public OnFilterScriptInit()
{
    for(new i=0;i<sizeof(Stations);i++)
    {
        fuelstations[i] = 5000;
    }
    return 1;
}
Reply
#4

pawn Код:
forward Example();
public Example()
{
    for(new i=0;i<sizeof(Stations);i++)
    {
        INI_Open("Liters.txt");
        INI_WriteString("Liters", fuelstations[i]);
        INI_Save();
        INI_Close();
    }
    return 1;
}
pawn Код:
public OnFilterScriptExit()
{
    for(new i=0;i<sizeof(Stations);i++)
    {
        Example();
    }
    return 1;
}
I understood so
Reply
#5

Then in OnFilterScriptInit() what is the function to load Liters.txt ?

Btw errors:

Код:
D:\New Folder\Нова папка\Нова папка\0.3c\filterscripts\speedo.pwn(474) : error 017: undefined symbol "INI_Open"
D:\New Folder\Нова папка\Нова папка\0.3c\filterscripts\speedo.pwn(475) : error 017: undefined symbol "INI_WriteString"
D:\New Folder\Нова папка\Нова папка\0.3c\filterscripts\speedo.pwn(476) : error 017: undefined symbol "INI_Save"
D:\New Folder\Нова папка\Нова папка\0.3c\filterscripts\speedo.pwn(477) : error 017: undefined symbol "INI_Close"
Reply
#6

use the system rescue SII. Download Here
good luck

@edit
look this tutorial
https://sampforum.blast.hk/showthread.php?tid=267808
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)