Thread: Wont update
View Single Post
  #2  
Old 02-22-2010, 01:41 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
You need to redraw it when the ammo count changes, but I can't help you with that since I don't know the context.

However, a brute force solution can look like this:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
setTimer(.5);
}

function 
onTimeout()
{
  
hideimgs(200, 300);
  
  for (
i=1; i<client.ammo; i+=1)
  {
    
showimg(200+i, "mercia_newgui.png", screenwidth - 302 -(i*4), screenheight - 75);
    
changeimgpart(200+i, 220, 137, 5, 10);
    
changeimgvis(200+i, 5);
  }
  
setshape(1, 32, 32*client.ammo);
  
setTimer(0.05);
} 
Reply With Quote