28.08.2013, 09:13
stock SaveAccount(playerid)
{
new
query[300],
Floatos[4],
Float:health;
GetPlayerPos(playerid, posArr{pos});
GetPlayerFacingAngle(playerid, pos[3]);
GetPlayerHealth(playerid, health);
format(query, sizeof(query), "UPDATE `users` SET health = %.1f, X = %.2f, Y = %.2f, Z = %.2f, A = %.2f, interior = %d, vw = %d, skin = %d WHERE `id` = %d",
health,
posArrEx{pos},
GetPlayerInterior(playerid),
GetPlayerVirtualWorld(playerid),
GetPlayerSkin(playerid),
g_PlayerInfo[playerid][pSQLid]
);
mysql_function_query(g_Handle, query, false, "SendQuery", "");
return 1;
}
that code isn't working properly i am trying to save the player stats but keeps not saving. the problem isnt loading because i see in the mysql db and i see that nothing is being saved.
Can you help me? thanks
{
new
query[300],
Floatos[4],
Float:health;
GetPlayerPos(playerid, posArr{pos});
GetPlayerFacingAngle(playerid, pos[3]);
GetPlayerHealth(playerid, health);
format(query, sizeof(query), "UPDATE `users` SET health = %.1f, X = %.2f, Y = %.2f, Z = %.2f, A = %.2f, interior = %d, vw = %d, skin = %d WHERE `id` = %d",
health,
posArrEx{pos},
GetPlayerInterior(playerid),
GetPlayerVirtualWorld(playerid),
GetPlayerSkin(playerid),
g_PlayerInfo[playerid][pSQLid]
);
mysql_function_query(g_Handle, query, false, "SendQuery", "");
return 1;
}
that code isn't working properly i am trying to save the player stats but keeps not saving. the problem isnt loading because i see in the mysql db and i see that nothing is being saved.
Can you help me? thanks