Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

You're unable to view this code.

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

Very simple to do...

Note: I have no idea, if it will work on the newest MCCodes release, no idea what has changed within it.

Edited by Djkanna
Meh, don't do smileys within your codes comments. :| ^ added the v2 Redux notice
Posted

You're unable to view this code.

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

 

Very simple to do...

Note: I have no idea, if it will work on the newest MCCodes release, no idea what has changed within it.

thanks for that i was wondering how i would add a link to jail.php i tried it and it did not work for me

Posted
thanks for that i was wondering how i would add a link to jail.php i tried it and it did not work for me

You're unable to view this code.

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

DJ how do I pay to place someone one IN the Jail?

^SomeRandomBastard did it above.

  • 2 months later...
Posted
I was bored, so decided to write this up real quick - Less than 5 minutes!

 

You're unable to view this code.

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

 

This is not tested, I did not even upload it to a server, but I can almost guarantee it works without an error.

Any problems, post back.

 

i hate to say this because i only know 1/100 of php but i think you didnt add the update for jail time

Posted

Ive been trying for the last few hour's to add an item to the code instead of crystals but still no joy i dont know alot about code still learning,can somone please tell me how to add item.ID=6,

Thanks

Posted

Ive been trying to add an item instead of crystals for the last 2 hours still no joy :( Iam trying to learn code and i know this is an easy one to change but my eyes are burning from looking at this screen lol please show me how to add this item id 6

thanks

Posted

<?php

require_once (dirname (__file__) .'/globals.php');

//Define the price.

$bailCost = 1; // Change

 

//Check for actually in jail.

if ($ir['jail'] > 0) {

//Check that they have enough item.php?ID=6 to continue.

if ($ir['item.php?ID=6'] > $bailCost) {

//Update the users, amount and jail amount.

$db->query ('UPDATE `users` SET `jail` = 0, `item.php?ID=6` = `item.php?ID=6` - '.$bailCost.' WHERE (`userid` = '.$userid.')');

echo '<p>You\'ve paid to get yourself out of jail...<a href="index.php" title="Back to home">Back to home</a></p>';

} else {

//Not enough lock picks message.

echo '<p>You cannot afford to buy yourself out of jail.<a href="index.php" title="Back to home">Back to home</a></p>';

}

} else {

//Not actually in jail at the time.

echo '<p>You\'re not currently in the jail.<a href="index.php" title="Back to home">Back to home</a></p>';

}

//Show footer

$h->endpage();

 

ithis is what i have now but i have tried it so many different ways i have tried with itemuse.php?ID item=id6 just dont know :(

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