Qwark Posted August 12, 2014 Share Posted August 12, 2014 Hi, I make a server with friends and we love car chases but cars are destroyed too quickly and must change all the time, so I wonder if there was a script that makes the patriot armoured? I saw the wiki but I'm not a programmer and I do not want to learn to program, I tried to follow this page https://wiki.multitheftauto.com/wiki/On ... icleDamage but to no avail, I understands nothing. So if anyone could help me please? Thanks. Ps: I tried setDamageProof but the car is so indestructible, I just want a stronger car. Link to comment
xXMADEXx Posted August 12, 2014 Share Posted August 12, 2014 Try using this code (client), it should make the Patriot twice as strong: addEventHandler ( "onClientVehicleDamage", root, function ( _, _, loss ) if ( getElementID ( source ) == 470 ) then setElementHealth ( source, getElementHealth ( source ) + math.floor ( loss / 2 ) ) end end ) Link to comment
Qwark Posted August 12, 2014 Author Share Posted August 12, 2014 Thank you, I tried your script but it does not work, the car is still destroyed at the same number of bullets, would you have another idea? For now, so I have two script call server.lua and client.lua with meta.xml file that loads the script, I put your code in client.lua (I also tried the server. lua) but I can not find anything. Link to comment
ahmedo01 Posted August 12, 2014 Share Posted August 12, 2014 i think if you change getElementID to getElementModel it works. addEventHandler ( "onClientVehicleDamage", root, function ( _, _, loss ) if ( getElementModel ( source ) == 470 ) then setElementHealth ( source, getElementHealth ( source ) + math.floor ( loss / 2 ) ) end end ) Link to comment
Qwark Posted August 12, 2014 Author Share Posted August 12, 2014 It works very well, thank you both of you, one for me had learned from a create a resource and one for the script ^^ 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