Recommended Posts

Hi ! Can someone do me a favor and make a script that vehicle that has 3000 health like in gta 5 because im angry at gta san andreas because cars explode too fast...

Share this post


Link to post

try this:

local vehicleHealthMultiplier = 3
addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss )
    cancelEvent(  )
    setElementHealth( source, getElementHealth(source)-(loss/vehicleHealthMultiplier) )
end )

 

Share this post


Link to post

Can you make entire resource because i dont understand how to script and other stuff. Please ? 

Im sorry i made by myself. Thank you now it works ! Thanks again ! :)

But i saw one problem. Its bulletproof tires...

Share this post


Link to post

Dude, thousands of slaves are wating to execute everything you say. You just have to be more commanding, cause they are slaves, you know... You have to shout at them to make something happen.

Share this post


Link to post

Can you  f.u.c.k.i.n.g fix this super f.u.c.k.i.n.g. code ? Because i cant shoot f.u.c.k.i.n.g tires , it is bulletproof !!!!!!!!!!!!!!!!!

Edited by viktoras705
ss

Share this post


Link to post
1 hour ago, viktoras705 said:

Can you  f.u.c.k.i.n.g fix this super f.u.c.k.i.n.g. code ? Because i cant shoot f.u.c.k.i.n.g tires , it is bulletproof !!!!!!!!!!!!!!!!!

Be more respetuous, kid.

Share this post


Link to post

But member "AfterAll14" said to shout more ... Ok I will ask nicely.| Can someone remake script of member "loki2143" to normal form, because I can't shoot tires because it is invulnerable , please ? I will be very grateful for this big job, please ? :):):)

 

Share this post


Link to post
local vehicleHealthMultiplier = 3
addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss )
    setElementHealth( source, getElementHealth(source)+(loss((vehicleHealthMultiplier-1)/vehicleHealthMultiplier) )
end )

Try this, though it would may not be working correctly for the first damage call (fixing this would require building some sort of system, which is time costly).

Share this post


Link to post
local vehicleHealthMultiplier = 3
addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss )
    setElementHealth( source, getElementHealth(source)+(loss)-(loss/vehicleHealthMultiplier))
end )

Adds back the lost damage, then removes a 1/3 of what was suppose to be lost.

Share this post


Link to post

That's what I want , CodyJ(L) , Everything is okay, now I can pop tires too.. But...One more problem... When I get destroyed in a car my game (client) crashes, Server is working perfect , but when I get destroyed in a car , or plane or helicopter my game crashes. For example;   I enter hydra then I crash in to a tree then my game crashes.       There is crash information :                     

Version = 1.5.3-release-11151.0.000
Time = Sat Jan 28 22:52:52 2017
Module = C:\Users\Punisher\Desktop\GTA San Andreas\proxy_sa.exe
Code = 0xC0000005
Offset = 0x002B2296

EAX=00863C40  EBX=00110000  ECX=0A894BA8  EDX=00001518  ESI=0A894BA8
EDI=3F800000  EBP=00080000  ESP=0022FBF8  EIP=66253A73  FLG=00210246
CS=001B   DS=0023  SS=0023  ES=0023   FS=003B  GS=0000

:) please help me :)

 

 

 

Share this post


Link to post

Oh didn't take into account blowing up; I'll try to fix  this in a bit.

local vehicleHealthMultiplier = 3
addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss )
if isElement(source) then -- Checks if the vehicle still exists
if getElementHealth(source) > 0 then -- Checks if it's health isn't 0 (blown up)
    setElementHealth( source, getElementHealth(source)+(loss)-(loss/vehicleHealthMultiplier))
		end
	end
end )

 

Share this post


Link to post

Ok, thx, CodyJ(L) Now its perfectly working without any problems :) And I have a question. Is it possible to make destroyable all car's windows ?
 

Now I need help at ;

 

Share this post


Link to post

Sorry for bumping this post. But I have a question, is it possible to add more health to one exclusive car for example Enforcer. ?

Share this post


Link to post

This is the wrong section.

Post in the scripting section next time.

local vehicleDamageTable = {
	-- vehicle ID and damage multiplier
	[427] = 5,-- Enforcer
	[416] = 2 -- Ambulance
}

addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss )
  if isElement(source) then -- Checks if the vehicle still exists
    if getElementHealth(source) > 0 then -- Checks if it's health isn't 0 (blown up)
      local damage = vehicleDamageTable[getElementModel(source)]
      if damage then
        setElementHealth( source, getElementHealth(source)+(loss)-(loss/sp))-- Damage that was set in the table
      else
        setElementHealth( source, getElementHealth(source)+(loss)-(loss/3)) -- Default damage modifier if vehicle not in the table
      end
    end
  end
end)

 

Share this post


Link to post

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.