I found something interesting in resources.
https://community.multitheftauto.com/ind ... ls&id=1259
This makes all cars undestroyable
And when i use this
https://community.multitheftauto.com/ind ... ls&id=5711
i cant destroy cars.
its good
And i found this :
function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement )
if (weapon == 31 and hitElement and getElementType(hitElement)=="vehicle") then -- If the weapon is a M4 and the element hit is a vehicle
if getElementHealth(hitElement) >= 1000 then return end -- If the vehicle health is 1000%, don't heal it.
setElementHealth(hitElement, getElementHealth(hitElement)+100) -- Set the vehicle health +100%.
end
end
addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc )
addEventHandler("onResourceStart",resourceRoot,
function ()
setWeaponProperty(31, "pro", "damage", 0)
end)
its a heal gun
it is possible to make it unheal gun ?
Like if i shot 1 time. it minuses 1 HP from vehicle Health
Smt like this : I shot with gun in car 3 times. And car has 997 HP.
It would be great way.
And this: if getElementHealth(hitElement) >= 1000
it will work if car has 1000 HP ? is it possible to make it work on "random" hp, like 997 , 567
Please help .