Quote:
Originally Posted by Izaki
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
new query[128];
mysql_format(mysql, query, sizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
mysql_tquery(mysql, query, "", "");
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
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.name` SET `pEXP`='%i', `Premium`='%i', `pAdminLevel` = '%i' WHERE `ID`='%d'