Jump to content
MakeWebGames

[mccode] Add jail key


TheRipper

Recommended Posts

Really easy but figured with the free jail codes this will help someone out.

You might haft to edit it for your table name with your jail time.I use seanybobs jail system and the keys work fine with them.

inventory.php

Find code

You're unable to view this code.

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

 

Insert this code

You're unable to view this code.

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

 

itemuse.php

Put it right before the end of the page

You're unable to view this code.

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

 

Then go to your db and create the item type in the itemtype table and the item in the item table.Then it should show up in your admin panel where you can ethier give it away or add it to a shop for sale.I am sure there is a easier way to do this but it worked for me.

Link to comment
Share on other sites

Guest Anonymous

Re: Add jail key

That is not how it is =D. This is how it is done.

I have done it so if you have seanybob,Netcodes,Jay-doggs jail modifications and some self-made jails.

If you dont have a jail i might put on on CE free (if i get enough buyers) (my site : http://netcodes.pimpinstate.com/)

inventory.php

Find code

Code:

print " [Use]";

 

Insert this code

Inventory Code::

You're unable to view this code.

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

 

itemuse.php

Put it right before the end of the page and before the last } (to prevent it from being Parse Errored)

Item Use Code:::

You're unable to view this code.

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

 

End of..Done!

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 years later...

If you do this script correctly you could have more than 1 type of key to get you out of jail as long as its ItemID and name are entered..

Example

after the include "globals.php"; add

$filename="keys.txt";$words=file($filename);shuffle($keys);$key=$keys[0]; // THIS IS FOR YOUR NAMES KEYS

$filename="keysID.txt";$words=file($filename);shuffle($keysID);$keyID=$keysID[0]; // THIS IS FOR YOUR KEYS ID now on this part

if($i['itmname'] == 'Jail Key')

{

print " [Use]";

}

turn it into

if($i['itmname'] == '$keys')

{

print " [Use]";

}

And this part

print " [Use]";

Change to

print " [Use]";

make two text files one called keys.txt and one called keysID.txt now you can add as many key names and key IDs that you have listed in your game

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