Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    Quote Originally Posted by Ariaa View Post
    In multi-threaded applications the sleep function will just suspend to thread to the given interval, so if there was a sleep function in Lua, it wouldn't do anything but freeze up.
    if you read it it's running it to type in chat "/sleep"

  2. The Following User Says Thank You to Keepo123 For This Useful Post:

    buckballs (02-08-2016)

  3. #17
    Ariaa's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    99
    Reputation
    10
    Thanks
    115
    Quote Originally Posted by Keepo123 View Post
    if you read it it's running it to type in chat "/sleep"
    I wasn't talking to you.

  4. #18
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    Quote Originally Posted by Ariaa View Post
    I wasn't talking to you.
    Ahh, alright. Mb

  5. The Following User Says Thank You to Keepo123 For This Useful Post:

    buckballs (02-08-2016)

  6. #19
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    559
    My Mood
    Angelic
    Quote Originally Posted by Keepo123 View Post
    Hello, I am fairly new to lua only started for about a week now.
    I've been trying to make a exploit but I need to make it loop so It can be AFKABLE

    Code:
    function kappa()
    timer.Simple( 0.4744, function() RunConsoleCommand("say","/drop" .. " ")  end )
    timer.Simple( 1.4135, function() RunConsoleCommand("say","/sleep" .. " ")  end )
    end
    RunConsoleCommand("use", "WEAPON_IDl")
    concommand.Add ("dupe", kappa )
    I want make this have a constant loop and also have it change weapons if you understand.

    Thanks, Keepo
    Code:
    for i = 1,1337 do 
    RunConsoleCommand("say","/drop" .. " ")
    RunConsoleCommand("say","/sleep" .. " ")
    end

  7. #20
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    Quote Originally Posted by suchisgood View Post
    Code:
    for i = 1,1337 do 
    RunConsoleCommand("say","/drop" .. " ")
    RunConsoleCommand("say","/sleep" .. " ")
    end
    Now, is there away to stop it from keeping doing it?

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

    buckballs (02-08-2016)

  9. #21
    cdr1zzle's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    40
    Quote Originally Posted by Keepo123 View Post
    Now, is there away to stop it from keeping doing it?
    use
    Code:
    break
    to stop the loop

  10. #22
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    Quote Originally Posted by cdr1zzle View Post
    use
    Code:
    break
    to stop the loop
    Is there away I can trigger break? like put it into a function?

    for i = 1,1337 do
    RunConsoleCommand("say","/drop" .. " ")
    RunConsoleCommand("say","/sleep" .. " ")
    end

    function stop()
    break
    end
    concommand.Add ("brk", stop)

    sorry I'm very new to lua
    Last edited by Keepo123; 11-03-2015 at 12:50 PM.

  11. #23
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    559
    My Mood
    Angelic
    Quote Originally Posted by Keepo123 View Post
    Is there away I can trigger break? like put it into a function?

    for i = 1,1337 do
    RunConsoleCommand("say","/drop" .. " ")
    RunConsoleCommand("say","/sleep" .. " ")
    end

    function stop()
    break
    end
    concommand.Add ("brk", stop)

    sorry I'm very new to lua
    Code:
    function stop(p,c,a)
    	for i = 1,tonumber(a[1]) do 
    		RunConsoleCommand("say","/drop" .. " ")
    		RunConsoleCommand("say","/sleep" .. " ")
    	end
    end
    concommand.Add ("brk", stop)
    brk 100
    brk 10

    It'll break after 100, The next one is to break at 10
    Last edited by suchisgood; 11-03-2015 at 01:48 PM.

  12. #24
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    Quote Originally Posted by suchisgood View Post
    Code:
    function stop(p,c,a)
    	for i = 1,tonumber(a[1]) do 
    		RunConsoleCommand("say","/drop" .. " ")
    		RunConsoleCommand("say","/sleep" .. " ")
    	end
    end
    concommand.Add ("brk", stop)
    brk 100
    brk 10

    It'll break after 100, The next one is to break at 10
    Thank you for the reply, and help. But lets say I don't want it do do 100 loops in a second is there away I can delay each loop?

    - - - Updated - - -

    Quote Originally Posted by suchisgood View Post
    Code:
    function stop(p,c,a)
    	for i = 1,tonumber(a[1]) do 
    		RunConsoleCommand("say","/drop" .. " ")
    		RunConsoleCommand("say","/sleep" .. " ")
    	end
    end
    concommand.Add ("brk", stop)
    brk 100
    brk 10

    It'll break after 100, The next one is to break at 10
    Also what would I look up to understand these lines?

    function stop(p,c,a)
    for i = 1,tonumber(a[1])

  13. The Following User Says Thank You to Keepo123 For This Useful Post:

    buckballs (02-08-2016)

  14. #25
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    559
    My Mood
    Angelic
    Quote Originally Posted by Keepo123 View Post
    Thank you for the reply, and help. But lets say I don't want it do do 100 loops in a second is there away I can delay each loop?

    - - - Updated - - -



    Also what would I look up to understand these lines?

    function stop(p,c,a)
    for i = 1,tonumber(a[1])
    Use a timer like this:
    Code:
    function stop(p,c,a)
    	local Time = 0
    	for i = 1,tonumber(a[1]) do 
    		Time = Time + tonumber(a[2])
    		timer.Simple(tonumber(a[3]) + Time, function() 
    			RunConsoleCommand("say","/drop" .. " ")
    			RunConsoleCommand("say","/sleep" .. " ")
    		 end)
    	end
    end
    concommand.Add ("brk", stop)
    
    10 = loop
    2 = the pause between each timer
    10 is the delay in seconds + Time
    brk 10 2 10
    So it'll be
    
    10
    12
    14
    16
    18
    
    brk 10 5 10
    
    10
    15
    20
    25
    30

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

    Margen67 (11-07-2015)

  16. #26
    D3M0L1T10N's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    1,364
    Reputation
    19
    Thanks
    656
    Quote Originally Posted by suchisgood View Post
    Use a timer like this:
    Code:
    function stop(p,c,a)
    	local Time = 0
    	for i = 1,tonumber(a[1]) do 
    		Time = Time + tonumber(a[2])
    		timer.Simple(tonumber(a[3]) + Time, function() 
    			RunConsoleCommand("say","/drop" .. " ")
    			RunConsoleCommand("say","/sleep" .. " ")
    		 end)
    	end
    end
    concommand.Add ("brk", stop)
    
    10 = loop
    2 = the pause between each timer
    10 is the delay in seconds + Time
    brk 10 2 10
    So it'll be
    
    10
    12
    14
    16
    18
    
    brk 10 5 10
    
    10
    15
    20
    25
    30
    using a for loop and timer.simple instead of using timer.create = ez
    8:53 PM - Xenomorphic 1 hr 7 min cooldown: So is MPGH only exist so people can c+p from ************* and troll the gmod section?

    [IMG]https://i739.photobucke*****m/albums/xx38/jorroa5990/flatexch2_zpsec96a7e2.gif[/IMG]

  17. #27
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    Quote Originally Posted by suchisgood View Post
    Use a timer like this:
    Code:
    function stop(p,c,a)
    	local Time = 0
    	for i = 1,tonumber(a[1]) do 
    		Time = Time + tonumber(a[2])
    		timer.Simple(tonumber(a[3]) + Time, function() 
    			RunConsoleCommand("say","/drop" .. " ")
    			RunConsoleCommand("say","/sleep" .. " ")
    		 end)
    	end
    end
    concommand.Add ("brk", stop)
    
    10 = loop
    2 = the pause between each timer
    10 is the delay in seconds + Time
    brk 10 2 10
    So it'll be
    
    10
    12
    14
    16
    18
    
    brk 10 5 10
    
    10
    15
    20
    25
    30
    Thank you very much!

  18. #28
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    559
    My Mood
    Angelic
    Quote Originally Posted by Keepo123 View Post
    Thank you very much!
    your welcome ^^

  19. #29
    Keepo123's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    m͏̺͓̲̥̪is̷t̞̖͍͚̤k̥B̸̼&#81
    Posts
    84
    Reputation
    10
    Thanks
    163
    My Mood
    Yeehaw
    FYI if you're looking at this still, You could use timer.Create
    But the way suchisgood is also very good to know when not working with stuff GLUA related.

  20. The Following User Says Thank You to Keepo123 For This Useful Post:

    buckballs (02-08-2016)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. how 2 hack for crossfire???
    By rob2310 in forum Hardware & Software Support
    Replies: 0
    Last Post: 05-31-2009, 12:46 PM
  2. How to code for Warrock
    By Ariez in forum Programming Tutorials
    Replies: 1
    Last Post: 05-31-2009, 02:16 AM
  3. How to code for Warrock
    By Ariez in forum WarRock - International Hacks
    Replies: 18
    Last Post: 04-04-2009, 04:55 PM
  4. How's this for a first time hack?
    By nukeist_ in forum WarRock - International Hacks
    Replies: 12
    Last Post: 08-23-2007, 09:25 PM
  5. how much longer for updates?
    By cjg333 in forum WarRock - International Hacks
    Replies: 9
    Last Post: 07-19-2007, 06:07 AM