From e499934e727227cee233d8ef84fbb0322f1ec163 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 26 Nov 2023 09:30:46 -0500 Subject: [PATCH] IsPlayerDrivingDangerously (#813) * IsPlayerDrivingAgainstTraffic * Change name * Update IsPlayerDrivingDangerously.md 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. --------- Co-authored-by: ammonia-cfx <38232208+4mmonium@users.noreply.github.com> --- PLAYER/IsPlayerDrivingDangerously.md | 34 ++++++++++++++++++++++++++++ PLAYER/N_0xf10b44fd479d69f3.md | 19 ---------------- 2 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 PLAYER/IsPlayerDrivingDangerously.md delete mode 100644 PLAYER/N_0xf10b44fd479d69f3.md diff --git a/PLAYER/IsPlayerDrivingDangerously.md b/PLAYER/IsPlayerDrivingDangerously.md new file mode 100644 index 000000000..d6a42e84b --- /dev/null +++ b/PLAYER/IsPlayerDrivingDangerously.md @@ -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. diff --git a/PLAYER/N_0xf10b44fd479d69f3.md b/PLAYER/N_0xf10b44fd479d69f3.md deleted file mode 100644 index af9dc590c..000000000 --- a/PLAYER/N_0xf10b44fd479d69f3.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -ns: PLAYER ---- -## _0xF10B44FD479D69F3 - -```c -// 0xF10B44FD479D69F3 0x1E359CC8 -BOOL _0xF10B44FD479D69F3(Player player, int p1); -``` - -``` -Only 1 occurrence. p1 was 2. -``` - -## Parameters -* **player**: -* **p1**: - -## Return value