Black2 Posted January 16, 2016 Share Posted January 16, 2016 Hello,why this don't work ? I want put Infernus with 50000000 extra health more don't work Thx for you time. function test ( ) local id = getElementModel ( theVehicle ) id == 411 then exports [ "extra_health" ]:setElementExtraHealth(id, 50000000) end addEventHandler("onResourceStart",getRootElement(),test) The Export Script by castillo14 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5195 Link to comment
Chris!i! Posted January 16, 2016 Share Posted January 16, 2016 (edited) u cant use getElementModel for a vehicle use getPedOccupiedVehicle Sorry my code didnt work. Edited January 16, 2016 by Guest Link to comment
John Smith Posted January 16, 2016 Share Posted January 16, 2016 u cant use getElementModel for a vehicleso its function test ( ) local id = getPedOccupiedVehicle ( theVehicle ) id == 411 then exports [ "extra_health" ]:setElementExtraHealth(theVehicle, 50000000) end addEventHandler("onResourceStart",getRootElement(),test) Link to comment
Chris!i! Posted January 16, 2016 Share Posted January 16, 2016 do u need infernus doesnt get damage? Link to comment
Army@1 Posted January 16, 2016 Share Posted January 16, 2016 function test ( ) for i,v in pairs(getElementsByType("vehicle")) do id = getElementModel ( v ) if id == 411 then exports [ "extra_health" ]:setElementExtraHealth(id, 50000000) end end addEventHandler("onResourceStart",getRootElement(),test) 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