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

Add missing argument and improve documentation #830

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Changes from 2 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
33 changes: 22 additions & 11 deletions NETWORK/NetworkFadeInEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,31 @@ 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);
niekschoemaker marked this conversation as resolved.
Show resolved Hide resolved
```

```
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
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
* **slow**: When set to true the fadein will be a little bit slower than normal
niekschoemaker marked this conversation as resolved.
Show resolved Hide resolved

## Examples

```lua
NetworkFadeOutEntity(PlayerPedId(), false, false)
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
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
```