Darkrp player spawns

So I have a server that runs darkrp on downtown and I wanna know if there is a script built in darkrp where i can set multiple spawns so that its random each time they spawn, and if there’s not can someone make one?

In more depth, in case you don’t understand what I’m trying to say:

If a citizen spawns at point A of the map normally, I want him to be able to spawn at point B of the map sometimes, but its completely random so he/she doesn’t know where their going to spawn.

Edit the map by placing more spawn points, then save the map with different name. (example: rp_downtown_v2_poop)

After just upload the new version to the server.


And todd, you should probably just edit the static_data.lua file.

Is there an easier command through console that can be done on the server, then going to static_data.lua?

[lua]local PlayerSpawns = {
Vector(…vector…) }
hook.Add(“PlayerSpawn”, “DoRandomSpawns”, function(ply)
return table.Random(PlayerSpawns)

Something like this? Replace …vector… with the vectors, by typing getpos in console. Then save this code as .lua and place it in darkrp/gamemode/modules, and see if it works.

         table.insert(team_spawn_positions, {"rp_downtown_v2", TEAM_CITIZEN, -548.1580, 1445.1908, 0.0313})

I found that in static_data.lua but I got like 10 jobs and 5 different spawn positions so how do I make multiple spawns?

So Kaleb your script doesn’t work anything else that might work?



Don’t edit static_data.lua. There’s a chat command.

/setspawn <team command> to reset spawn points and set it there.
/setspawn medic
/setspawn citizen

/addspawn <team command> to add a spawn:
/addspawn medic
/addspawn citizen

/removespawn <team command> to remove last added spawn.

thanks man thats what i was looking for