Raised This Month: $ Target: $400
 0% 

Solved Hud update


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 05-27-2019 , 15:14   Re: Hud update
Reply With Quote #9

PHP Code:
#include <amxmodx>

#define MAX_PLAYERS 32
#define TASK_SHOWPOINTS 12345

new m_iPoints[MAX_PLAYERS 1];

new 
g_iSyncHud;

public 
plugin_init()
{
    
g_iSyncHud CreateHudSyncObj();
    
set_task(0.1"Task_Display"TASK_SHOWPOINTS, .flags "b");
}

public 
Task_Display() {
    
    new 
Players[MAX_PLAYERS], iNumid;
    
    
get_players(PlayersiNum"chi");
    
    for(new 
0iNumi++) {
        
        
id Players[i];
        
        switch(
m_iPoints[id]) {
            
            case 
1: {
                
                
set_hudmessage(02040, -1.00.6800.00.10.010.0);
                
ShowSyncHudMsg(idg_iSyncHud "Points - (x) ()");
            }
            case 
2: {
                
                
set_hudmessage(02040, -1.00.6800.00.10.010.0);
                
ShowSyncHudMsg(idg_iSyncHud "Points - (x) (x)");
            }
            default: {
                
                
set_hudmessage(02040, -1.00.6800.00.10.010.0);
                
ShowSyncHudMsg(idg_iSyncHud "Points - () ()");
            }
        }
    }

Compiled. No errors. Untested.
redivcram is offline
 



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 07:59.


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