about percentage
help me, i want to make a hud message which announce me when the clip is 50% and 10%
but i dont know what script i must write? thanks, sorry if my english bad |
Re: about percentage
I give you concept and links to function wikis you will need. But you're gonna have to write the code yourself. or go to the request section.
CreateHudSyncObj() http://www.amxmodx.org/funcwiki.php?go=func&id=1064 new weapon = cs_get_user_weapon(id) http://www.amxmodx.org/funcwiki.php?go=func&id=738 http://www.amxmodx.org/funcwiki.php?go=func&id=207new Float:percent = (cs_get_weapon_ammo(id) / clipSize[weapon]) * 100 //This will get % of clip left if(percent == 50 || percent == 10) show_hudmessage(id, "Your clip is at ^%%d!", percent)http://www.amxmodx.org/funcwiki.php?go=func&id=29 NOTE: clipSize you'll have to write yourself. It'll be an array of the clip size of that weapon. i.e. CSW_M4A1 = 30, CSW_FAMAS = 25, CSW_M249 = 100 etc etc PHP Code:
Know what? I actually think i'll have fun writing this. So i might even do it for you, if you need. But i don't have time today. So if you're willing to wait untill tomorrow or something, PM me and i'll get it for you when i can. Otherwise, if you can't write it (it should be real simple) just post in request. |
Re: about percentage
Quote:
PHP Code:
Use: PHP Code:
|
Re: about percentage
Quote:
PHP Code:
|
Re: about percentage
Quote:
|
Re: about percentage
Quote:
|
Re: about percentage
ummm... i will try it by myself first, but if i'm failed, i will go to request section :D
ok thanks to you all :) |
Re: about percentage
Quote:
Also, fearmelfice, I forgot to mention, use floatround() rather than defining percent as a float. |
Re: about percentage
okay hornet
|
Re: about percentage
Quote:
|
| All times are GMT -4. The time now is 06:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.