29.02.2012, 00:52
^ Topic says it all.
Was it intentional? or.. a bug, just let me know so I can stop trying ;\
Was it intentional? or.. a bug, just let me know so I can stop trying ;\
//Test code
if(newkeys & KEY_ANALOG_UP)
{
new Float:vel[3], Float:angle;
GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
GetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2] + 0.2);
SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), floatsin(-angle - 90.0, degrees)/5.0, floatcos(-angle - 90.0, degrees)/5.0, 0.0);
}
if(newkeys & KEY_ANALOG_DOWN)
{
new Float:vel[3], Float:angle;
GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
GetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2] + 0.2);
SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), floatsin(-angle + 90.0, degrees)/5.0, floatcos(-angle + 90.0, degrees)/5.0, 0.0);
}
if(newkeys & KEY_ANALOG_LEFT)
{
new Float:vel[3], Float:angle;
GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
GetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2] + 0.15);
SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), floatsin(-angle + 90.0, degrees)/5.0, floatcos(-angle + 90.0, degrees)/5.0, 0.09);
}
if(newkeys & KEY_ANALOG_RIGHT)
{
new Float:vel[3], Float:angle;
GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
GetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vel[0], vel[1], vel[2] + 0.15);
SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), floatsin(-angle + 90.0, degrees)/5.0, floatcos(-angle + 90.0, degrees)/5.0, -0.09);
}