Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   main gui help (https://forums.graalonline.com/forums/showthread.php?t=87263)

[email protected] 08-05-2009 07:11 PM

main gui help
 
Hey guys I have a question. I am making a main gui that displays your hit points and armor and your ammo max. The health part works and the armor part works but im having trouble with it keeping up with clientr.pistol.ammo.

heres what I have:

PHP Code:

showtext2031513"Comic Sans MS""b", (clientr.pistol.ammo ) @ "/" @ ( clientr.pistol.ammo.max ) ); 


It shows the ammo right, but if i fire the weapon ammo and it adds 100 clip to clientr.pistol.ammo, it doesnt update the new ammo status. say I had 500 ammo before I fired the ammo and added 100 ammo. I would have 600ammo but it would still show 500ammo. Someone help [;

Pelikano 08-05-2009 07:24 PM

You'd have to either update it everytime the ammo stats change or just every 0.05 seconds using a TimeOut.

Switch 08-05-2009 08:18 PM

Quote:

Originally Posted by Pelikano (Post 1513191)
You'd have to either update it everytime the ammo stats change or just every 0.05 seconds using a TimeOut.

This, or get one weapon or class (I'd say class) that handles all ammo changes, and if ammo changes have it update.



Edit:
Quote:

Originally Posted by REP
Don't repeat information for the hell of getting your name down.

Good job because I had a suggestion.


All times are GMT +2. The time now is 12:55 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.