Spawn at location based on SteamID



I was wondering if it was possible to try and change the spawnpoint in map.lua based on if the user matches an array with SteamIDs e.g. one team in one location and one in another. Whenever I’ve tried it the server seems to load endlessly but I am doing all the code in map.lua, would I need to separate stuff into a server script and then pull it into a map.lua if that is even possible?

Any help would be greatly appreciated :slight_smile:



I just started looking at FiveM but I knew some lua beforehand so I’ll try to help you. seems like something you would want to use. For an example to see how its done in FiveM check out the spawnPlayer function in the [system]\spawnmanager resource