31.03.2011, 00:24
How can i make if player uses KEY_FIRE their vehicle flips back to normal ?
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;
}