• Auto run console command every 5 minutes?
    6 replies, posted
How would I auto run a console command every 5 minutes? I want to auto run "dumpstringtables" every five minutes to see if it works as a solution for my server crashing. I need a script or something like that. Another thing I need to know is where do I put the file that you give me/or create me? Please help! Thanks!
[QUOTE=razservers;21012796]How would I auto run a console command every 5 minutes? I want to auto run "dumpstringtables" every five minutes to see if it works as a solution for my server crashing. I need a script or something like that. Another thing I need to know is where do I put the file that you give me/or create me? Please help! Thanks![/QUOTE] [lua]timer.Create("loldumptbls", 300,0, function() RunConsoleCommand("dumpstringtables") end)[/lua] :science:
[QUOTE=Cubar;21019118][lua]timer.Create("loldumptbls", 300,0, function() RunConsoleCommand("dumpstringtables") end)[/lua] :science:[/QUOTE] Further to this, place the code in Cubar's post in a lua file and put this in garrysmod\lua\autorun\server. You can call it what you like as long as it is a .lua file.
Who is spreading this false rumor of dumpstringtables fixing the crashes? Only thing it does is dump the darn string tables to the console for you to wonder what's going on. This is what dumpstringtables command does (valve, don't sue me please): [code] CNetworkStringTable::Dumppage() print( "Table %s\n", GetTableName() ); print( " %i/%i items\n", GetNumStrings(), GetMaxEntries() ); for ( int i = 0; i < GetNumStrings() ; i++ ) print( " %i : %s\n", i, GetString( i ) ); [/Code] Print only, only thing you're going to do is lag the hell out of your server since it prints the tables every time.
[QUOTE=UberMensch;21020980]Further to this, place the code in Cubar's post in a lua file and put this in garrysmod\lua\autorun\server. You can call it what you like as long as it is a .lua file.[/QUOTE] How to make adverts on my serveR ? thx.
[QUOTE=-Delta-;21117852]How to make adverts on my serveR ? thx.[/QUOTE] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA. Sorry for spam, I deserve a ban. Please don't though :( -Delta- [LUA] timer.Create('Adverts',80--[[<- this is in seconds, change it to how frequently you want to spam the messages below]],0/* continues forever, don't change*/,function() for k,v in pairs(player.GetHumans()) do -- Change these to the message you want to send. v:ChatPrint "Hello, welcome to SPAMSPAMSPAM" v:ChatPrint "I hope you like SPAM SPAM SPAM" end end) [/LUA] Put it on autorun/server/what.lua (create the file)
[quote=python1320;21121005]aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. Sorry for spam, i deserve a ban. Please don't though :( -delta- [lua] timer.create('adverts',80--[[<- this is in seconds, change it to how frequently you want to spam the messages below]],0/* continues forever, don't change*/,function() for k,v in pairs(player.gethumans()) do -- change these to the message you want to send. V:chatprint "hello, welcome to spamspamspam" v:chatprint "i hope you like spam spam spam" end end) [/lua] put it on autorun/server/what.lua (create the file)[/quote] thx
Sorry, you need to Log In to post a reply to this thread.