Stats wont save!!!
#1

After i restart my server my stats will lost.
How to fix it
anybody know
Help me pls!!!
Reply
#2

Can you show us your OnPlayerDisconnect code?
Reply
#3

pawn Код:
public OnGameModeExit()
{
    foreach(Player, i)
    {
        //YOUR SAVING SYSTEM HERE
    }
    return 1;
}
Reply
#4

public OnPlayerDisconnect( playerid, reason )
{
new INI:File = INI_Open( user_ini_file( playerid ) );
INI_WriteInt( File, "c4", c4[playerid] );
INI_Close( File );
return ( 1 );
}
Reply
#5

pawn Код:
public OnPlayerDisconnect( playerid, reason )
{
    new INI:File = INI_Open( user_ini_file( playerid ) );
    INI_WriteInt( File, "c4", c4[playerid] );
    INI_Close( File );
    return ( 1 );
}
- You have only C4 file, wich is saving, but if you want your kills/cash/score/Admin/Vip to save, you need to write them too.
Reply
#6

i want to save c4 only
when i quit and rejoin the server my C4 will save and load after i restart the server my C4 = 0
Reply
#7

Quote:
Originally Posted by Ryz
Посмотреть сообщение
pawn Код:
public OnGameModeExit()
{
    foreach(Player, i)
    {
        //YOUR SAVING SYSTEM HERE
    }
    return 1;
}
No, this code is completely wrong.

Quote:
Originally Posted by 9noober
Посмотреть сообщение
i want to save c4 only
when i quit and rejoin the server my C4 will save and load after i restart the server my C4 = 0
Make an ingame restart command which will kick all players then in 1 second it'll restart the server.
Reply
#8

Quote:
Originally Posted by 9noober
Посмотреть сообщение
After i restart my server my stats will lost.
How to fix it
anybody know
Help me pls!!!
Quote:
Originally Posted by 9noober
Посмотреть сообщение
i want to save c4 only
when i quit and rejoin the server my C4 will save and load after i restart the server my C4 = 0
why you say's 'when i quit and rejoin'? see you first post you sayed 'After i restart my server'
Reply
#9

If i quit and rejoin my stats will load
but if i restart my server my stats will lost
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)