Jump to content
MakeWebGames

[MCCodes V2] Jail/Hosp Count


Karlos
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 months later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...