Advertisement
Guest User

Override Spawnpoint Script

a guest
Dec 14th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. -- Put this script inside: garrysmod/lua/autorun
  2.  
  3. if (CLIENT) then return end
  4.  
  5. local spawnPositions = {
  6.     Vector(-6785, 8808, -14184),
  7.     Vector(6784, 9066, -14184),
  8.     Vector(6801, 8578, -14184)
  9. }
  10.  
  11. hook.Add("PlayerSpawn", "overrideSpawnpoints", function(ply)
  12.     if (game.GetMap() == "rp_downtown_evilmelon_v3") then
  13.         timer.Simple(0.001, function()
  14.             local randomPosition = table.Random(spawnPositions)
  15.             ply:SetPos(randomPosition)
  16.         )
  17.     end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement