NetworkFadeInEntity
DocsNetworkFadeInEntity(entity, bNetwork)Description
Fade the given entity back in, usually used after the entity has been faded out with NETWORK_FADE_OUT_ENTITY
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.
Additional Parameters:
- flash: If set to true the entity will flash while fading in.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity to fade in |
bNetwork | BOOL | When set to true the fade in will be networked. |
Quick Snippet: Get Entityentity
entityUse this to obtain an entity handle from the player's aim or crosshair.
-- Get the entity the player is aiming at
local ped = PlayerPedId()
local hit, entity = GetEntityPlayerIsFreeAimingAt(PlayerId())
if hit and entity ~= 0 then
print("Entity: " .. entity)
print("Model: " .. GetEntityModel(entity))
print("Type: " .. GetEntityType(entity)) -- 1=Ped, 2=Vehicle, 3=Object
endReturns
voidThis native does not return a value.
Examples
Official
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
-- 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