Jump to content
MakeWebGames

Recommended Posts

Posted

hi, i finally figured out why my mining power was refilling but now im trying to put a bar under it on my game but i cant figure out why its not working can anyone recode the lines please?

<img src=greenbar.png width=$power height=10><img src=redbar.png width=$power height=10>

Posted

Re: why doesnt it work?

I don't know the exact values of the names but change them as applicable. Create a proper user bar, first use some PHP:

 

echo
'<div class="outerBar">'.
   '<div class="innerBar" style="width:'.(($ir['power']/$ir['maxpower'])*100).'%;></div>'.
'</div>';

 

Then for the CSS:

div.outerBar{height:7px;background:#900;width:120px;}

div.innerBar{height:7px;background:#090;}

...and finished. :)

Posted

Re: why doesnt it work?

i dont get that lol, im just wondering what do u change in the

$power height, parts in that coding so that the bar acturally shows the energy bar is like

<img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10>

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