Problem
#1

Hi,I have a problem with database,I do not know why when I restart the server,my statistics don't save,how can I solve,I will leave a link for database to see everyone if is something worng with her.

Link: https://www120.zippyshare.com/v/ZVjf0G00/file.html
Reply
#2

Can you show us ongamemodeexit() ?
Reply
#3

HTML Code:
public OnGameModeExit()
{
    foreach(new i: Player) OnPlayerDisconnect(i, 1);
    //--------------------------------------------------------------------------
    new x;
	//--------------------------------------------------------------------------
    while (x<500)
	{
        if (x!=(0xFFFF))
		{
            CallRemoteFunction("OnPlayerDisconnect", "i", x);
        }
        ++ x;
    }
    //--------------------------------------------------------------------------
	new ls_Query[1024];
	//--------------------------------------------------------------------------
	for (new i = 1; i < MAX_GANGS; i++)
	{
	    format(ls_Query, sizeof(ls_Query), "UPDATE `GangTers` SET `GangTerOwner` = '%d' WHERE `ID` = '%d'", Teritories[i][owner], i);
	    mysql_tquery(DB_Connect, ls_Query, "", "");
	}
	//--------------------------------------------------------------------------
	OnUpdate(); mysql_close(DB_Connect);
	//--------------------------------------------------------------------------
	return 1;
}
Reply
#4

En: How work your restart system?
Ro: Cum functioneaza sistemul de restart, daca e pe timp ar trebui ca la o anumita secundă sa faci sa se salveze toate date de pe server si dupa sa dai restart.
Reply
#5

Well it doesn't look like you're saving any statistics. What does OnUpdate do?

Also: Why?

pawn Code:
while (x<500)
{
    if (x!=(0xFFFF))
    {
        CallRemoteFunction("OnPlayerDisconnect", "i", x);
    }
    ++ x;
}
Reply
#6

Quote:
Originally Posted by Florin48
View Post
En: How work your restart system?
Ro: Cum functioneaza sistemul de restart, daca e pe timp ar trebui ca la o anumita secundă sa faci sa se salveze toate date de pe server si dupa sa dai restart.
E facut deja,dar tot mi se intampla sa nu se salveze
Reply
#7

Well, it seems like no saving here, What about onplayerdisconnect?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)