11.06.2013, 16:53
I had similar problem months ago, and it worked only for vehicles. I'm now using something similar to the code above and it works for all the vehicles.
By Matite (I think).
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new
Float:vx,
Float:vy,
Float:vz
;
if((newkeys & KEY_LOOK_BEHIND) && !(oldkeys & KEY_LOOK_BEHIND))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
if(floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3)
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.5, vy * 1.5, vz * 1.5);
}
}
}
return 1;
}

