Jump to content
MakeWebGames

Hospital Bill for V2


ronhouston2

Recommended Posts

<?php

include "globals.php";

if($ir['hospital'])

{

die("You Can Not Pay Your Hospital Bill.");

}

$_GET['ID']=abs((int) $_GET['ID']);

$r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"));

if(!$r['userid'])

{

die("Invalid user");

}

if(!$r['hospital'])

{

die("That user is not in the hospital!");

}

$cost=$r['level']*2000;

$cf=number_format($cost);

if($ir['money'] < $cost)

{

die("Sorry, you do not have enough money to Pay the Hospital Bill for {$r['username']}. You need \$$cf.");

}

print "You successfully paid {$r['username']} hospital bill \$$cf.

> Back";

$db->query("UPDATE users SET money=money-{$cost} WHERE userid=$userid");

$db->query("UPDATE users SET hospital=0 WHERE userid={$r['userid']}");

event_add($r['userid'], "{$ir['username']} payed your hospital bill.", $c);

$h->endpage();

?>

 

I Just made a New mod for the Hospital called Hospital Bill much like Bail out of Jail make a area in Hospital for Actions i had to do that on my Game and make a Payge called hospitalbill.php if you have any problems let me know thanks

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