pcisoft Posted June 3, 2016 Share Posted June 3, 2016 Hello, I created a fixveh command to let the player fix his vehicle, I want the vehicle get fixed only if it have health lower then 1000 I know that highter then is: Example>=Example but what about lower ?? Thanks Link to comment
MTA Team botder Posted June 3, 2016 MTA Team Share Posted June 3, 2016 http://lua-users.org/wiki/ExpressionsTutorial Look there. (=> Relational expressions) Link to comment
pcisoft Posted June 3, 2016 Author Share Posted June 3, 2016 http://lua-users.org/wiki/ExpressionsTutorialLook there. (=> Relational expressions) Thanks for Rapid Reply and for Informations <3 Link to comment
Gravestone Posted June 4, 2016 Share Posted June 4, 2016 (edited) Nvm Edited June 4, 2016 by Guest Link to comment
Anubhav Posted June 4, 2016 Share Posted June 4, 2016 function fixVehicle(player) local vehicle = getPedOccupiedVehicle(player) if vehicle then local vhealth = getElementHealth(vehicle) if vhealth < 1000 then fixVehicle(vehicle) outputChatBox("Your vehicle has been successfully repaired", player) else return end end end addCommandHandler("repair", fixVehicle) Try this, not tested. Dude he did not ask for the code and the problem is solved. He had a doubt about the operators. Also that untested script won't work. Try to find the problem yourself. 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