SA-MP Forums Archive
Vehicle Facing Angle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Facing Angle (/showthread.php?tid=587417)



Vehicle Facing Angle - nezo2001 - 30.08.2015

GetVehicleZAngle function doesn't do what I want. I want to save vehicles coords as it is with the same facing position. But when I use GetVehicleZAngle it changed the vehicle facing position to the north. Is there a way to get its facing angle?


Re: Vehicle Facing Angle - SpikY_ - 30.08.2015

show me your GetVehicleZAngle with codes you added.


Re: Vehicle Facing Angle - nezo2001 - 30.08.2015

PHP код:
new Float:xFloat:yFloat:zFloat:a;
    
GetVehiclePos(GetPlayerVehicleID(playerid), xyz);
    
GetVehicleZAngle(playerida);
    
format(querysizeof(query), "INSERT INTO cars (id, model, x, y, z, a, owner, owned, price, locked, color1, color2, cSale) VALUES ('%i', '%i', '%f', '%f', '%f', '%f', 'None', '0', '%i', '0', '0', '0', '0')"cAutoIncreaseGetVehicleModel(GetPlayerVehicleID(playerid)), xyzaprice);
    
mysql_query(1query); 



Re: Vehicle Facing Angle - nezo2001 - 30.08.2015

Haa?


Re: Vehicle Facing Angle - nezo2001 - 05.09.2015

Bump


Re: Vehicle Facing Angle - jlalt - 05.09.2015

try:
PHP код:
new Float:xFloat:yFloat:zFloat:a;
    
GetVehiclePos(GetPlayerVehicleID(playerid), xyz);
    new 
carid GetPlayerVehicleID(playerid);
    
GetVehicleZAngle(carida);
    
format(querysizeof(query), "INSERT INTO cars (id, model, x, y, z, a, owner, owned, price, locked, color1, color2, cSale) VALUES ('%i', '%i', '%f', '%f', '%f', '%f', 'None', '0', '%i', '0', '0', '0', '0')"cAutoIncreaseGetVehicleModel(GetPlayerVehicleID(playerid)), xyzaprice);
    
mysql_query(1query); 



Re: Vehicle Facing Angle - xVIP3Rx - 05.09.2015

what is "a" in your database for cars, if they're not 0.0 then show me the loading function.