Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsPlayerDrivingDangerously #813

Merged
merged 3 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions PLAYER/IsPlayerDrivingDangerously.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
ns: PLAYER
aliases: ["0xF10B44FD479D69F3"]
---
## _IS_PLAYER_DRIVING_DANGEROUSLY

```c
// 0xF10B44FD479D69F3 0x1E359CC8
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 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**: A violation type from 0 to 2 (`eViolationType`).

## Return value
Whether or not the player is actively performing a certain type of traffic violation.
19 changes: 0 additions & 19 deletions PLAYER/N_0xf10b44fd479d69f3.md

This file was deleted.

Loading