๐น๏ธGame Rules
These rules will work permanently for the duration of the mission (it doesn't matter if you did it in the first stage, it will continue until the last one if you don't cancel them).
How's work
GameRules.VehicleCanNotBeDestroyed()
GM().GameRules.VehicleCanNotBeDestroyed(vehicle, onDestroy)local playerVehicle = GetVehiclePedIsIn(PlayerPedId())
GM().GameRules.VehicleCanNotBeDestroyed(playerVehicle, function()
--- Boom!
-- This functions acts when vehicle is destroyed.
GM().EndGame(true, "Vehicle destroyed")
end)GameRules.PlayerMustBeInArea()
GameRules.PlayerMustBeInVehicle()
GameRules.PlayerInVehicleMustRespectSpeedLimit()
GameRules.CancelRule()
Last updated
