Raised This Month: $51 Target: $400
 12% 

Replacing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 11-23-2014 , 10:33   Replacing
Reply With Quote #1

Maybe anyone has better ideas than this my attempt?
I tried to make a bar hud by percentage (when it's max limit is 2500).

PHP Code:
#include <amxmodx>

new const g_szBarStatus[][] =
{
    
"                                        ""|                                      ""||                                    ",
    
"|||                                  ""||||                                ""|||||                              ",
    
"||||||                            ""|||||||                          ""||||||||                        ",
    
"|||||||||                      ""||||||||||                    ""|||||||||||                  ",
    
"||||||||||||                ""|||||||||||||              ""||||||||||||||            ",
    
"|||||||||||||||          ""||||||||||||||||        ""|||||||||||||||||      ",
    
"||||||||||||||||||    ""|||||||||||||||||||  ""||||||||||||||||||||"
};

new 
g_iBar[33];

public 
plugin_init()
        
register_clcmd("addbar""Clcmd_AddBar");

public 
Task_HUD(id)
{
    
id -= TASKID_HUD;

    
set_hudmessage(25500, -1.00.800.10.250.010.01, -1);
    
show_hudmessage(id"Bar [%s]"g_szBarStatus[g_iBar[id] * 20 2500);

    
set_task(0.2"Task_HUD"id TASKID_HUD);
}

public 
Clcmd_AddBar(id)
{
        
g_iBar[id] += 100;
        
Task_HUD(id TASKID_HUD);


Last edited by ~Ice*shOt; 11-23-2014 at 10:35.
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode