MySQL Saving won't work out probably.
#8

Just found out that it worked all the time. But. Now I am having a new issue. Before the player logs off, it doesn't actually save his position. How can I make it save before the player actually logs off?
pawn Код:
public OnPlayerDisconnect(playerid, reason)
    {
        SavePlayer(playerid);
       
        new string[256], astring[256];
        switch(reason)
        {
            case 0: format(string,sizeof string,"%s has lost connection to the server.", RemoveUnderScore(playerid));
            case 1: format(string,sizeof string,"%s has left the server.", RemoveUnderScore(playerid));
            case 2: format(string,sizeof string,"%s has been kicked or banned from the server.", RemoveUnderScore(playerid));
        }
        NearByMessage(playerid, GREY, string);
        printf("[LOGGING] %s (ID: %d) has just disconnected the server. Reason: %s", pName(playerid), playerid, string);
       
        for(new i = 0; i < MAX_PLAYERS; i++)
        if(Player[i][AdminLevel] >= 1)
        {
            if(!IsPlayerInRangeOfPlayer(i, playerid, 20))
            {
                switch(reason)
                {
                    case 0: format(astring,sizeof astring,"%s has lost connection to the server.", RemoveUnderScore(playerid));
                    case 1: format(astring,sizeof astring,"%s has left the server.", RemoveUnderScore(playerid));
                    case 2: format(astring,sizeof astring,"%s has been kicked or banned from the server.", RemoveUnderScore(playerid));
                }
                SendAdminMessage(playerid, RED, astring);
            }
        }
       
        DestroyPlayerTextDraws(playerid);
        return 1;
    }
Reply


Messages In This Thread
MySQL Saving won't work out probably. - by Lyksus - 11.01.2014, 11:27
Re: MySQL Saving won't work out probably. - by MadafakaPro - 11.01.2014, 11:29
Re: MySQL Saving won't work out probably. - by Sojo12 - 11.01.2014, 11:39
Re: MySQL Saving won't work out probably. - by newbie scripter - 11.01.2014, 11:50
Re: MySQL Saving won't work out probably. - by Lyksus - 12.01.2014, 15:49
Re: MySQL Saving won't work out probably. - by Konstantinos - 12.01.2014, 16:05
Re: MySQL Saving won't work out probably. - by Lyksus - 12.01.2014, 16:08
Re: MySQL Saving won't work out probably. - by Lyksus - 12.01.2014, 16:12

Forum Jump:


Users browsing this thread: 1 Guest(s)