Sami_~> Posted February 12, 2018 Share Posted February 12, 2018 this is a script when the player select the checkbox it fix the vehicle every time. but when the player has selected the check box it fixing the vehicle for all players not for a alone player. function AutoFix() if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1])) then vehicles = getElementsByType ( "vehicle" ) for vehicleKey,vehicleValue in ipairs(vehicles) do fixVehicle ( vehicleValue ) setTimer ( function() setElementHealth ( vehicleValue, 1000.0 ) end, 10000, 1 ) end end end setTimer( AutoFix, 100, 0 ) Link to comment
URBAN Posted February 12, 2018 Share Posted February 12, 2018 function AutoFix() if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1])) then --vehicles = getElementsByType ( "vehicle" ) -- for vehicleKey,vehicleValue in ipairs(vehicles) do vehicleValue = getPedOccupiedVehicle(localPlayer) if vehicleValue then else return end fixVehicle ( vehicleValue ) setTimer ( function() setElementHealth ( vehicleValue, 1000.0 ) end, 10000, 1 ) --end end end setTimer( AutoFix, 100, 0 ) 1 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