Jump to content
MakeWebGames

Recommended Posts

Posted

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 :)

Posted

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

Posted

Re: Show images help

 

if ($ir['jail'])

{

print 'jail.gif';

}

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

 

:(

Guest Anonymous
Posted

Re: Show images help

 

if ($ir['jail'])

{

print 'jail.gif';

}

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.

Posted

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

Posted

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?

Posted

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 .']';
Posted

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

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