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
The rules are as they describe the word, if the player breaks them, he can select his punishment, from finishing the mission or sending him a message to comply with it. (How to make a counter that if it ends you lose the mission)
GameRules.VehicleCanNotBeDestroyed()
This function creates a thread that continuously checks if a specified vehicle still exists and has health greater than 0. If the vehicle is destroyed, the onDestroy
function is called.
Example
GameRules.PlayerMustBeInArea()
This rule states that the player MUST stay in the area.
GameRules.PlayerMustBeInVehicle()
This rule states that the player MUST be stabilized in a vehicle and in a defined holding position.
GameRules.PlayerInVehicleMustRespectSpeedLimit()
This rule is flexible, since it indicates that the player must respect an adequate speed, that is, he must not exceed it. (Taxi? Chase missions?)
GameRules.CancelRule()
This function is used to cancel or remove a specific rule that has been previously set up using the ruleName. Different rule names correspond to different types of rules that can be canceled.
Example
Last updated
Was this helpful?