Jump to content

Guest

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

Link to comment

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

Link to comment

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 Guest
ss
Link to comment

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 ? :):):)

 

Link to comment
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).

Link to comment
  • 1 month later...

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

 

 

 

Link to comment

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 )

 

Link to comment

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 ;

 

Link to comment
  • 2 months later...

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)

 

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