Jump to content

Cars never fire


Recommended Posts

Posted

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 )  

  • 2 weeks later...
Posted

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); 
  

there are two kinds of people: those who know C++ and those who don´t. .)

  • Moderators
Posted

He is requesting, he is only interested in the whole code. (he don't know anything about lua)

Waste of your time....

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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...