I find this feature so useful for making singleplayer gamemodes or testing resources without hosting a server, but mainly for solo singleplayer custom gamemodes. And just having to type ‘localGame resource_name’ is just annoying, plus localRestart doesn’t reset everything, so i have to add checks to reset some stuff back and remove persistent vehicles/peds/objects which i would’ve expect localRestart would restart the current gamemode and remove everything in the world.
Altrough this might be leftover and i am supposed to use Routing Buckets instead, i still like localGame more, especially you can pause the game and have the singleplayer stuff still exist like it does in a regular Story Mode session which hosting a server wouldn’t provide.
I wish a menu option existed for starting a resource using localGame command, perhaps you can even select multiple resources to include similar to MTA host game feature except that instead of hosting a local multiplayer session, it just launches singleplayer game but with the resources you choose.
Also perhaps one of the built-in resources could be a ‘story-mode’ resource, which just loads you into a recent save game or starts from Prologue, allowing for quick tests altrough i don’t think there is a native to call YSC scripts trough Lua, and we already have Load into Story Mode already and i’d much more prefer to manually remove loading screen and manage where the player spawns myself anyway.
I do am concerned if this can be exploited aswell, what if a client was already in a server prior calling ‘localGame resource_name’? Would that allow for remote-code execution or would that kick them out and start a new singleplayer game with the resource they inputted?
Regardless it would be cool if FiveM expanded upon the ‘localGame’ command
EDIT:
I wonder why FiveM doesn’t add a “host LAN game” feature similar to MTA, where you can select some resources and click start and it will launch a solo session (not singleplayer) but it will allow you to play a multiplayer game on LAN without hosting a dedicated server.
I think the only reason this might not be possible is that the P2P functions R* uses work very differently, and the fact that host-migration is forced and you don’t want non-host player to become the new host when the LAN host disconnects, ofc this can be circumvented by just forcing OneSync to be on on LAN games and implementing a internal disconnect every player if the host player leaves