• Spawn Points Script
    4 replies, posted
Anyone got one so that i can set custom Spawn points for sandbox
[url]http://wiki.garrysmod.com/page/GM/PlayerSelectSpawn[/url]
[QUOTE=residualgrub;41848367][url]http://wiki.garrysmod.com/page/GM/PlayerSelectSpawn[/url][/QUOTE] thanks [editline]15th August 2013[/editline] [QUOTE=residualgrub;41848367][url]http://wiki.garrysmod.com/page/GM/PlayerSelectSpawn[/url][/QUOTE] I was thinking of one that you have to put in like Vector(-6863.996094, 13064.443359, -7716.362305) and makes multiple random spawns so you never know where you care going to spawn
This one works but don't copy and paste it exactly. If you do though read through it and make sure you understand how it works. [CODE] if SERVER then local spawns = { Vector(265.764801, 4909.139160, 128.031250), Vector(1421.780029, 4534.892090, 702.572693), Vector(4019.782715, 5666.136719, 580.031250) } function GAMEMODE:PlayerSelectSpawn( ply ) if ply:IsValid() then ply:SetPos(table.Random(spawns)) ply:SetAngles ( Angle( 0, 0, 0 ) ) end end end [/CODE]
[QUOTE=TheEncrypted;41852401]This one works but don't copy and paste it exactly. If you do though read through it and make sure you understand how it works. [CODE] if SERVER then local spawns = { Vector(265.764801, 4909.139160, 128.031250), Vector(1421.780029, 4534.892090, 702.572693), Vector(4019.782715, 5666.136719, 580.031250) } function GAMEMODE:PlayerSelectSpawn( ply ) if ply:IsValid() then ply:SetPos(table.Random(spawns)) ply:SetAngles ( Angle( 0, 0, 0 ) ) end end end [/CODE][/QUOTE] Thank you so much man
Sorry, you need to Log In to post a reply to this thread.