fivem icon indicating copy to clipboard operation
fivem copied to clipboard

It is not possible to get players data in the state bag in worlds

Open KAKXER opened this issue 11 months ago • 1 comments

What happened?

I wrote a squad system where the players who are in the squad should receive each other's data in the state bag, but the problem starts from the point that if the players are in different worlds, they cannot receive the other state bag with the player id

Expected result

Please open the access to receive player data all over the world...

Reproduction steps

image

image

image

Importancy

Slight inconvenience

Area(s)

FiveM, Natives

Specific version(s)

FXServer-master SERVER v1.0.0.7277 win32

Additional information

Server Info:

{
    "enhancedHostSupport": true,
    "requestSteamTicket": "on",
    "resources": [
        "hardcap",
        "WarX",
        "yarn",
        "MongoDB",
        "sessionmanager",
        "webpack"
    ],
    "server": "FXServer-master SERVER v1.0.0.7277 win32",
    "vars": {
        "Developers": "FiveStar Development",
        "Discord": "https://discord.5star.codes",
        "Website": "https://5star.codes",
        "gamename": "gta5",
        "locale": "Fa-IR",
        "onesync_enabled": "true",
        "sv_enforceGameBuild": "2944",
        "sv_enhancedHostSupport": "true",
        "sv_lan": "true",
        "sv_maxClients": "5",
        "sv_projectDesc": "Exclusive by FiveStarâ„¢",
        "sv_projectName": "[SV] WarX",
        "sv_pureLevel": "0",
        "sv_scriptHookAllowed": "false",
        "tags": "default, deployer"
    },
    "version": 1787663103
}

KAKXER avatar Mar 10 '24 17:03 KAKXER

That's one of the purposes of Statebag. It only streams data when you are in render distance. Instead of getting the data you want with statebag, you need to do Client -> Server -> Server to all other squad members. I also have a squad system and this is how I do it.

V3SC avatar Mar 10 '24 17:03 V3SC