flip vehicle help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: flip vehicle help (
/showthread.php?tid=245348)
flip vehicle help -
tanush - 31.03.2011
How can i make if player uses KEY_FIRE their vehicle flips back to normal

?
Re: flip vehicle help -
Snipa - 31.03.2011
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (newkeys & KEY_FIRE) {
new Float:angle;
GetVehicleZAngle(vehicleid, angle);
SetVehicleZAngle(vehicleid, angle);
RepairVehicle(vehicleid);
}
}
return 1;
}