Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1.  
  2. hook.Add("Initialize", "Set Cvars", function()
  3. RunConsoleCommand("sv_gravity", 800)
  4. RunConsoleCommand("sv_sticktoground", 0)
  5. RunConsoleCommand("sv_kickerrornum", 0)
  6. RunConsoleCommand("sv_alltalk", 1)
  7. RunConsoleCommand("sv_friction", 4)
  8. RunConsoleCommand("sv_maxvelocity", 9000)
  9. RunConsoleCommand('sv_airaccelerate', SURF['Config']['AirAccelerate'])
  10. end)
  11.  
  12. function GM:PlayerInitialSpawn(ply)
  13. ply:SetTeam(2) -- bots
  14.  
  15.  
  16. ply:SetHull( Vector( -16, -16, 0 ), Vector( 16, 16, 60 ) )
  17. ply:SetViewOffset( Vector( 0, 0, 60 ) )
  18. ply:SetHullDuck( Vector( -16, -16, 0 ), Vector( 16, 16, SURF["Config"]["CrouchHull"] ))
  19. ply:SetViewOffsetDucked(Vector( 0, 0, SURF["Config"]["CrouchHull"] ))
  20.  
  21. ply:SetWalkSpeed( 250 )
  22. ply:SetRunSpeed( 250 )
  23. ply:SetJumpPower( 280 )
  24.  
  25. timer.Simple(2, function()
  26. ply:SendLua('LocalPlayer():SetViewOffset(Vector(0,0, 60))')
  27. ply:SendLua('LocalPlayer():SetViewOffsetDucked(Vector(0,0, SURF["Config"]["CrouchHull"]))')
  28. ply:SendLua('LocalPlayer():SetHull( Vector( -16, -16, 0 ), Vector( 16, 16, 60) )')
  29. ply:SendLua('LocalPlayer():SetHullDuck(Vector(-16,-16,0), Vector( 16, 16, SURF["Config"]["CrouchHull"]))')
  30. end)
  31.  
  32. ply:ConCommand("surf_team_select 1")
  33. ply:SendLua("chat.AddText(color_white, 'Press F1 to select a team or change your settings.')")
  34. end
  35.  
  36. function GM:PlayerSpawn( ply )
  37. ply:SetCollisionGroup(COLLISION_GROUP_WEAPON)
  38. local teamcolor = team.GetColor(ply:Team())
  39. ply:SetModel( "models/player/group01/male_0" .. math.random( 1, 9 ) .. ".mdl" )
  40. ply:SetPlayerColor( Vector(teamcolor.r/255, teamcolor.g/255, teamcolor.b/255) )
  41. ply:Give( "weapon_crowbar" )
  42. ply:Give( "no_wep" )
  43. end
  44.  
  45. function GM:GetFallDamage() return 0 end
  46. function GM:PlayerSwitchFlashlight() return true end
  47. function GM:PlayerShouldTakeDamage() return false end
  48. function GM:AllowPlayerPickup() return false end
  49.  
  50. -- Thanks to ,=,e | Axe for giving me this.
  51. -- Fixes surf maps that teleport you after a time
  52. --hook.Add( "InitPostEntity", "Surf.RemoveMapStuff", function()
  53. -- local e = ents.FindByClass( "trigger_once" )
  54. -- for _,v in pairs(e) do if IsValid(v) then v:Remove() end end
  55.  
  56. -- e = ents.FindByClass( "trigger_multiple" )
  57. -- for _,v in pairs(e) do if IsValid(v) then v:Remove() end end
  58.  
  59. -- e = ents.FindByClass( "logic_timer" )
  60. -- for _,v in pairs(e) do if IsValid(v) then v:Remove() end end
  61. --end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement