Guest Posted December 8, 2016 Share Posted December 8, 2016 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
Mr.Loki Posted December 13, 2016 Share Posted December 13, 2016 try this: local vehicleHealthMultiplier = 3 addEventHandler( "onClientVehicleDamage", root, function ( _,_, loss ) cancelEvent( ) setElementHealth( source, getElementHealth(source)-(loss/vehicleHealthMultiplier) ) end ) Link to comment
Guest Posted December 14, 2016 Share Posted December 14, 2016 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
Guest Posted December 16, 2016 Share Posted December 16, 2016 Can you fix this code? Because bullet proof tires Link to comment
AfterAll14 Posted December 19, 2016 Share Posted December 19, 2016 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. Link to comment
Guest Posted December 20, 2016 Share Posted December 20, 2016 (edited) 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 December 20, 2016 by Guest ss Link to comment
aka Blue Posted December 20, 2016 Share Posted December 20, 2016 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. Link to comment
Guest Posted December 20, 2016 Share Posted December 20, 2016 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
AfterAll14 Posted December 20, 2016 Share Posted December 20, 2016 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
Captain Cody Posted December 21, 2016 Share Posted December 21, 2016 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. Link to comment
Guest Posted January 28, 2017 Share Posted January 28, 2017 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
Captain Cody Posted January 28, 2017 Share Posted January 28, 2017 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
Guest Posted January 29, 2017 Share Posted January 29, 2017 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
Guest Posted April 26, 2017 Share Posted April 26, 2017 Sorry for bumping this post. But I have a question, is it possible to add more health to one exclusive car for example Enforcer. ? Link to comment
Guest Posted April 28, 2017 Share Posted April 28, 2017 Do I need to use function SetElementHealth ? Link to comment
Mr.Loki Posted April 29, 2017 Share Posted April 29, 2017 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now