From 4e2826af07ea4b3d19ab17635bfc1d4c11c26549 Mon Sep 17 00:00:00 2001 From: Niek <32094562+niekschoemaker@users.noreply.github.com> Date: Wed, 9 Nov 2022 03:57:19 +0100 Subject: [PATCH 1/6] Add missing argument and improve documentation I'm not 100% sure as to what the arguments do exactly because the behavior of the native changes depending on whether oal is enabled or not, not sure what's going on there, I'm assuming this is due to the missing argument. Without OAL it always does the non flashing fade in, and with OAL it always does the flashing fade in, even though this is not the actual missing argument. --- NETWORK/NetworkFadeInEntity.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/NETWORK/NetworkFadeInEntity.md b/NETWORK/NetworkFadeInEntity.md index 9393b7acb..e233a33dd 100644 --- a/NETWORK/NetworkFadeInEntity.md +++ b/NETWORK/NetworkFadeInEntity.md @@ -8,17 +8,28 @@ ns: NETWORK void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL state); ``` -``` -state - 0 does 5 fades -state - 1 does 6 fades -native is missing third argument, also boolean, setting to 1 made vehicle fade in slower, probably "slow" as per NETWORK_FADE_OUT_ENTITY -``` +Fade the given entity back in, usually used after the entity has been faded out with [NETWORK_FADE_OUT_ENTITY](#_0xDE564951F95E09ED) + +When used on a entity which isn't invisible or faded out then the native will still work, it will just instanly make the ped invisible before fading in. -``` -NativeDB Added Parameter 3: BOOL slow -``` ## Parameters -* **entity**: -* **state**: +* **entity**: The entity to fade in +* **flash**: When set to true the entity will flash rapidly while fading out +* **slow**: When set to true the fadein will be a little bit slower than normal +## Examples + +```lua +NetworkFadeOutEntity(PlayerPedId(), false, false) +while NetworkIsEntityFading(PlayerPedId()) do + Citizen.Wait(0) +end + +--- Do something like a teleport, or warp into a vehicle + +NetworkFadeInEntity(PlayerPedId(), false, false) +while NetworkIsEntityFading(PlayerPedId()) do + Citizen.Wait(0) +end +``` From 94e447ba2e45a64b7c999acda759e66826b76804 Mon Sep 17 00:00:00 2001 From: Niek <32094562+niekschoemaker@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:25:08 +0100 Subject: [PATCH 2/6] Add arguments to NETWORK_FADE_IN_ENTITY --- NETWORK/NetworkFadeInEntity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NETWORK/NetworkFadeInEntity.md b/NETWORK/NetworkFadeInEntity.md index e233a33dd..167fbde37 100644 --- a/NETWORK/NetworkFadeInEntity.md +++ b/NETWORK/NetworkFadeInEntity.md @@ -5,7 +5,7 @@ ns: NETWORK ```c // 0x1F4ED342ACEFE62D 0x9B9FCD02 -void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL state); +void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL flash, BOOL slow); ``` Fade the given entity back in, usually used after the entity has been faded out with [NETWORK_FADE_OUT_ENTITY](#_0xDE564951F95E09ED) From 9ad6cdac3ceb78a03bdc01d8f080badd37e73bb4 Mon Sep 17 00:00:00 2001 From: Niek <32094562+niekschoemaker@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:59:48 +0100 Subject: [PATCH 3/6] Update NetworkFadeInEntity.md --- NETWORK/NetworkFadeInEntity.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NETWORK/NetworkFadeInEntity.md b/NETWORK/NetworkFadeInEntity.md index 167fbde37..55fd77191 100644 --- a/NETWORK/NetworkFadeInEntity.md +++ b/NETWORK/NetworkFadeInEntity.md @@ -5,18 +5,19 @@ ns: NETWORK ```c // 0x1F4ED342ACEFE62D 0x9B9FCD02 -void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL flash, BOOL slow); +void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL flash); ``` Fade the given entity back in, usually used after the entity has been faded out with [NETWORK_FADE_OUT_ENTITY](#_0xDE564951F95E09ED) When used on a entity which isn't invisible or faded out then the native will still work, it will just instanly make the ped invisible before fading in. +Note that there is another boolean parameter which is missing, when set to true the fade in will be a little bit slower. + ## Parameters * **entity**: The entity to fade in * **flash**: When set to true the entity will flash rapidly while fading out -* **slow**: When set to true the fadein will be a little bit slower than normal ## Examples @@ -28,6 +29,7 @@ end --- Do something like a teleport, or warp into a vehicle +-- Last parameter here is slow, this parameter is missing in decleration NetworkFadeInEntity(PlayerPedId(), false, false) while NetworkIsEntityFading(PlayerPedId()) do Citizen.Wait(0) From c6fe17799ba87519d13eeb4ed5b0e33b3575b789 Mon Sep 17 00:00:00 2001 From: Dillon Skaggs Date: Thu, 8 Aug 2024 23:39:54 -0500 Subject: [PATCH 4/6] Apply suggestions from code review --- NETWORK/NetworkFadeInEntity.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NETWORK/NetworkFadeInEntity.md b/NETWORK/NetworkFadeInEntity.md index 55fd77191..f2eb93139 100644 --- a/NETWORK/NetworkFadeInEntity.md +++ b/NETWORK/NetworkFadeInEntity.md @@ -5,14 +5,15 @@ ns: NETWORK ```c // 0x1F4ED342ACEFE62D 0x9B9FCD02 -void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL flash); +void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL bNetwork); ``` Fade the given entity back in, usually used after the entity has been faded out with [NETWORK_FADE_OUT_ENTITY](#_0xDE564951F95E09ED) When used on a entity which isn't invisible or faded out then the native will still work, it will just instanly make the ped invisible before fading in. -Note that there is another boolean parameter which is missing, when set to true the fade in will be a little bit slower. +**Additional Parameters**: +* **flash**: If set to true the entity will flash while fading in. ## Parameters From ae778465003f9aa08202c7f92c62bcd6e80d43d1 Mon Sep 17 00:00:00 2001 From: Dillon Skaggs Date: Thu, 8 Aug 2024 23:40:14 -0500 Subject: [PATCH 5/6] Apply suggestions from code review --- NETWORK/NetworkFadeInEntity.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/NETWORK/NetworkFadeInEntity.md b/NETWORK/NetworkFadeInEntity.md index f2eb93139..d7ac6b913 100644 --- a/NETWORK/NetworkFadeInEntity.md +++ b/NETWORK/NetworkFadeInEntity.md @@ -18,21 +18,24 @@ When used on a entity which isn't invisible or faded out then the native will st ## Parameters * **entity**: The entity to fade in -* **flash**: When set to true the entity will flash rapidly while fading out +* **network**: When set to true the fade in will be networked. ## Examples ```lua -NetworkFadeOutEntity(PlayerPedId(), false, false) -while NetworkIsEntityFading(PlayerPedId()) do - Citizen.Wait(0) +local playerPed = PlayerPedId() + +-- fade out the player while flashing them +NetworkFadeOutEntity(playerPed, true, false) +while NetworkIsEntityFading(playerPed) do + Wait(0) end --- Do something like a teleport, or warp into a vehicle --- Last parameter here is slow, this parameter is missing in decleration -NetworkFadeInEntity(PlayerPedId(), false, false) -while NetworkIsEntityFading(PlayerPedId()) do - Citizen.Wait(0) +-- while generally frowned upon when you can use natives, this declaration has +-- a missing parameter, which doesn't work without manually invoking. +Citizen.InvokeNative(0x1F4ED342ACEFE62D, playerPed, false, true) +while NetworkIsEntityFading(playerPed) do + Wait(0) end -``` From b8ec5af7c50dcad7756309a2bdda0fb92eac66a1 Mon Sep 17 00:00:00 2001 From: Dillon Skaggs Date: Thu, 8 Aug 2024 23:43:25 -0500 Subject: [PATCH 6/6] fix not renaming network param --- NETWORK/NetworkFadeInEntity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NETWORK/NetworkFadeInEntity.md b/NETWORK/NetworkFadeInEntity.md index d7ac6b913..79e775a5b 100644 --- a/NETWORK/NetworkFadeInEntity.md +++ b/NETWORK/NetworkFadeInEntity.md @@ -18,7 +18,7 @@ When used on a entity which isn't invisible or faded out then the native will st ## Parameters * **entity**: The entity to fade in -* **network**: When set to true the fade in will be networked. +* **bNetwork**: When set to true the fade in will be networked. ## Examples