Karlos Posted January 10, 2009 Share Posted January 10, 2009 Well I got bored and I saw mainmenu.php it relied on 2 crons to count players in Hospital and Jail so here's a quick edit to get rid of the crons. Edit 2 PHP Files First open up mainmenu.php and find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. now find your hosptial links and replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and again with jail links and replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Save it. open up cron_minute.php find and delete the following queries: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Save it.. And Your Done. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted January 10, 2009 Share Posted January 10, 2009 Re: [MCCodes V2] Jail/Hosp Count sorry if this sounds rather stupid but would this be better with a large user base? it would be fetched every second... rather than minute Quote Link to comment Share on other sites More sharing options...
Karlos Posted January 10, 2009 Author Share Posted January 10, 2009 Re: [MCCodes V2] Jail/Hosp Count the main reason why i did this is because you can't run crons on wamp server just like that. Quote Link to comment Share on other sites More sharing options...
Lithium Posted January 10, 2009 Share Posted January 10, 2009 Re: [MCCodes V2] Jail/Hosp Count the main reason why i did this is because you can't run crons on wamp server just like that. As a matter of fact... you can! you have a couple of ports to windows on the cronjobs. just google for "win cron" or "windows cronjobs" :) Quote Link to comment Share on other sites More sharing options...
MyGunWars Posted January 10, 2009 Share Posted January 10, 2009 Re: [MCCodes V2] Jail/Hosp Count Is It Better Then Having It In The Min. Cron ??? Quote Link to comment Share on other sites More sharing options...
jamboy1 Posted January 11, 2009 Share Posted January 11, 2009 Re: [MCCodes V2] Jail/Hosp Count Is It Better Then Having It In The Min. Cron ??? Depends, do you like being 60 seconds out? it won't piss the users off so much, i don't have the count on there anyway :P Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted January 11, 2009 Share Posted January 11, 2009 Re: [MCCodes V2] Jail/Hosp Count one second query or 1 min your choice... Quote Link to comment Share on other sites More sharing options...
velocityislands Posted January 11, 2009 Share Posted January 11, 2009 Re: [MCCodes V2] Jail/Hosp Count +1 well done matey Quote Link to comment Share on other sites More sharing options...
Karlos Posted January 11, 2009 Author Share Posted January 11, 2009 Re: [MCCodes V2] Jail/Hosp Count Zero..think...is this much difference from the users online on the menu? not really.... +1 well done matey Thanks Mate Quote Link to comment Share on other sites More sharing options...
gurpreet Posted January 11, 2009 Share Posted January 11, 2009 Re: [MCCodes V2] Jail/Hosp Count +1 working perfectly. Quote Link to comment Share on other sites More sharing options...
BecksDark Posted April 12, 2009 Share Posted April 12, 2009 Re: [MCCodes V2] Jail/Hosp Count You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Can't you just add this to your menu, and remove the whole cron? Like just replace the You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with the line above? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted April 12, 2009 Share Posted April 12, 2009 Re: [MCCodes V2] Jail/Hosp Count You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Can't you just add this to your menu, and remove the whole cron? Like just replace the You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with the line above? WAH!!! Don't select everything from the users table! lol You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
BecksDark Posted April 12, 2009 Share Posted April 12, 2009 Re: [MCCodes V2] Jail/Hosp Count Pardon the n00b of my coding, but what is the difference? I ask, not being sarcastic at all, because I really dont know :) Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted April 12, 2009 Share Posted April 12, 2009 Re: [MCCodes V2] Jail/Hosp Count Pardon the n00b of my coding, but what is the difference? I ask, not being sarcastic at all, because I really dont know :) Ah, 'tis not a problem. 'tis the basics of physics (forgive the language, haven't slept yet..) The more you select, the longer it takes. If you have a database with 100 users, you won't notice much of a difference. But, on the other hand, if you have a database with 100,000 users, you'll surely feel the drain on your server! Select only what is required to keep your code quick, and efficient! You could also use this method: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Both methods I have posted would return the same answer. Both methods would also work a lot faster than selecting everything. ;) Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted April 12, 2009 Share Posted April 12, 2009 Re: [MCCodes V2] Jail/Hosp Count Yeah but this still runs every time someone refreshes therefore normally more than 1 per minute depending on user base... Which makes this bad for your website not good Quote Link to comment Share on other sites More sharing options...
BlueDevil23 Posted April 12, 2009 Share Posted April 12, 2009 Re: [MCCodes V2] Jail/Hosp Count :O ZA is alive?! :P lol Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted April 13, 2009 Share Posted April 13, 2009 Re: [MCCodes V2] Jail/Hosp Count :O ZA is alive?! :P lol am i:O omg kill me quickly :-D Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted April 13, 2009 Share Posted April 13, 2009 Re: [MCCodes V2] Jail/Hosp Count :O ZA is alive?! :P lol am i:O omg kill me quickly :-D *shoots Zero-Affect* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.