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: [url]https://facepunch.com/showthread.php?t=1109722[/url]
[QUOTE=pssLuke;50995363][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PLAYER/Spawn]PLAYER:Spawn[/url]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetPos]Entity:SetPos[/url][/QUOTE]
That dosnt help me so much since i dont know how to code lua.
[QUOTE=stonehatch;50998996]i dont know how to code lua[/QUOTE]
Why are you on this forum then mate
[editline]4th September 2016[/editline]
[CODE]
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 )
[/CODE]
[QUOTE=MPan1;50999023]Why are you on this forum then mate
[editline]4th September 2016[/editline]
[CODE]
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 )
[/CODE][/QUOTE]
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 [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/game/GetMap]game.GetMap[/url], e.g.
[CODE]
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
end )
[/CODE]
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.
[QUOTE=stonehatch;51009188]i need somthing that can let me choose a spawn per map with somthing like !setspawn or somthing like that[/QUOTE]
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
[QUOTE=MPan1;51012722]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[/QUOTE]
Thanks alot for the code it worked :) 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! :)
[QUOTE=stonehatch;51013059]Thanks alot for the code it worked :) 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! :)[/QUOTE]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/SetEyeAngles]Player:SetEyeAngles[/url]
[QUOTE=SteppuFIN;51013177][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/SetEyeAngles]Player:SetEyeAngles[/url][/QUOTE]
I already figured it out but thanks anyways :)
Sorry, you need to Log In to post a reply to this thread.