Jump to content

Cars never fire


Recommended Posts

When the vehicle health gets to a certain point, make the car damage proof.

Use these 2 functions

bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof ) 
float getElementHealth ( element theElement )  

Link to comment
  • 2 weeks later...

use this function to craeate a indestructible car, instead of createVehicle ->

  
-- arguments are the same than createVehicle 
function createIndestructibleVehicle (...) 
      local vehicle = createVehicle (unpack({...}));  -- create vehicle 
      if not vehicle then  
              return false; 
      end; 
      setVehicleDamageProof (vehicle, true);   -- enable damage proof 
      return vehicle; 
end; 
  

example ->

  
-- this creates a indestructible hunter near of the player. 
local pX,pY,pZ = getElementPosition (player); 
createIndestructibleVehicle (425, pX+2, pY+2, pZ); 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...