VitalEnd Posted July 2, 2010 Posted July 2, 2010 Not sure if it's out there or if there is an easier way but this will update the hospital count on the mainmenu instantly. Open mainmenu.php find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Last bit now: find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Just annoyed me that it never updated instantly so i made this quickly. Quote
Danny696 Posted July 2, 2010 Posted July 2, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. OR You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Note not tested. Then theres noting needed to be changed! Quote
DeaTH_RideR Posted July 2, 2010 Posted July 2, 2010 thanks guys, i been try to figure out a different way to do it so i could add in location and with your help i got it . Quote
NarutoPRG.com Posted July 2, 2010 Posted July 2, 2010 Nice little work here mate. Danny way is probably better. But hey, you made the thread. :P Quote
Zero-Affect Posted July 3, 2010 Posted July 3, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Curious why the number_format? Quote
Danny696 Posted July 3, 2010 Posted July 3, 2010 Make it look better. And i always format any number Quote
Zero-Affect Posted July 3, 2010 Posted July 3, 2010 something like that i wouldn't format because i mean even with 2k members on your not getting a k members in hosital or jail and if you do it's probably better not to have the comma IMO Hospital (1009) Hospital (1,009) Quote
Danny696 Posted July 3, 2010 Posted July 3, 2010 Good point there. The way my hospital/jail count shows is different from anything else ive seen, So i can format my numbers. Quote
EgyCheETah Posted August 16, 2010 Posted August 16, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. man in this code the the player who's busted get this code in mainmenu Jail (Resource id #21) Hospital (Resource id #20) but the other players who is not in jail get this Hospital (0) Jail (1) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. who's in jail get this Jail (1) Hospital (1) and other players who is not in jail get this Hospital () Jail () and BTW there is no one in hospital so any idea ? Quote
sniko Posted August 16, 2010 Posted August 16, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. There are a lot of parameters to put in the where statement to put in the WHERE clause to make your game realistic, but then again, you could have a global count of the game, which wouldn't make it so realistic, but give the users more detail, it depends how you run your game, personally, i try and make my games as realistic as possible, but other people don't as it gives users a "time to get away". Anyway, you can use whatever, some have already been posted in this topic, or you could use the below function. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. There is a lot of ways you can do this, you could even use AJAX,JQUERY (or whatever, im not familiar with those languages) to fetch the result without refreshing the page. -sniko Quote
Swift-Fusion || Fusion Posted August 16, 2010 Posted August 16, 2010 Hmm, i may just do that for you Sniko Quote
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.