RoLeXXX Posted January 21 Share Posted January 21 function handbrake (player) local veh = getPedOccupiedVehicle(player) local freezestatus = isElementFrozen(veh) if isPedInVehicle(player) then if getPedOccupiedVehicleSeat(player) == 0 then if freezestatus == false then setElementFrozen(veh,true) outputChatBox("Die Handbremese wurde angezogen!", player, 200, 0, 0) elseif freezestatus == true then setElementFrozen(veh,false) outputChatBox ( "Die Handbremese wurde gelöst!", player, 200, 0, 0 ) end end end end addCommandHandler("brake",handbrake Please give me that command so the car doesn't get damaged. Link to comment
Mkl Posted January 21 Share Posted January 21 hi, https://wiki.multitheftauto.com/wiki/OnClientVehicleDamage If this event is canceled, the vehicle health won't be reduced. Physical damage to the vehicle will remain. Link to comment
xMKHx Posted February 16 Share Posted February 16 You can try this addCommandHandler( "brake", function ( thePlayer ) local theVehicle = getPedOccupiedVehicle( thePlayer ) if ( theVehicle ) then if ( isVehicleDamageProof( theVehicle ) ) then outputChatBox("Your vehicle is no longer damageproof!", thePlayer, 0, 255, 0) setVehicleDamageProof( theVehicle, false ) else outputChatBox("Your vehicle is now damageproof!", thePlayer, 0, 255, 0) setVehicleDamageProof( theVehicle, true ) end end end ) 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