fix(menu) Fix playernames with invalid chars in name
there are some chars when you have that in your name, the name will no longer be shown at all. The pr will remove the invalid char.
Preview:
Player name:
What's the definition of %w? Sounds a bit vague and not friendly towards scripts that are not alphabetic (Thai, Farsi, Cyrillic, Chinese, etc.).
Ideally we should use the txAdmin cleanPlayerNames() to get the name to be displayed, but the best implementation would be for Cfx to implement a UpdatePlayerName(tempNetId: number, name: string) that could be called by txAdmin at the handling of playerConnecting(), as well as allow other resources to set the player's rank, RP name, etc.
I have tested it with chinese chars, and as you told unfortunately it will remove also that kinda chars. The only thing to fix this is prob gsub specific chars like in the preview seen. Would be beter ofc if cfx fix this.