Skip to content

Commit

Permalink
refactor(game/customization): startPlayerCustomization transitions (#414
Browse files Browse the repository at this point in the history
)

Wait to perform customisation if the screen is faded out, or if
the player is teleporting or switching.
  • Loading branch information
thelindat authored May 6, 2024
1 parent b04f812 commit 6967f9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions game/customization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ function client.getHeading() return playerHeading end

local callback
function client.startPlayerCustomization(cb, conf)
repeat Wait(0) until IsScreenFadedIn() and not IsPlayerTeleportActive() and GetPlayerSwitchState() == 12

playerAppearance = client.getPedAppearance(cache.ped)
playerCoords = GetEntityCoords(cache.ped, true)
playerHeading = GetEntityHeading(cache.ped)
Expand Down

1 comment on commit 6967f9d

@iSentrie
Copy link

@iSentrie iSentrie commented on 6967f9d Jun 14, 2024

Choose a reason for hiding this comment

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

With this code of line:

  1. /pedmenu
  2. try to customize clothing
  3. never loads up

GetPlayerSwitchState() returns 0 for me.

Please sign in to comment.