mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Fixed other players blinking when instanced and fixed the collision problem
Since now the invisibility is updated every frame, the collision is only removed in the same frame. I also noticed that the ped order was wrong, because players were colliding when they were in diferent instances.
This commit is contained in:
+3
-3
@@ -193,7 +193,7 @@ end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(10)
|
||||
Citizen.Wait(0)
|
||||
local playerPed = PlayerPedId()
|
||||
|
||||
-- Hide all these players
|
||||
@@ -203,7 +203,7 @@ Citizen.CreateThread(function()
|
||||
if NetworkIsPlayerActive(player) then
|
||||
local otherPlayerPed = GetPlayerPed(player)
|
||||
SetEntityVisible(otherPlayerPed, false, false)
|
||||
SetEntityNoCollisionEntity(playerPed, otherPlayerPed, false)
|
||||
SetEntityNoCollisionEntity(otherPlayerPed, playerPed, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -228,4 +228,4 @@ Citizen.CreateThread(function()
|
||||
Citizen.Wait(500)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user