24.01.2017, 02:06
Check callback OnPlayerDisconnect
Quote:
public OnPlayerDisconnect(playerid, reason) { new query[128], Floatos[4]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); GetPlayerFacingAngle(playerid, pos[3]); mysql_format(mysql, query, sizeof(query), "UPDATE `accounts` SET `Money` = %d, `PosX` = %f, `PosY` = %f, `PosZ` = %f, `PosA` = %f WHERE `ID` = %d", GetPlayerMoney(playerid), pos[0], pos[1], pos[2], pos[3], Player[playerid][ID]); mysql_tquery(mysql, query, "", ""); return true; } |