1. Post #41
    CapsAdmin's Avatar
    August 2005
    3,971 Posts
    overwriting hook.Call causes crashes with evolve admin mod
    Not if it's done correctly.

    But I wouldn't recommend doing it anyway as it's being called by engine all the time so the more you do in there, the more it's going to affect the FPS. At least noticeably on client.

  2. Post #42
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts


    Updated. Basically fixes pretty much everything wrong with the previous version.

  3. Post #43
    Gold Member
    Adamm's Avatar
    July 2010
    351 Posts
    https://photos-1.dropbox.com/i/l/JyB...378400/79b9fcf

    There is the problem I was talking about with 1.1 but i'll give 1.2 a shot.

    Edited:

    Hook 'Crashed' Failed: autorun\anticrash.lua:134: Tried to use a NULL entity!

  4. Post #44
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    Your image 404'd. I'll fix the null entity error now. I'm not going to release an update for a while though.

  5. Post #45
    jerrylogo's Avatar
    August 2010
    23 Posts
    for some reason it thinks movement is detected and closes anticrash and repeats the tests while a server has been crashed could it be because I am using sharp eye?

  6. Post #46
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    for some reason it thinks movement is detected and closes anticrash and repeats the tests while a server has been crashed could it be because I am using sharp eye?
    That's rather odd. No entities should be moving when the server has crashed.

  7. Post #47
    jerrylogo's Avatar
    August 2010
    23 Posts
    I know, I'm equally puzzled but I have been using it on one server in particular, version 1 worked fine. I've been using it on SNiPE Build RP so idk, maybe some strange on there? I know the server owner is allways making things.

  8. Post #48
    Brandon's Avatar
    December 2009
    629 Posts
    This thing is retarded when I lag a little bit it pops up and when the server crashes it doesn't, when I join a server and its the first few seconds if lag it auto connects me. Things terrible
    Reply With Quote Edit / Delete Reply Canada Show Events Dumb Dumb x 2 (list)

  9. Post #49
    jerrylogo's Avatar
    August 2010
    23 Posts
    I am having the same problem, are you using legs or sharpeye, I'm curios to see if either are related maybe not?

  10. Post #50
    melindagreen's Avatar
    November 2009
    1,563 Posts
    hum may be interesting if it can ba made to prevent crashs. like idk. stopping a bad code before it actually crashs the server or something, maybe not possible though but a neat thought

  11. Post #51
    Brandon's Avatar
    December 2009
    629 Posts
    I am having the same problem, are you using legs or sharpeye, I'm curios to see if either are related maybe not?
    I'm using neither.

  12. Post #52
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    Telling me "LOL DERP DOESN'T WORK" won't help at all. It works fine on all three of my servers, so unless you can give me some specific info, there's nothing i'll be able to do.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1 (list)

  13. Post #53
    jerrylogo's Avatar
    August 2010
    23 Posts
    FlapJack... I am not sure what more info to provide you, do you want a video of what happens? I'm not sure how to use source video recorder but I can find out, I don't know what more information to give you, do you want the messages it throws up in console while it loops opening and closing after the server has crashed?

  14. Post #54
    melindagreen's Avatar
    November 2009
    1,563 Posts
    do you want the messages it throws up in console while it loops opening and closing after the server has crashed?
    Yeah.. That would probably help better than
    "LOL DERP DOESN'T WORK"

  15. Post #55
    jerrylogo's Avatar
    August 2010
    23 Posts
    [AntiCrash] Connection lost - sending ping
    [AntiCrash] Connection down - Did not receive pong
    [AntiCrash] Connection regained - movement detected
    [AntiCrash] Connection lost - sending ping
    [AntiCrash] Connection down - Did not receive pong
    [AntiCrash] Connection regained - movement detected
    [AntiCrash] Connection lost - sending ping
    [AntiCrash] Connection down - Did not receive pong
    [AntiCrash] Connection regained - movement detected

    which while it does this in the console the anticrash gui is opened for a second and then closes and continues spewing these in console, I don't know what if anything else there is to say.

  16. Post #56
    Sora3100's Avatar
    September 2009
    279 Posts
    [AntiCrash] Connection lost - sending ping
    [AntiCrash] Connection down - Did not receive pong
    [AntiCrash] Connection regained - movement detected
    [AntiCrash] Connection lost - sending ping
    [AntiCrash] Connection down - Did not receive pong
    [AntiCrash] Connection regained - movement detected
    [AntiCrash] Connection lost - sending ping
    [AntiCrash] Connection down - Did not receive pong
    [AntiCrash] Connection regained - movement detected

    which while it does this in the console the anticrash gui is opened for a second and then closes and continues spewing these in console, I don't know what if anything else there is to say.
    I have the same problem.

  17. Post #57
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    What were you doing when that happened? Were you stuck in a prop or something?

  18. Post #58
    Sora3100's Avatar
    September 2009
    279 Posts
    What were you doing when that happened? Were you stuck in a prop or something?
    Nope,I was just messing around with the weapons,entities and npcs.

  19. Post #59
    jerrylogo's Avatar
    August 2010
    23 Posts
    it seems it works off and on for me now, perhaps it involved moving the screen or walking and when the server crashes it thinks we are moving? it restarts its cycle every time because it thinks we have movement again right?

  20. Post #60
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    it seems it works off and on for me now, perhaps it involved moving the screen or walking and when the server crashes it thinks we are moving? it restarts its cycle every time because it thinks we have movement again right?
    It only counts velocity. Something in the server must be moving, which it shouldn't be. The only thing I can think of is something setting the velocity clientside - which shouldn't be done except for prediction.

  21. Post #61
    jerrylogo's Avatar
    August 2010
    23 Posts
    okay so what do you suggest we do? delete our cfg files and start new ones or something? the only thing I can think is that I am using sharp eye but besides that it should be mostly all default.

  22. Post #62
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    sharpeye might set velocity clientside or something. I'm not sure really - that should never happen.

  23. Post #63
    jerrylogo's Avatar
    August 2010
    23 Posts
    I will disable sharpeye tomorrow and see if this helps idk what to do if it does I guess we should talk to the author of sharpeye and see if he cant patch it

  24. Post #64
    laxplayer77alt's Avatar
    July 2009
    568 Posts
    thank you!

  25. Post #65
    jerrylogo's Avatar
    August 2010
    23 Posts
    Okay, for everyone that is having similar issues concerned with movement, simply edit the lua and scroll to
    Code:
         for k , v in ipairs(ents.GetAll()) do
                if v:GetVelocity():Length() > 5 then
                    -- Well, not everything's stopped moving.
                    -- 5 incase some props stuck in another prop and is spazzing or something
                    -- It should stop moving, but i'm not entirely sure
                    
                    moving = true <- set that to false
    This should resolve the issue and as far as I can tell, the addon is completely functional.
    Reply With Quote Edit / Delete Reply United States Show Events Zing Zing x 1Lua Helper Lua Helper x 1 (list)

  26. Post #66
    The Kitteh's Avatar
    September 2010
    204 Posts
    U can add my community to the list
    Lazy Crazy Gaming

  27. Post #67
    flutterpie's Avatar
    November 2011
    69 Posts
    Hi, this download is gone on gmod.org - is it possible that you could re-upload this? It'd be really helpful for my community.

  28. Post #68
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    995 Posts
    Hi, this download is gone on gmod.org - is it possible that you could re-upload this? It'd be really helpful for my community.
    https://purifiedrp.com/dl/AntiCrash.rar

    Uploaded on my site for you.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Winner Winner x 3 (list)

  29. Post #69
    flutterpie's Avatar
    November 2011
    69 Posts
    Hi, I was late like a beach, so could you please re-upload? So sorry.

  30. Post #70
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    995 Posts
    Hi, I was late like a beach, so could you please re-upload? So sorry.
    ...only like a month or so

    Link above is now functional again.
    https://purifiedrp.com/dl/AntiCrash.rar
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Funny Funny x 2Friendly Friendly x 1 (list)

  31. Post #71
    flutterpie's Avatar
    November 2011
    69 Posts
    Thank you so much! I love you. No homo

  32. Post #72
    itkuitkzhji's Avatar
    April 2012
    92 Posts
    All download links are offline. Please reupload. :3

  33. Post #73
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    995 Posts
    I really should stop accidentally deleting things.

    https://purifiedrp.com/dl/AntiCrash.rar

    Upped again!
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Friendly Friendly x 2Winner Winner x 1 (list)

  34. Post #74
    itkuitkzhji's Avatar
    April 2012
    92 Posts
    Thank you very much Phoenix <3

  35. Post #75
    CoolOppo's Avatar
    October 2011
    114 Posts
    I don't mean to bump this old thread up, but I could really use a download link for this or just the Lua code! The link above is dead and I could really use something like this on my server!
    Reply With Quote Edit / Delete Reply Windows 8 United States Show Events Agree Agree x 1Dumb Dumb x 1 (list)

  36. Post #76

    January 2009
    35 Posts
    This script no longer works and can be found here:

    http://www.garrysmod.org/downloads/?a=view&id=127831

    Could anyone fix this script for Gmod 13? I was able to get it to run, but it does not auto-reconnect you if the server crashes.

  37. Post #77
    CoolOppo's Avatar
    October 2011
    114 Posts
    This script no longer works and can be found here:

    http://www.garrysmod.org/downloads/?a=view&id=127831

    Could anyone fix this script for Gmod 13? I was able to get it to run, but it does not auto-reconnect you if the server crashes.
    Here you are good sir. You're lucky I was still subscribed lol.

    http://facepunch.com/showthread.php?t=1228694

  38. Post #78

    January 2009
    35 Posts
    Thanks.

    The only problem is, when the server crashes, the window pops up right away, so if a client clicks reconnect now, they will try to connect to a server that's not yet up. Isn't there a way for the script to check if the server is back up yet and then make the reconnect button clickable? Or is there a different solution?

  39. Post #79
    I'm a tool
    KillerLUA's Avatar
    June 2009
    1,369 Posts
    You're supposed to wait until it auto-reconnects; although I don't think it matters since it will continue to reconnect until it's back up without closing the window.

  40. Post #80

    January 2009
    35 Posts
    You're supposed to wait until it auto-reconnects; although I don't think it matters since it will continue to reconnect until it's back up without closing the window.
    I've made a few modifications to the script that removes the "reconnect now" button and cleans up the derma panels and text a bit and auto reconnects in 35 seconds.

    My server takes about 35 seconds to auto-restart so this script is perfect.

    If anyone wants it, here you go:



    Code:
    -- AntiCrash coded by Flapadar
    -- Fixed by Leystryku
    -- Modified by Agentmass
    
    -- 30/11/12
    
    AntiCrash = {}
    
    CreateConVar("anticrash_enabled", "1", FCVAR_ARCHIVE)
    
    if ( not GetConVar("anticrash_enabled"):GetBool() ) then
    
    	return
    
    end
    
    if SERVER then
    
    	util.AddNetworkString("AntiCrash.Pong")
    	AddCSLuaFile("sh_anticrash.lua")
    
    	function AntiCrash.Ping( ply, cmd, args )
    	
    		if ( not ply.LastPing or ply.LastPing + 5 < CurTime() ) then
    		
    			ply.LastPing = CurTime()
    			
    			net.Start("AntiCrash.Pong")
    			net.Send( ply )
    
    			--MsgN("Ping !")
    		end
    		
    	end
    	
    	concommand.Add("_anticrash_ping", AntiCrash.Ping)
    
    	return
    end
    
    AntiCrash.LastMoveTime = CurTime() + 10
    AntiCrash.ShouldRetry = true
    AntiCrash.Crashed = false
    AntiCrash.Spawned = false
    AntiCrash.Pending = false
    AntiCrash.SpawnTime = 0
    
    
    
    function AntiCrash.IsCrashed()
    
    	if ( not AntiCrash.Spawned or not LocalPlayer or AntiCrash.Crashed ) then return end
    		
    	if ( AntiCrash.SpawnTime > CurTime() ) then return end
    
    	if ( AntiCrash.LastMoveTime > CurTime() ) then return end
    
    	if ( not IsValid(LocalPlayer()) ) then return end
    
    	if ( not LocalPlayer():IsFrozen() and not LocalPlayer():InVehicle() ) then
    
    		return true
    
    	end
    
    end
    
    function AntiCrash.Pong( um )
    
    	AntiCrash.LastMoveTime = CurTime() + 10
    	MsgN("[AntiCrash] Connection regained - received pong")
    
    end
    
    function AntiCrash.Move()
    
    	AntiCrash.LastMoveTime = CurTime() + 1
    	
    end
    
    function AntiCrash.InitPostEntity()
    
    	AntiCrash.Spawned = true
    	AntiCrash.SpawnTime = CurTime() + 5
    
    end
    
    function AntiCrash.ServerCrash()
    
    	local menucrashtime = CurTime()
    	local retrytime = menucrashtime + 35
    	
    	for k , v  in ipairs(player.GetAll()) do
    		v.CrashedPing = v:Ping()
    	end
    
    	local dframe = vgui.Create("DFrame")
    	dframe:SetSize(200 , 150)
    	dframe:SetTitle("AntiCrash")
    	dframe:Center()
    	dframe:MakePopup()
    
    	function dframe:Close(...)
    		AntiCrash.ShouldRetry = false
    		return DFrame.Close(self , ...)
    	end
    
    	local dlabel = vgui.Create("DLabel")
    	dlabel:SetParent(dframe)
    	dlabel:SetPos(27 , 30)
    	dlabel:SetSize(195 , 25)
    	dlabel:SetText(string.format("Autoreconnect in %d seconds!" , retrytime - CurTime()))
    
    	function dlabel:Paint( ... )
    	
    		self:SetText(string.format("Autoreconnect in %d seconds!" , retrytime - CurTime()))
    
    	end
    
    --	local dbutton = vgui.Create("DButton")
    --	dbutton:SetParent(dframe)
    --	dbutton:SetPos(5 , 55)
    --	dbutton:SetSize(190 , 22)
    --	dbutton:SetText("Reconnect now")
    --	dbutton.DoClick = function()
    --		RunConsoleCommand("retry")
    --	end
    
    	local dlabel = vgui.Create("DLabel")
    	dlabel:SetParent(dframe)
    	dlabel:SetPos(22 , 60)
    	dlabel:SetSize(195 , 50)
    	dlabel:SetText("Please wait until the above timer \nhits 0 in order to auto-reconnect \nwhen the server has been fully \n                restarted.")
    
    	local dbutton = vgui.Create("DButton")
    	dbutton:SetParent(dframe)
    	dbutton:SetPos(5 , 120)
    	dbutton:SetSize(190 , 22)
    	dbutton:SetText("Cancel")
    	dbutton.DoClick = function()
    		AntiCrash.ShouldRetry = false
    		dframe:SetVisible(false)
    	end
    	
    	hook.Add("Think" , "Crashed" , function()
    		for k , v in ipairs(player.GetAll()) do
    			if v.CrashedPing != v:Ping() then
    				MsgN("[AntiCrash] Connection regained - ping changed.")
    				hook.Remove("Think" , "Crashed")
    				AntiCrash.Crashed = false
    				AntiCrash.LastMoveTime = CurTime() + 5
    			end
    		end
    		
    		/*
    		local moving = false
    		
    		for k , v in ipairs(ents.GetAll()) do
    			if v:GetVelocity():Length() > 5 then
    				-- Well, not everything's stopped moving.
    				-- 5 incase some props stuck in another prop and is spazzing or something
    				-- It should stop moving, but i'm not entirely sure
    				
    				moving = true
    			end
    		end
    		
    		if moving then
    			hook.Remove("Think" , "Crashed")
    			MsgN("[AntiCrash] Connection regained - movement detected")
    			AntiCrash.Crashed = false
    			AntiCrash.LastMoveTime = CurTime() + 5
    		end
    		
    		*/
    		
    		if AntiCrash.Crashed and (retrytime - CurTime() - 0.5) < 0 and AntiCrash.LastMoveTime + 5 < CurTime() then
    			if AntiCrash.ShouldRetry then
    				RunConsoleCommand("retry")
    			end
    		elseif AntiCrash.LastMoveTime > CurTime() then
    			hook.Remove("Think" , "Crashed")
    			AntiCrash.Crashed = false
    			if dframe and dframe:IsValid() then
    				dframe:Remove()
    			end
    		end
    	end )
    	
    end
    
    function AntiCrash.Think()
    
    	if not AntiCrash.Crashed and AntiCrash.IsCrashed() then
    
    		RunConsoleCommand("_anticrash_ping")
    		
    		if AntiCrash.LastMoveTime < CurTime() then
    			MsgN("[AntiCrash] Connection down - Did not receive pong")
    			AntiCrash.Crashed = true
    			AntiCrash.ShouldRetry = true -- This is a seperate crash from the previous, the user might want to reconnect this time.
    
    			AntiCrash.ServerCrash()
    			hook.Call( "ServerCrash" , nil ) -- Incase anyone else wants to hook into server crashes.
    		else
    			AntiCrash.Crashed = false
    		end
    
    		MsgN("[AntiCrash] Connection lost - sending ping")
    	end
    	
    end
    
    hook.Add("InitPostEntity" , "AntiCrash.InitPostEntity", AntiCrash.InitPostEntity)
    hook.Add("Move" , "AntiCrash.Move", AntiCrash.Move)
    hook.Add("Think" , "AntiCrash.Think", AntiCrash.Think)
    
    net.Receive("AntiCrash.Pong", AntiCrash.Pong)
    
    
    MsgN("You are running AntiCrash by Flapadar.\nFixed by Leystryku.\nModified by Agentmass. \n")
    Reply With Quote Edit / Delete Reply Windows 8 United States Show Events Winner Winner x 4Lua Helper Lua Helper x 2Lua King Lua King x 1 (list)