25.12.2009, 18:56
Hey whats wrong with this code.. my speed boost is all types of FUCKED UP -.-...
Video of what happens...
The problem:
It goes the way its scripted.. + y, + x.. Not the direction the car is moving, How do i make it go the direction the car is moving?
pawn Код:
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(booston[playerid] == 1)
{
if (newkeys & KEY_FIRE)
{
new Float:vx, Float:vy, Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx + 0.2, vy + 0.2 , vz);
return 1;
}
}
}
The problem:
It goes the way its scripted.. + y, + x.. Not the direction the car is moving, How do i make it go the direction the car is moving?