01.10.2016, 10:50
I found the line that causes the crash, removed it temporarily but now it doesnt save my stats when I dissconnect.
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
new
Query[350],
DBResult: Result,
pName[250],
Float: pHealth,
Float: pArmour,
Float: Angle,
Float: X,
Float: Y,
Float: Z
;
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerPos(playerid, X, Y, Z);
format(Query, sizeof(Query), "UPDATE `Accounts` SET Money = '%i', Health = '%f', Armour = '%f', X = '%f', Y = '%f', Z = '%f', Interior = '%f', Angle = '%f' WHERE Name = '%s'",
GetPlayerMoney(playerid),
GetPlayerHealth(playerid, pHealth),
GetPlayerArmour(playerid, pArmour),
X, Y, Z,
GetPlayerInterior(playerid),
GetPlayerFacingAngle(playerid, Angle),
DB_Escape(pName));
Result = db_query(Database, Query);
db_free_result(Result);
return 1;
}

