07.11.2010, 04:24
I have this
This works but only boosts you in the general direction of travel. Can somebody make it so it boost you in exactly the direction of travel.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == KEY_FIRE)
{
if (pRank[playerid] > 4) {
new vid, Float:x, Float:y, Float:z, Float:nx, Float:ny;
vid = GetPlayerVehicleID(playerid);
if(vid != 0) {
GetVehicleVelocity(vid, x, y, z);
if(x == 0) nx = x;
else if(x < 0) nx = x - 0.5;
else nx = x + 0.5;
if(y == 0) ny = y;
else if(y < 0) ny = y - 0.5;
else ny = y + 0.5;
SetVehicleVelocity(vid, nx, ny, z);
}
}
}
return 1;
}