Kaotic07 Posted October 16, 2007 Share Posted October 16, 2007 What code would i use to allow users to view inventory while in jail and hosp... Needed for both i searched and came up empty Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted October 16, 2007 Share Posted October 16, 2007 Re: View pages while in jail or hosp don,t use a code just edit your mainmenu if i understand u correctly Quote Link to comment Share on other sites More sharing options...
Kaotic Posted October 20, 2007 Share Posted October 20, 2007 Re: View pages while in jail or hosp I don't understand what 2 change. When i think i have it i get mainmenu problems Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 20, 2007 Share Posted October 20, 2007 Re: View pages while in jail or hosp My mainmenu is as follows, edit it to your liking :) <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; if($ir['hospital']) { print "<font color='black'>Hospital ($hc) <font color='black'>Inventory "; } elseif($ir['jail']) { print "<font color='black'>Jail ($jc) "; } else { print "<font color='black'>Home <font color='black'>Inventory "; } if($ec > 0) { print "<font color='red'>Events ($ec) "; } else { print "<font color='black'>Events (0) "; } if($mc > 0) { print "<font color='red'>Mailbox ($mc) "; } else { print "<font color='black'>Mailbox (0) "; } if($ir['jail'] and !$ir['hospital']) { print "<font color='black'>Jail Gym <font color='black'>Hospital ($hc) "; } else if (!$ir['hospital']) { print "<font color='black'>Explore <font color='black'>Gym <font color='black'>Crystal Gym <font color='black'>Crimes <font color='black'>Your Job <font color='black'>Local School <font color='black'>Hospital ($hc) <font color='black'>Jail ($jc) "; } else { print "Jail ($jc) "; } print "<font color='red'>Forums "; if($ir['new_announcements']) { print "<font color='black'>Announcements ({$ir['new_announcements']}) "; } else { print "<font color='black'>Announcements (0) "; print "<font color='black'>Inventory "; } print " <font color='black'>Newspaper <font color='black'>Search "; if(!$ir['jail'] && $ir['gang']) { print "Your Gang "; } if($ir['user_level'] > 1) { print "<hr /> <font color='black'>Staff Panel \n"; print "<hr /><font color='black'>Staff Online: "; $q=$db->query("SELECT * FROM users WHERE laston>(unix_timestamp()-15*60) AND user_level>1 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } print "{$r['username']} ($la $unit) "; } } if($ir['donatordays']) { print "<hr /> Donators Only <font color='red'>Friends List <font color='red'>Black List"; } print "<hr /> <font color='black'>Preferences <font color='black'>Player Report <font color='black'>Bug Report Center <font color='black'>Help Tutorial <font color='black'>Game Rules <font color='black'>My Profile <font color='black'>Logout Time is now "; echo date ('F j, Y')." ".date('g:i:s a'); ?> Quote Link to comment Share on other sites More sharing options...
Canjucks Posted October 15, 2008 Share Posted October 15, 2008 Re: View pages while in jail or hosp I just fixed this up in my game. One line needs to be added and its so cool cause im only new to PHP...lol realise this is an old post but might help someone else down the track 8-) if($ir['hospital']) { print "<font color='black'>Hospital ($hc) <font color='black'>Inventory "; } elseif($ir['jail']) { print "<font color='black'>Jail ($jc) <font color='black'>Inventory "; } Quote Link to comment Share on other sites More sharing options...
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.