Skip to content

Commit

Permalink
fix(network): proper conceal players
Browse files Browse the repository at this point in the history
* fix: seeing/hearing other players in multichar

* fix: playerId
  • Loading branch information
mafewtm committed Nov 15, 2023
1 parent 169016f commit 00db6b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ local function destroyPreviewCam()
DestroyCam(previewCam, true)
RenderScriptCams(false, false, 1, true, true)
FreezeEntityPosition(cache.ped, false)
NetworkConcealPlayer(cache.playerId, false)
end

---@param citizenId? string
Expand Down Expand Up @@ -259,6 +260,7 @@ local function chooseCharacter()
end

FreezeEntityPosition(cache.ped, true)
NetworkConcealPlayer(cache.playerId, true)
Wait(1000)
SetEntityCoords(cache.ped, randomLocation.pedCoords.x, randomLocation.pedCoords.y, randomLocation.pedCoords.z, false, false, false, false)
SetEntityHeading(cache.ped, randomLocation.pedCoords.w)
Expand Down

1 comment on commit 00db6b0

@CarlBishop
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this I do not see the player on multichar
image
And the ped spawn on the multichar position not to last position

Please sign in to comment.