Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    UnrealSkybox's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0

    NoRecoil Lua Help?

    if GD.bools["norecoil"] then
    if wep.Recoil != 0 then
    wep.OldRecoil = wep.Recoil
    wep.Recoil = 0
    end
    if wep.Primary.Recoil != 0 then
    wep.Primary.OldRecoil = wep.Primary.Recoil
    wep.Primary.Recoil = 0
    end
    if wep.Secondary.Recoil != 0 then
    wep.Secondary.OldRecoil = wep.Secondary.Recoil
    wep.Secondary.Recoil = 0
    end

    if wep.Spread != 0.1 then
    wep.OldSpread = wep.Spread
    wep.Spread = 0.1
    end
    if wep.Primary.Spread != 0.1 then
    wep.Primary.OldSpread = wep.Primary.Spread
    wep.Primary.Spread = 0.1
    end
    if wep.Primary.Spread != 0.1 then
    wep.Secondary.OldSpread = wep.Secondary.Spread
    wep.Primary.Spread = 0.1
    end

    if wep.Cone != 0 then
    wep.OldCone = wep.Cone
    wep.Cone = 0
    end
    if wep.Primary.Cone != 0 then
    wep.Primary.OldCone = wep.Primary.Cone
    wep.Primary.Cone = 0
    end
    if wep.Secondary.Cone != 0 then
    wep.Secondary.OldCone = wep.Secondary.Cone
    wep.Secondary.Cone = 0
    end
    else
    wep.OldRecoil = wep.OldRecoil or wep.Recoil
    wep.Recoil = wep.OldRecoil
    wep.Primary.OldRecoil = wep.Primary.OldRecoil or wep.Primary.Recoil
    wep.Primary.Recoil = wep.Primary.OldRecoil
    wep.Secondary.OldRecoil = wep.Secondary.OldRecoil or wep.Secondary.Recoil
    wep.Secondary.Recoil = wep.Secondary.OldRecoil

    wep.OldSpread = wep.OldSpread or wep.Spread
    wep.Spread = wep.OldSpread
    wep.Primary.OldSpread = wep.Primary.OldSpread or wep.Primary.Spread
    wep.Primary.Spread = wep.Primary.OldSpread
    wep.Secondary.OldSpread = wep.Secondary.OldSpread or wep.Secondary.Spread
    wep.Secondary.Spread = wep.Secondary.OldSpread

    wep.OldCone = wep.OldCone or wep.Cone
    wep.Cone = wep.OldCone
    wep.Primary.OldCone = wep.Primary.OldCone or wep.Primary.Cone
    wep.Primary.Cone = wep.Primary.OldCone
    wep.Secondary.OldCone = wep.Secondary.OldCone or wep.Secondary.Cone
    wep.Secondary.Cone = wep.Secondary.OldCone
    end
    end



    This is the code! I need help to fix so I can just lua_openscript_cl norecoil.lua but I keep getting lua errors I don't know how to fix it anyone know how please put it in a pastebin or replay thanks . I got this from the leaked gdaap it's a really good but it's really shitty. I just want the norecoil to work just as a simple script whenever I shoot.
    Last edited by UnrealSkybox; 01-23-2014 at 10:31 PM.

  2. #2
    TheMikuChibi's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Around the World
    Posts
    209
    Reputation
    10
    Thanks
    593
    My Mood
    Flirty
    Quote Originally Posted by UnrealSkybox View Post
    leaked gdaap it's a really good but it's really shitty.
    So it's good and shitty ?

    Code:
    hook.Add("Think","C+P NoRecoil from gayDaap",function()
    
    if wep.Recoil != 0 then
    wep.OldRecoil = wep.Recoil
    wep.Recoil = 0
    end
    if wep.Primary.Recoil != 0 then
    wep.Primary.OldRecoil = wep.Primary.Recoil
    wep.Primary.Recoil = 0
    end
    if wep.Secondary.Recoil != 0 then
    wep.Secondary.OldRecoil = wep.Secondary.Recoil
    wep.Secondary.Recoil = 0
    end
    
    end)
    Last edited by TheMikuChibi; 01-24-2014 at 12:16 AM.

  3. #3
    UnrealSkybox's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    The hack gdaap the original is really bad I get 150 fps all the way to 30 fps :/ other hacks I just go down by tell It hits 100 fps. But the norecoil is good it works like on every gun. I use this on deathlegends. The leak is better cause the norecoil works. The original thingy where you have to download and signup thingy with the hwid shit it's really bad the no recoil won't work. I just want this to work as a cvar or just I open the lua script. I need help with this. I don't know much I did a lot stuff to get it to work but didn't do anything. Sorry for English not really good in English.




    TEST [lua/lenny.lua][lua/norecoil.lua]

    [ERROR] lua/norecoil.lua:3: attempt to index global 'wep' (a nil value)
    1. v - lua/norecoil.lua:3
    2. unknown - lua/includes/modules/hook.lua:82

    is it the lenny? Or just not working properly?
    Last edited by UnrealSkybox; 01-24-2014 at 06:16 AM.

  4. #4
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Code:
    local function norecoil()
            if LocalPlayer():GetActiveWeapon():Clip1() > 0  then
                    if LocalPlayer():GetActiveWeapon().Recoil then
                            LocalPlayer():GetActiveWeapon().Recoil = 0
                    end
                    if LocalPlayer():GetActiveWeapon().Primary.Recoil then
                            LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
                    end
            end
    end
    hook.Add("PlayerSwitchWeapon", "norecoil", norecoil)
    local function nospread()
            if LocalPlayer():GetActiveWeapon():Clip1() > 0 then
                    if LocalPlayer():GetActiveWeapon().Cone then
                            LocalPlayer():GetActiveWeapon().Cone = 0
                    end
                    if LocalPlayer():GetActiveWeapon().Primary.Cone then
                            LocalPlayer():GetActiveWeapon().Primary.Cone = 0
                    end
            end
    end
    hook.Add("PlayerSwitchWeapon", "nospread", nospread)
    enjoy
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  5. #5
    BigBadWilly's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Canada,Ontario
    Posts
    631
    Reputation
    10
    Thanks
    160
    My Mood
    Relaxed
    Tried with CS Weapons,Darkrp Weapons,M9k it no work.

  6. #6
    TheMikuChibi's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Around the World
    Posts
    209
    Reputation
    10
    Thanks
    593
    My Mood
    Flirty
    @Trollaux You can't make a NoSpread using Lua. Also your norecoil only affects Primary Weapons and not Secondary ones.

    Fixed Code:

    Code:
    hook.Add("Think","C+P NoRecoil from gayDaap",function()
    
    local wep = LocalPlayer():GetActiveWeapon()
    
    if wep.Recoil != 0 then
    wep.OldRecoil = wep.Recoil
    wep.Recoil = 0
    end
    if wep.Primary.Recoil != 0 then
    wep.Primary.OldRecoil = wep.Primary.Recoil
    wep.Primary.Recoil = 0
    end
    if wep.Secondary.Recoil != 0 then
    wep.Secondary.OldRecoil = wep.Secondary.Recoil
    wep.Secondary.Recoil = 0
    end
    
    end)
    Last edited by Xenocide; 01-24-2014 at 11:07 AM. Reason: I like ponies

  7. #7
    Gray's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Sweden
    Posts
    13,552
    Reputation
    2516
    Thanks
    10,624
    Miku, seriously.
    There is no need what so ever to call people stupid.
    People will always have different knowledge about different things, that's life.

    Get over it.

  8. The Following User Says Thank You to Gray For This Useful Post:

    Renamon Toast Crunch (01-27-2014)

  9. #8
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Quote Originally Posted by TheMikuChibi View Post
    @Trollaux You can't make a NoSpread using Lua. Also your norecoil only affects Primary Weapons and not Secondary ones.

    Fixed Code:

    Code:
    hook.Add("Think","C+P NoRecoil from gayDaap",function()
    
    local wep = LocalPlayer():GetActiveWeapon()
    
    if wep.Recoil != 0 then
    wep.OldRecoil = wep.Recoil
    wep.Recoil = 0
    end
    if wep.Primary.Recoil != 0 then
    wep.Primary.OldRecoil = wep.Primary.Recoil
    wep.Primary.Recoil = 0
    end
    if wep.Secondary.Recoil != 0 then
    wep.Secondary.OldRecoil = wep.Secondary.Recoil
    wep.Secondary.Recoil = 0
    end
    
    end)
    I copypaserino'd from some guy and forgot to remove the nospread part.


    @
    I tried optimizing your code for my own purposes of learning lua and trying to get as less errors as possible
    Code:
    local function norecoil()
    	local wep = LocalPlayer():GetActiveWeapon()
    	if wep.Recoil != 0 then
    		wep.Recoil = 0
    	end
    	if wep.Primary != nil then
    		if wep.Primary.Recoil != 0 then
    			wep.Primary.Recoil = 0
    		end
    	end
    	if wep.Secondary != nil then
    		if wep.Secondary.Recoil != 0 then
    			wep.Secondary.Recoil = 0
    		end
    	end
    end
    hook.Add("PlayerSwitchWeapon", "norecoil", norecoil)
    Also, should the hook be in PlayerSwitchWeapon or Think?
    Last edited by Xenocide; 01-24-2014 at 01:45 PM.
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  10. #9
    UnrealSkybox's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    How come I turn on gdaap the leaked with norecoil it works on deathlegends 100% then I use these it don't work. I'm going to use gdaap for now I guess. It works really good. These lua don't give me lua errors but don't work at all.

  11. #10
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    924
    You all know nothing about lua, please learn instead of copy and pasting.

  12. The Following 3 Users Say Thank You to MeepDarknessMeep For This Useful Post:

    Liquidsocks (01-25-2014),TheMikuChibi (01-25-2014),UnrealSkybox (01-24-2014)

  13. #11
    UnrealSkybox's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    .................................................. ..................... Well I guess anyone know how to get the nospread to work?

  14. #12
    Zombeezz's Avatar
    Join Date
    Dec 2012
    Gender
    female
    Location
    professional 1v1er
    Posts
    156
    Reputation
    10
    Thanks
    128
    Quote Originally Posted by UnrealSkybox View Post
    .................................................. ..................... Well I guess anyone know how to get the nospread to work?
    NoSpread doesn't work in lua so you need to make it in c++
    pro 1v1er if you want to 1v1 pm me

    ayy lmao

  15. The Following User Says Thank You to Zombeezz For This Useful Post:

    TheMikuChibi (01-25-2014)

  16. #13
    TheMikuChibi's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Around the World
    Posts
    209
    Reputation
    10
    Thanks
    593
    My Mood
    Flirty
    Quote Originally Posted by Zombeezz View Post
    NoSpread doesn't work in lua so you need to make it in c++
    ^this
    NoSpreadens = C++

  17. #14
    UnrealSkybox's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    Can anyone make nospread with +cc with link for me? I don't know much of C++

  18. #15
    Kellyseveride's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Valve Inc
    Posts
    192
    Reputation
    10
    Thanks
    94
    My Mood
    Angry
    Quote Originally Posted by UnrealSkybox View Post
    Can anyone make nospread with +cc with link for me? I don't know much of C++
    I think your best bet would be to start reading up on some c++ resources.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Info] NoRecoil
    By Genesis2 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 5
    Last Post: 09-18-2011, 08:09 AM
  2. [Request] NoRecoil
    By Nerolol in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 2
    Last Post: 07-15-2011, 02:52 AM
  3. [Help] Can someone add NoRecoil for my DLL?
    By bepokemon in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 3
    Last Post: 07-01-2011, 03:56 PM
  4. [Help Request] Can someone add NoRecoil for my DLL?
    By bepokemon in forum CrossFire Help
    Replies: 4
    Last Post: 06-29-2011, 05:26 PM