Jump to content
MakeWebGames

Jail/Hospital Timestamps


TheMasterGeneral

Recommended Posts

Hey there, MWG. I've spent a little bit of time doing this. Jail/Hospital times are now set via timestamp, instead of countdown timer.

Edit in global_func.php (Add before the functions)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Save, upload.

Now, create a file in lib/tmg called functions.php and paste in:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Save, upload!

Open globals.php and add in under check_level();

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Open header.php and replace the statement:

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.

 

 

Now look for the if statement with the hospital and replace with:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Now everywhere you have a user be put into the hospital, use

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Same for jailing..

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Now, finally, where-ever you have a query to remove/substract players jail/hospital time, use:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

If its set up correctly, you should now be all set for timestamp hospital/jail times!

Pages that need adjusting off the top of my head:

Anything attack oriented

Crimes

Hospital

Jail

Staff Users

 

 

If you run into issues, please drop a reply and I'll get back to you ASAP! I also highly suggest disabling access to your game while you're rolling this change out, because it'll cause some weird issues if someone receives a hospital visit while the code isn't 100% implemented yet. ;P

Cheers!

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.

×
×
  • Create New...