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 3 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
35 changes: 24 additions & 11 deletions NETWORK/NetworkFadeInEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,33 @@ ns: NETWORK

```c
// 0x1F4ED342ACEFE62D 0x9B9FCD02
void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL state);
void NETWORK_FADE_IN_ENTITY(Entity entity, BOOL flash);
AvarianKnight 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.

Note that there is another boolean parameter which is missing, when set to true the fade in will be a little bit slower.
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved

```
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

## 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

-- Last parameter here is slow, this parameter is missing in decleration
NetworkFadeInEntity(PlayerPedId(), false, false)
while NetworkIsEntityFading(PlayerPedId()) do
Citizen.Wait(0)
end
```
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
Loading