Jump to content
MakeWebGames

Fixing Chris Hospital Mod


ags_cs4

Recommended Posts

hello all i got contacted today about a bug on the hospital mod that @Dayo released and its wierd that no one take note on, while fixing that bug i found an even bigger bug than just that can be exploited by players for money

any way the bug it only triggred if the Health is under 0% as it can give the player money if the health is negative (DMG is over the Rank Max Health)

so to fix it you have to add a simple code

find 

$healthPerc = round(($rank->R_health - $health) / $rank->R_health * 100, 2);

under it add this

if($healthPerc < 0) $healthPerc = 0;

 

 

And to fix other bug that show 0 time unstead of 2h (default setting)

image.png

 

find

$time = 0;
$money = 0;

Replace it with 

$time = $timeToFull;
$money = $moneyToFull;

and that should fix that all

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