Advertisement
Guest User

Untitled

a guest
Feb 4th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.97 KB | None | 0 0
  1. AddCSLuaFile( "cl_init.lua" )
  2. AddCSLuaFile( "shared.lua" )
  3. AddCSLuaFile( "specialchars.lua" )
  4.  
  5. include( 'shared.lua' )
  6. include( 'specialchars.lua' )
  7.  
  8. --no fall damage
  9. function GM:GetFallDamage( ply, speed )
  10.  
  11.     return ( 0 )
  12.  
  13. end
  14.  
  15. --no suicide
  16. function GM:CanPlayerSuicide( ply )
  17.  
  18.     return false
  19.  
  20. end
  21.    
  22. --no player death sound
  23. function OverrideDeathSound()
  24.     return true
  25. end
  26. hook.Add("PlayerDeathSound", "OverrideDeathSound", OverrideDeathSound)
  27.    
  28. --on player death
  29.  
  30. function player_initdeath( ply, wep, killer )
  31.    
  32.     ply:PrintMessage( HUD_PRINTCHAT, ply:Nick() .. " has fallen off of the stage.\n")
  33.  
  34. end
  35.  
  36. hook.Add( "PlayerDeath", "player_initalize_dvars", player_initdeath );
  37.  
  38. --on player spawn
  39. function GM:PlayerSpawn( ply )
  40.     self.BaseClass:PlayerSpawn( ply )
  41.    
  42.     RunConsoleCommand( "play", "MBU/spawn_alternate.wav" )
  43.    
  44.     ply:SetGravity ( 1 )
  45.     ply:SetMaxHealth ( 100, true )
  46.    
  47.     ply:SetWalkSpeed ( 325 )
  48.     ply:SetRunSpeed ( 325 )
  49.    
  50. end
  51.    
  52. --on player join
  53. function GM:PlayerInitialSpawn( ply )
  54.     CheckSpecialCharacters( ply )
  55.     if ply:IsAdmin() then
  56.         mbu_team2( ply )
  57.         ply:Spectate( 5 )
  58.         RunConsoleCommand( "mbu_start" )
  59.     else
  60.     joining( ply )
  61.     RunConsoleCommand( "mbu_start" )
  62.     end
  63. end
  64.  
  65. --weapons given on player join team
  66. function GM:PlayerLoadout( ply )
  67.     if ply:Team() == 1 then
  68.        
  69.         // blank because no weapons are used
  70.        
  71.     elseif ply:Team() == 2 then
  72.    
  73.         //blank because no weapons are used
  74.        
  75.     end
  76. end
  77.  
  78. --on player join team Players [1]
  79. function mbu_team1( ply )
  80.  
  81.     ply:UnSpectate()
  82.     ply:SetTeam( 1 )
  83.     ply:Spawn()
  84.     ply:PrintMessage( HUD_PRINTTALK, "[Marble Blast Ultra]Welcome to the server, " .. ply:Nick().. "!")
  85.    
  86. end
  87.  
  88. --on player join team Admins [2]
  89. function mbu_team2( ply )
  90.    
  91.     ply:SetTeam( 2 )
  92.     ply:Spawn()
  93.     ply:PrintMessage( HUD_PRINTTALK, "[Marble Blast Ultra]Admin "  .. ply:Nick().. " Recognized!")
  94.  
  95. end
  96.  
  97. concommand.Add( "mbu_team1", mbu_team1 )
  98.  
  99. --on player join the server pre-team selection
  100. function joining( ply )
  101.  
  102.     RunConsoleCommand( "play", "MBU/spawnwav" )
  103.     ply:Spectate( 5 )
  104.     ply:SetTeam( 3 )
  105.    
  106. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement