Skip to content

Commit

Permalink
Update IsPlayerDrivingDangerously.md
Browse files Browse the repository at this point in the history
Added an enum with different violation types.
Added type 0 which I was able to test in-game, it only returns true when driving on paved sidewalks.
  • Loading branch information
4mmonium authored Nov 23, 2023
1 parent 9eb7f9c commit b2c5f4c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions PLAYER/IsPlayerDrivingDangerously.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@ aliases: ["0xF10B44FD479D69F3"]
BOOL _IS_PLAYER_DRIVING_DANGEROUSLY(Player player, int type);
```
Violation types:
```
enum eViolationType {
VT_PAVED_PEDESTRIAN_AREAS = 0,
VT_RUNNING_REDS,
VT_AGAINST_TRAFFIC
};
```
Checks if a player is performing a certain type of traffic violation.
Type 1: Checks if the player is running through reds, takes some time to return true.
Type 2: Checks if the player is driving in the wrong direction.
* Type 0: Checks if the player is driving outside designated road areas pedestrians would walk on (specifically paved sidewalks).
* Type 1: Checks if the player is running through reds, takes some time to return true.
* Type 2: Checks if the player is driving on the wrong side of the road (against traffic).
Used solely in "Al Di Napoli" with type 2 for a voiceline.
## Parameters
* **player**: Player ID
* **type**: 1: Running red lights, 2: Driving against traffic
* **type**: A violation type from 0 to 2 (`eViolationType`).
## Return value
Whether or not the player is actively (moving) driving against traffic
Whether or not the player is actively performing a certain type of traffic violation.

0 comments on commit b2c5f4c

Please sign in to comment.