Richard Posted April 1, 2008 Posted April 1, 2008 This should make your hospital time display as X days, X hours, X mins In hospital.php find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This should work for both versions of mccodes Quote
ronhouston2 Posted April 1, 2008 Posted April 1, 2008 Re: Hospital Time +3 Mate works verry good :-D :-D :-D :-D :-D I Like the mod Quote
Note i didn't make this mo Posted April 2, 2008 Posted April 2, 2008 Re: Hospital Time 1) Karma isnt around no more so +1 is pointless 2) i kinda like this mod 3) couldnt you do this in crons but i supose cos its free i might use it ;) Quote
Guest Anonymous Posted April 2, 2008 Posted April 2, 2008 Re: Hospital Time 3) couldnt you do this in crons Huh, what *are* you going on about .. it's purely an output display system i.e. nothing to do with the back end. Quote
wolfe Posted April 2, 2008 Posted April 2, 2008 Re: Hospital Time days of hospital time? damn.... Quote
Absolute Zero Posted April 2, 2008 Posted April 2, 2008 Re: Hospital Time IMO output of the code looks better if you replace this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ...With... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It doesn't say "0 Minutes" when its at an hour, but instead it shows nothing...example: Old code when it hit 1 hour in hospital: 1 Hours, 0 Mins New code when it hits 1 hour in the hospital: 1 Hours It all really depends on the appearance you want, just letting you all see. Quote
Ishy Posted April 3, 2008 Posted April 3, 2008 Re: Hospital Time I quite like this :-) Good work. Quote
dementor Posted April 3, 2008 Posted April 3, 2008 Re: Hospital Time I take that back great mod :) Quote
Robert Posted April 21, 2008 Posted April 21, 2008 Re: Hospital Time This should make your hospital time display as X days, X hours, X mins In hospital.php find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This should work for both versions of mccodes Good Addon. I used this on my hospital and jail, thanks ;) Quote
zbirc3 Posted April 22, 2008 Posted April 22, 2008 Re: Hospital Time For the newbies: This should make your JAIL time display as X days, X hours, X mins In jail.php find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Magictallguy Posted May 2, 2008 Posted May 2, 2008 Re: Hospital Time Can be used for fed too! - With a little editing of course! Quote
Magictallguy Posted May 2, 2008 Posted May 2, 2008 Re: Hospital Time fedjail.php - Note: I tend to not fed anyone for more than a year, so I don't know if it will display years *goes to test* yup! That does it for me! You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
HITMAN 17 Posted October 28, 2008 Posted October 28, 2008 Re: Hospital Time what about to display secounds as well Quote
endo Posted November 23, 2008 Posted November 23, 2008 Re: [mccodes] Hospital Time for it too display seconds as well you would need a unix_timestamp(); to be the time they are sent to jail/hospital then in seconds the time they are in there for. then have in header.php include "hospyjailthingy.php"; and in that file you would need something like $realese_time=($time_they_went_in+$how_long_there_in_there_for); select users hosptime if they are in hosp and put the hosp time to zero when they should be released and in jail.php you would need $timeleftin=($time_they_went_in - unix_timestamp()); $totaltimeleft=($how_long_there_in_there_for - $timeleftin); and the $totaltimeleft is how long in seconds they would be in there for using a little maths you all can finish this off i think if there is any holes in my logic let me know :D Quote
Zero-Affect Posted November 23, 2008 Posted November 23, 2008 Re: [mccodes] Hospital Time this just gave me the best idea lol but im not sharing this one :-D just thought i'd show richard some appreciation + 1 mate Quote
endo Posted November 23, 2008 Posted November 23, 2008 Re: [mccodes] Hospital Time lol which bit did richards or mine lol either way if anyone is interested in the time going down to seconds just post in here and ill see if i can do it lol Quote
Richard Posted February 12, 2009 Author Posted February 12, 2009 Re: [mccodes] Hospital Time Just thought I'd make this a bit easier, You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Put that into global_func.php Then, to display a time as mins, hours and days, Just put: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. An example of the variable could be $r['memberHospital'] or $r['memberJail'] etc. Hope this helps a bit Quote
Richard Posted February 13, 2009 Author Posted February 13, 2009 Re: [mccodes] Hospital Time Ok, since I cant change my last post, I'll add a new one. New function: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Might be a bit easier to work with now, To display hospital time would be: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Just a simple function which should make the time display look a bit tidier. Hope it helps 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.