Xwad Posted August 7, 2015 Share Posted August 7, 2015 Hi i want to make a script that makes possible that the vehicle will only blow if it has 0 % hp. Becaouse the vehicles blows if the hp is under 250%. What functions need i use for that? Link to comment
GTX Posted August 7, 2015 Share Posted August 7, 2015 You can't. You can only "fake" value. local healthValue = (getElementHealth(vehicle)-250)/750*100 This will get vehicle's health 0-100. Link to comment
Xwad Posted August 7, 2015 Author Share Posted August 7, 2015 ohh ok thanks.And one more question. How can i make that if i shoot with the rhino something (fir example an object) then the bullet will not blow? (i want to disable the rhinos bullet explosion if its hit something) Link to comment
LabiVila Posted August 7, 2015 Share Posted August 7, 2015 You can just unbind the keys which it fires, so the rinho won't be able to shot at all Link to comment
Moderators IIYAMA Posted August 8, 2015 Moderators Share Posted August 8, 2015 You can cancel the bullet explosion like this: addEventHandler("onClientExplosion",root, function (x,y,z,explosionType) if source == localPlayer and explosionType == 10 then local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle and getElementMode(vehicle) == 432 then cancelEvent() end end end) But how you want to check if it hits an object is up to you. 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