Quote:
Originally Posted by DrakilorP2P
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:
|
Nooo!! I know your intentions are well but it's never a good idea to start scripters off like that, at least without mentioning the correct way (sorry if I come off rude, not my goal at all).
Ideally the gun system or whatever changes that value would send a "trigger" to the GUI system, and update it. This reduces the processor power needed to run the loop 20 times a second hiding and then reshowing all the images.
Also, not sure what this is supposed to do:
PHP Code:
setshape(1, 32, 32*client.ammo);
setShape() is for level NPCs. You don't need to use it for setting the size of showimgs
