Really need help! (SetSpawn)

I really need help setting spawn point.

Is it possible to do this on a gmod server or if anyone could create somthing that lets me do it?

You see am running a map where i dont want them to spawn when they join an die so i need a addon or script that lets me set a spawnpoint for that map because maps are changing in a rotation and its some maps i want but cant use due to the spawn issue.

I have tried using this one but i didnt work:

still need help!



That dosnt help me so much since i dont know how to code lua.

Why are you on this forum then mate

[editline]4th September 2016[/editline]

hook.Add( 'PlayerSpawn', 'some_name_here', function( ply )
    ply:SetPos( Vector( 12, 34, 56 ) ) -- change the vector to wherever you want them to spawn
end )

Sorry if this was the wrong forum to post this but i still dont know where am supposed to put that and does this work for multiple maps?

Just put it in a new serverside Lua file somewhere like “C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\lua\autorun\server”

And yeah, that’d work for EVERY map. I guess you want it to only work on certain maps, if that’s the case then you could use

game.GetMap, e.g.

hook.Add( 'PlayerSpawn', 'some_name_here', function( ply )
    if game.GetMap() == 'gm_flatgrass' then
        ply:SetPos( Vector( 12, 34, 56 ) ) -- change the vector to wherever you want them to spawn
end )

Depends on ingame or real custom, if ingame go to dakrpr modication > confog > settinfs.lua and enable custom spawns in there. Now go in game and type /setspawn {command to become job}
And /addspawn { command ro become job } to add spawns for a job
You can also use /removespawn { command to become job } to remove a soawn

This is not a darkrp server its a surf server so i need somthing that can let me choose a spawn per map with somthing like !setspawn or somthing like that. Because some maps i want to use spawns them a place i dont want them to spawn.

Then just use the code I posted before, change gm_flatgrass to whatever map name you want custom spawnpoints for, and change the vector to be whatever place you want them to spawn, or make a table of vectors and choose a random one from it

Thanks alot for the code it worked :slight_smile: But is it way i can choose angel? if so can you type what i need to add to make it set the angle aswell?

[editline]7th September 2016[/editline]

Its okay i found out how but thanks alot for the code it really helped me out! :slight_smile:


I already figured it out but thanks anyways :slight_smile: