Results 1 to 3 of 3
  1. #1
    DeVoExploiter's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    34

    Question Clientside Noclip

    how can i make a Clientside noclip with lua? I saw few hacks with that function but it doenst work

  2. #2
    pasquam076's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    30
    I'm pretty sure creds go to RabidToaster for this one

    Code:
    local SW = {}
     
    SW.Enabled = false
    SW.ViewOrigin = Vector( 0, 0, 0 )
    SW.ViewAngle = Angle( 0, 0, 0 )
    SW.Velocity = Vector( 0, 0, 0 )
     
    function SW.CalcView( ply, origin, angles, fov )
            if ( !SW.Enabled ) then return end
            if ( SW.SetView ) then
                    SW.ViewOrigin = origin
                    SW.ViewAngle = angles
                   
                    SW.SetView = false
            end
            return { origin = SW.ViewOrigin, angles = SW.ViewAngle }
    end
    hook.Add( "CalcView", "SpiritWalk", SW.CalcView )
     
    function SW.CreateMove( cmd )
            if ( !SW.Enabled ) then return end
           
            // Add and reduce the old velocity.
            local time = FrameTime()
            SW.ViewOrigin = SW.ViewOrigin + ( SW.Velocity * time )
            SW.Velocity = SW.Velocity * 0.95
           
            // Rotate the view when the mouse is moved.
            local sensitivity = 0.022
            SW.ViewAngle.p = math.Clamp( SW.ViewAngle.p + ( cmd:GetMouseY() * sensitivity ), -89, 89 )
            SW.ViewAngle.y = SW.ViewAngle.y + ( cmd:GetMouseX() * -1 * sensitivity )
           
            // What direction we're going to move in.
            local add = Vector( 0, 0, 0 )
            local ang = SW.ViewAngle
            if ( cmd:KeyDown( IN_FORWARD ) ) then add = add + ang:Forward() end
            if ( cmd:KeyDown( IN_BACK ) ) then add = add - ang:Forward() end
            if ( cmd:KeyDown( IN_MOVERIGHT ) ) then add = add + ang:Right() end
            if ( cmd:KeyDown( IN_MOVELEFT ) ) then add = add - ang:Right() end
            if ( cmd:KeyDown( IN_JUMP ) ) then add = add + ang:Up() end
            if ( cmd:KeyDown( IN_DUCK ) ) then add = add - ang:Up() end
           
            // Speed.
            add = add:GetNormal() * time * 500
            if ( cmd:KeyDown( IN_SPEED ) ) then add = add * 2 end
           
            SW.Velocity = SW.Velocity + add
           
            // This stops us looking around crazily while spiritwalking.
            if ( SW.LockView == true ) then
                    SW.LockView = cmd:GetViewAngles()
            end
            if ( SW.LockView ) then
                    cmd:SetViewAngles( SW.LockView )
            end
           
            // This stops us moving while spiritwalking.
            cmd:SetForwardMove( 0 )
            cmd:SetSideMove( 0 )
            cmd:SetUpMove( 0 )
    end
    hook.Add( "CreateMove", "SpiritWalk", SW.CreateMove )
     
    function SW.Toggle()
            SW.Enabled = !SW.Enabled
            SW.LockView = SW.Enabled
            SW.SetView = true
           
            local status = { [ true ] = "ON", [ false ] = "OFF" }
            print( "SpiritWalk " .. status[ SW.Enabled ] )
    end
    concommand.Add( "sw_toggle", SW.Toggle )
     
    concommand.Add( "sw_pos", function() print( SW.ViewOrigin ) end )
    sw_toggle to use it.

  3. #3
    DeVoExploiter's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    34
    Quote Originally Posted by pasquam076 View Post
    I'm pretty sure creds go to RabidToaster for this one

    Code:
    local SW = {}
     
    SW.Enabled = false
    SW.ViewOrigin = Vector( 0, 0, 0 )
    SW.ViewAngle = Angle( 0, 0, 0 )
    SW.Velocity = Vector( 0, 0, 0 )
     
    function SW.CalcView( ply, origin, angles, fov )
            if ( !SW.Enabled ) then return end
            if ( SW.SetView ) then
                    SW.ViewOrigin = origin
                    SW.ViewAngle = angles
                   
                    SW.SetView = false
            end
            return { origin = SW.ViewOrigin, angles = SW.ViewAngle }
    end
    hook.Add( "CalcView", "SpiritWalk", SW.CalcView )
     
    function SW.CreateMove( cmd )
            if ( !SW.Enabled ) then return end
           
            // Add and reduce the old velocity.
            local time = FrameTime()
            SW.ViewOrigin = SW.ViewOrigin + ( SW.Velocity * time )
            SW.Velocity = SW.Velocity * 0.95
           
            // Rotate the view when the mouse is moved.
            local sensitivity = 0.022
            SW.ViewAngle.p = math.Clamp( SW.ViewAngle.p + ( cmd:GetMouseY() * sensitivity ), -89, 89 )
            SW.ViewAngle.y = SW.ViewAngle.y + ( cmd:GetMouseX() * -1 * sensitivity )
           
            // What direction we're going to move in.
            local add = Vector( 0, 0, 0 )
            local ang = SW.ViewAngle
            if ( cmd:KeyDown( IN_FORWARD ) ) then add = add + ang:Forward() end
            if ( cmd:KeyDown( IN_BACK ) ) then add = add - ang:Forward() end
            if ( cmd:KeyDown( IN_MOVERIGHT ) ) then add = add + ang:Right() end
            if ( cmd:KeyDown( IN_MOVELEFT ) ) then add = add - ang:Right() end
            if ( cmd:KeyDown( IN_JUMP ) ) then add = add + ang:Up() end
            if ( cmd:KeyDown( IN_DUCK ) ) then add = add - ang:Up() end
           
            // Speed.
            add = add:GetNormal() * time * 500
            if ( cmd:KeyDown( IN_SPEED ) ) then add = add * 2 end
           
            SW.Velocity = SW.Velocity + add
           
            // This stops us looking around crazily while spiritwalking.
            if ( SW.LockView == true ) then
                    SW.LockView = cmd:GetViewAngles()
            end
            if ( SW.LockView ) then
                    cmd:SetViewAngles( SW.LockView )
            end
           
            // This stops us moving while spiritwalking.
            cmd:SetForwardMove( 0 )
            cmd:SetSideMove( 0 )
            cmd:SetUpMove( 0 )
    end
    hook.Add( "CreateMove", "SpiritWalk", SW.CreateMove )
     
    function SW.Toggle()
            SW.Enabled = !SW.Enabled
            SW.LockView = SW.Enabled
            SW.SetView = true
           
            local status = { [ true ] = "ON", [ false ] = "OFF" }
            print( "SpiritWalk " .. status[ SW.Enabled ] )
    end
    concommand.Add( "sw_toggle", SW.Toggle )
     
    concommand.Add( "sw_pos", function() print( SW.ViewOrigin ) end )
    sw_toggle to use it.
    thx im gonna try

    - - - Updated - - -

    please #closethread

Similar Threads

  1. Clientside noclip?
    By Panda978 in forum Garry's Mod Discussions & Help
    Replies: 6
    Last Post: 09-15-2013, 03:03 PM
  2. adding noclip to patch
    By ndirishassassin in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 12
    Last Post: 08-22-2011, 05:55 PM
  3. Crysis2 v1.9 noclip-ammo-energy-nametags CODE HELP
    By Tony36609 in forum Crysis 2 Help
    Replies: 1
    Last Post: 07-31-2011, 06:37 AM
  4. ALERT!!! [[Release] NoClip/Ghost]] IS A VIRUS
    By Legify in forum Combat Arms Discussions
    Replies: 84
    Last Post: 09-03-2009, 08:37 PM
  5. [tut] how to remove flame filter [tut] CLIENTSIDED!
    By Sjoerd in forum WarRock - International Hacks
    Replies: 21
    Last Post: 03-18-2009, 04:44 AM