pcisoft Posted June 3, 2016 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 [CAG]PcIsOft
MTA Team botder Posted June 3, 2016 MTA Team Posted June 3, 2016 http://lua-users.org/wiki/ExpressionsTutorial Look there. (=> Relational expressions) GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
pcisoft Posted June 3, 2016 Author Posted June 3, 2016 http://lua-users.org/wiki/ExpressionsTutorialLook there. (=> Relational expressions) Thanks for Rapid Reply and for Informations <3 [CAG]PcIsOft
Gravestone Posted June 4, 2016 Posted June 4, 2016 (edited) Nvm Edited June 4, 2016 by Guest Clan war system http://sh.st/7r4nI
Anubhav Posted June 4, 2016 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. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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