Prevent a vehicle from exploding?
#1

I'm gonna create some lines in my game mode that prevents a vehicle from catching on fire and exploding, and instead leaves it smoking dark smoke...

How is this possible? May anyone help me a little, where to place the lines and such?

Already written this, but in OnPlayerUpdate it doesn't work:
Code:
new vehid = GetPlayerVehicleID(playerid);
  new Float:vehiclehealth;
  GetVehicleHealth(vehid, vehiclehealth);
  if(IsPlayerInAnyVehicle(playerid) && vehiclehealth <= 300){
    SetVehicleHealth(vehid, 300);
    TogglePlayerControllable(playerid, 0);
    SendClientMessage(playerid, RED, "The vehicle is broken. Press F or return to step out of the vehicle." );
    }
I've also done a onplayerkeychange or what it is so that if someone presses F or Return inside a vehicle they get unfrozen and removed from the vehicle.
Reply


Messages In This Thread
Prevent a vehicle from exploding? - by Kyle_Olsen - 11.11.2010, 12:10
Re: Prevent a vehicle from exploding? - by Celson - 11.11.2010, 12:14
Re: Prevent a vehicle from exploding? - by Kyle_Olsen - 11.11.2010, 12:18
Re: Prevent a vehicle from exploding? - by Flyfishes - 11.11.2010, 12:31
Re: Prevent a vehicle from exploding? - by Kyle_Olsen - 11.11.2010, 12:49
Re: Prevent a vehicle from exploding? - by Mike Garber - 11.11.2010, 13:31
Re: Prevent a vehicle from exploding? - by playbox12 - 11.11.2010, 14:38
Re: Prevent a vehicle from exploding? - by The_Moddler - 11.11.2010, 14:45
Re: Prevent a vehicle from exploding? - by playbox12 - 11.11.2010, 14:59
Re: Prevent a vehicle from exploding? - by The_Moddler - 11.11.2010, 15:15

Forum Jump:


Users browsing this thread: 3 Guest(s)