Skip to content

Commit

Permalink
Add missing argument and improve documentation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
niekschoemaker authored Nov 9, 2022
1 parent 52b486d commit 4e2826a
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions NETWORK/NetworkFadeInEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 4e2826a

Please sign in to comment.