shady9980 Posted March 24, 2009 Posted March 24, 2009 hello people, I was wondering if it was possible to put in a code that does so when a player goes to jail or hospital it shows an image. here is the code wich is used now. but as you can see, it will only show "0" when out of jail and "1" when in jail. [url='jail.php']<img src=jail.gif width=22 height=25>{$ir['jail']}[/url] the code is used inside a table i made in globals.php so i was wondering if it was possible? And if it was possible, could anyone help me? Thanks in advance guys :) Quote
Sp1d3r Posted March 24, 2009 Posted March 24, 2009 Re: Show images help Yes! it is possible. You will have to make it a condition like If Jail > 0 do this else do this. You will need to put the code in the table or area that you want the pic to show. Check out how v2 shows the conditions if your in the hospital or jail in the side menu. Not sure what its called since i don't use it but I know there is a condition there that says if in Jail/Hospital display these options else these. Sp1d3r www.chaosrelic.com Quote
shady9980 Posted March 24, 2009 Author Posted March 24, 2009 Re: Show images help yeah wich is the code i posted :S Quote
shady9980 Posted March 24, 2009 Author Posted March 24, 2009 Re: Show images help if($ir['jail'] { print([url='jail.php']<img src=jail.gif width=22 height=25>[/url])} dont work either :S Quote
Lithium Posted March 24, 2009 Posted March 24, 2009 Re: Show images help if ($ir['jail']) { print ''; } Quote
shady9980 Posted March 24, 2009 Author Posted March 24, 2009 Re: Show images help  if ($ir['jail']) { print ''; } gives this error : Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/gamename/globals.php on line 97  :( Quote
Guest Anonymous Posted March 24, 2009 Posted March 24, 2009 Re: Show images help  if ($ir['jail']) { print ''; } gives this error : Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/gamename/globals.php on line 97  :( Says you have an error in your globals.php file, you need to edit the header.php file to modify the display, when user is in jail. Quote
shady9980 Posted March 24, 2009 Author Posted March 24, 2009 Re: Show images help aah.. so i put if ($ir['jail']) { print '[url="jail.php"][img=jail.gif][/url]'; } in header.php and what do i put into globals.php? (where i want the image to show when in jail). Quote
Sp1d3r Posted March 24, 2009 Posted March 24, 2009 Re: Show images help what do i put into globals.php? Nothing. Just change the code in the header. Sp1d3r www.chaosrelic.com Quote
shady9980 Posted March 25, 2009 Author Posted March 25, 2009 Re: Show images help what do i put into globals.php? Nothing. Just change the code in the header. Sp1d3r www.chaosrelic.com dude, then it wont show where i want it to show, wich is near the shoutbox.. and the shoutbox is placed in globals.php. you dig? Quote
Sp1d3r Posted March 25, 2009 Posted March 25, 2009 Re: Show images help yeah i dig your inability to explain the situation completely. Sp1d3r www.chaosrelic.com Quote
shady9980 Posted March 25, 2009 Author Posted March 25, 2009 Re: Show images help well i explained enough i think? "inside a table in globals.php" anyways thanks for trying :P Quote
DELETE ME NOW! Posted March 25, 2009 Posted March 25, 2009 Re: Show images help You can also do this for like banners when there in jail and hospital.. Example. if ($ir['jail']) { $banner = 'jail.gif'; } else if ($ir['hospital']) { $banner = 'hospital.gif'; } else { $banner = 'game_banner.gif'; } echo '[img='. $banner .']'; Quote
shady9980 Posted March 25, 2009 Author Posted March 25, 2009 Re: Show images help You can also do this for like banners when there in jail and hospital.. Example. if ($ir['jail']) { $banner = 'jail.gif'; } else if ($ir['hospital']) { $banner = 'hospital.gif'; } else { $banner = 'game_banner.gif'; } echo '[img='. $banner .']'; aah cool :D its kinda what i where looking for, thou i dont think it will work in globals.php unless i do something i dont know how to do hehe.. :) But i will def try that out in header for fun :) ty 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.