Advertisement
Guest User

Untitled

a guest
Nov 27th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. AddCSLuaFile( "shared.lua" )
  2. AddCSLuaFile( "cl_init.lua" )
  3.  
  4. include( "shared.lua" )
  5.  
  6. function GM:PlayerSelectSpawn( ply )
  7.  
  8. local spawns = ents.FindByClass( "info_player_counterterrorist" )
  9.     local random = math.random(spawns)
  10.    
  11. if ply:Team() == 1
  12. then
  13.  
  14. elseif ply:Team() == 3
  15. then
  16.  
  17. spawns[random]
  18.  
  19.     end
  20.  
  21. local spawns = ents.FindByClass( "info_player_terrorist" )
  22.     local random = math.random(spawns)
  23.    
  24.     if ply:Team() == 2
  25.    
  26.     spawns[random]
  27.    
  28.     end
  29.  
  30. end
  31.    
  32. function GM:PlayerInitialSpawn( ply )
  33.  
  34.     RunConsoleCommand( "changeteam" )
  35.  
  36. end
  37.  
  38. function GM:PlayerLoadout( ply )
  39.  
  40.         ply:StripWeapons()
  41.        
  42.         if ply:Team() == 1 then
  43.                 ply:StripWeapons()
  44.  
  45.         elseif ply:Team() == 2 then
  46.                 ply:Give( "weapon_crowbar" )
  47.                 ply:SetModel( "models/player/kliener.mdl" )
  48.  
  49.         elseif ply:Team() == 3 then
  50.                 ply:Give( "weapon_crowbar" )
  51.                 ply:SetModel( "models/player/barney.mdl" )
  52.  
  53.     end
  54.  
  55. end
  56.  
  57. function ghost( ply )
  58.     ply:SetTeam( 1 )
  59. end
  60.  
  61. function death( ply )
  62.     ply:SetTeam( 2 )
  63. end
  64.  
  65. function surviver( ply )
  66.     ply:SetTeam( 3 )
  67. end
  68.  
  69. concommand.Add( "Spectator", ghost )
  70. concommand.Add( "Death", death )
  71. concommand.Add( "Surviver", surviver )
  72.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement