Mysql no save
#6

Quote:
Originally Posted by Izaki
Посмотреть сообщение
PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
query[128];
    
mysql_format(mysqlquerysizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
    
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
    
mysql_tquery(mysqlquery"""");
    
    
SetPVarInt(playerid"laser"0);
     
RemovePlayerAttachedObject(playerid0);
    if(
InfectedLeft[playerid] == 1)
    {
        
ZombieTimer SetTimer("ZombieCounts",3000,1);
        
InfectedLeft[playerid] = 0;
    }
    return 
1;

As you're trying to update a players stats you need to assign the update somewhere rather than updating the database and hoping it does something.

PHP код:
UPDATE `table.nameSET `pEXP`='%i', `Premium`='%i', `pAdminLevel` = '%i' WHERE `ID`='%d' 
Reply


Messages In This Thread
Mysql no save - by Izaki - 13.07.2016, 02:24
Re: Mysql no save - by Napst34 - 13.07.2016, 02:47
Re: Mysql no save - by Izaki - 13.07.2016, 04:33
Re: Mysql no save - by itsCody - 13.07.2016, 04:52
Re: Mysql no save - by Izaki - 13.07.2016, 05:07
Re: Mysql no save - by Flake. - 13.07.2016, 05:27
Re: Mysql no save - by Izaki - 13.07.2016, 17:03

Forum Jump:


Users browsing this thread: 1 Guest(s)