So weird..MySql not saving coordinate.
#1

Hey guys, I have a very weird problem with my script..
X Float, Z Float & A Float Coordinates are saving perfectly fine.
Y Float is like "Nah too mainstream" and saves as 0.

Any ideas on why guys?

(OnPlayerDisconnect)
Code:
calling UpdateUserPosition(playerid);
(UpdateUserPosition(playerid))
Code:
UpdateUserPosition(playerid)
{
	GetUserPosition(playerid);
    new query[654];
    mysql_format(g_SQL, query, sizeof query, "UPDATE `accounts` SET `posX` =%f, `posY` =%f, `posZ` =%f, `posA` =%f WHERE `id` = %d LIMIT 1", Player[playerid][X_Pos], Player[playerid][Y_Pos], Player[playerid][Z_Pos], Player[playerid][A_Pos], Player[playerid][ID]);
	mysql_tquery(g_SQL, query);
	return 1;
}
(GetUserPosition(playerid))
Code:
stock GetUserPosition(playerid)
{
	new Float: pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);
    Player[playerid][X_Pos] = pos[0];
    Player[playerid][Y_Pos] = pos[1];
    Player[playerid][Z_Pos] = pos[2];
    Player[playerid][A_Pos] = pos[3];
	return 1;
}
Reply


Messages In This Thread
So weird..MySql not saving coordinate. - by SkyFlare - 11.12.2016, 10:55
Re: So weird..MySql not saving coordinate. - by amirm3hdi - 11.12.2016, 10:58
Re: So weird..MySql not saving coordinate. - by BiosMarcel - 11.12.2016, 10:59
Re: So weird..MySql not saving coordinate. - by SkyFlare - 11.12.2016, 11:50
Re: So weird..MySql not saving coordinate. - by amirm3hdi - 12.12.2016, 07:42

Forum Jump:


Users browsing this thread: 1 Guest(s)