Escape menu with number of players:

ANG :
I would like to display the number of players in the escape menu of my server. However I can’t find the right variable to do this.
If anyone can help me, I’m interested.

THANKS

FR :

J’aimerai afficher le nombre de joueur dans le menu echap de mon serveur. Cependant je ne trouve pas la bonne variable pour le faire.
Si quelqu’un peut m’aider, je suis preneur.

Merci

You can use the following code:

function AddTextEntry(key, value)
	Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end

Citizen.CreateThread(function()
  AddTextEntry('FE_THDR_GTAO', 'This is the text that will be displayed')
end)

This will change this text here in your screenshot.

To adjust the colors (French is blue, FivePD is red etc.) see: Text formatting - Cfx.re Docs

The problem is that the menu does not display the correct number of players (1/64), it does not update. I can’t find the right variable.

" AddTextEntry(‘FE_THDR_GTAO’, “© ~b~French ~w~Paris ~r~FivePD~u~ | ~b~discord.gg/~w~fprp ~u~| ~b~ID : ~w~” … GetPlayerServerId(PlayerId()) … " ~u~ | ~b~" … #GetActivePlayers() … “~w~/~b~64 ~w~Joueurs ~b~en ligne” )
"

You need to update the TextEntry dynamically (In a loop or better use the player events playerDropped and playerConnecting). This events are available on serverside, your server sends to all clients the updated playercount and update the TextEntry.

Salut mec rien à voir avec ton poste mais ta map echap avec le nom des rues fr tu l’as trouvé où ?