Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("Initialize", "Set Cvars", function()
- RunConsoleCommand("sv_gravity", 800)
- RunConsoleCommand("sv_sticktoground", 0)
- RunConsoleCommand("sv_kickerrornum", 0)
- RunConsoleCommand("sv_alltalk", 1)
- RunConsoleCommand("sv_friction", 4)
- RunConsoleCommand("sv_maxvelocity", 9000)
- RunConsoleCommand('sv_airaccelerate', SURF['Config']['AirAccelerate'])
- end)
- function GM:PlayerInitialSpawn(ply)
- ply:SetTeam(2) -- bots
- ply:SetHull( Vector( -16, -16, 0 ), Vector( 16, 16, 60 ) )
- ply:SetViewOffset( Vector( 0, 0, 60 ) )
- ply:SetHullDuck( Vector( -16, -16, 0 ), Vector( 16, 16, SURF["Config"]["CrouchHull"] ))
- ply:SetViewOffsetDucked(Vector( 0, 0, SURF["Config"]["CrouchHull"] ))
- ply:SetWalkSpeed( 250 )
- ply:SetRunSpeed( 250 )
- ply:SetJumpPower( 280 )
- timer.Simple(2, function()
- ply:SendLua('LocalPlayer():SetViewOffset(Vector(0,0, 60))')
- ply:SendLua('LocalPlayer():SetViewOffsetDucked(Vector(0,0, SURF["Config"]["CrouchHull"]))')
- ply:SendLua('LocalPlayer():SetHull( Vector( -16, -16, 0 ), Vector( 16, 16, 60) )')
- ply:SendLua('LocalPlayer():SetHullDuck(Vector(-16,-16,0), Vector( 16, 16, SURF["Config"]["CrouchHull"]))')
- end)
- ply:ConCommand("surf_team_select 1")
- ply:SendLua("chat.AddText(color_white, 'Press F1 to select a team or change your settings.')")
- end
- function GM:PlayerSpawn( ply )
- ply:SetCollisionGroup(COLLISION_GROUP_WEAPON)
- local teamcolor = team.GetColor(ply:Team())
- ply:SetModel( "models/player/group01/male_0" .. math.random( 1, 9 ) .. ".mdl" )
- ply:SetPlayerColor( Vector(teamcolor.r/255, teamcolor.g/255, teamcolor.b/255) )
- ply:Give( "weapon_crowbar" )
- ply:Give( "no_wep" )
- end
- function GM:GetFallDamage() return 0 end
- function GM:PlayerSwitchFlashlight() return true end
- function GM:PlayerShouldTakeDamage() return false end
- function GM:AllowPlayerPickup() return false end
- -- Thanks to ,=,e | Axe for giving me this.
- -- Fixes surf maps that teleport you after a time
- --hook.Add( "InitPostEntity", "Surf.RemoveMapStuff", function()
- -- local e = ents.FindByClass( "trigger_once" )
- -- for _,v in pairs(e) do if IsValid(v) then v:Remove() end end
- -- e = ents.FindByClass( "trigger_multiple" )
- -- for _,v in pairs(e) do if IsValid(v) then v:Remove() end end
- -- e = ents.FindByClass( "logic_timer" )
- -- for _,v in pairs(e) do if IsValid(v) then v:Remove() end end
- --end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement