R!der Posted November 11, 2006 Posted November 11, 2006 How can i make a medical item reduce off your hospital time? Thanks Quote
Hatchet Posted November 11, 2006 Posted November 11, 2006 Re: Hospital time something like http://criminalexistence.com/ceforums/i ... pic=1336.0 Quote
Vorlen Posted November 12, 2006 Posted November 12, 2006 Re: Hospital time Pff, that's too much work GO TO itemuse.php find the line in medical items that says UPDATE users SET hp=hp+{$fr['health']} make it look like UPDATE users SET hp=hp+{$fr['health']}, hospital=hospital-{$fr['health']} Quote
R!der Posted November 13, 2006 Author Posted November 13, 2006 Re: Hospital time ok i did that it worked great. but i found out if thay are in for a while and just keep refreshing. it can take them in minus on hospital time. how can i stop this? i tried a if statement but just kept getting errors Quote
seanybob Posted November 13, 2006 Posted November 13, 2006 Re: Hospital time make it check if they have the item in there inventory right above the code you put in itemuse.php Quote
R!der Posted November 13, 2006 Author Posted November 13, 2006 Re: Hospital time make it check if they have the item in there inventory right above the code you put in itemuse.php I mean if thay keep refreshing on the item it dont tell them thay are not in hospital and takes there hospital time into minus. how can i make it so it says "you are not in hospital" if thay try to use the medical item when not in hospital? Quote
seanybob Posted November 13, 2006 Posted November 13, 2006 Re: Hospital time if($ir['hospital'] <= 0) { die("You cannot use this item as you are not in the hospital"); } lol... Quote
Hatchet Posted November 14, 2006 Posted November 14, 2006 Re: Hospital time So it doesnt go into negatives mysql_query("UPDATE users SET hospital=0 WHERE hospital<0", $c); Quote
R!der Posted November 14, 2006 Author Posted November 14, 2006 Re: Hospital time where do i put that hatchet itemuse or cron? Quote
R!der Posted November 14, 2006 Author Posted November 14, 2006 Re: Hospital time its ok i done it now thx Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.