Raised This Month: $ Target: $400
 0% 

(help) HudSyncObject error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
newb1e
Junior Member
Join Date: Feb 2016
Old 02-05-2016 , 20:52   Re: HudSyncObject not work
Reply With Quote #5

Nice! i think this is working much better!
btw, are this a good way to hide my rank when i'm dead?
PHP Code:
public Info()
{
    new 
iPlayers32 ] , iNum len id;
    static 
buffer192 ];
    
    
get_playersiPlayers iNum "ch" );
    
    for( new 
iNum i++ )
    {
        
id iPlayers];
        
        
set_hudmessage(1001001000.010.1301.01.0__, -1)
        
len format(buffercharsmax(buffer), "%L",LANG_PLAYER,"RANK");
         
// this
    
if(is_user_alive(id))
    {
    
        if ( 
PlayerLevelid ] <= 18 )
        {
            
needXPid ] = LEVELSPlayerLevelid ] ] - PlayerXPid ];
            
len += format(buffer[len], charsmax(buffer) - len" %L",LANG_PLAYER,RANKS[PlayerLevel[id]]);
            
len += format(buffer[len], charsmax(buffer) - len"^n%L %d",LANG_PLAYER,"PL_XP",PlayerXP[id]);
            
len += format(buffer[len], charsmax(buffer) - len"^n%L",LANG_PLAYER,"NEXT_LVL");
            
len += format(buffer[len], charsmax(buffer) - len" %d ",needXP[id]);
            
len += format(buffer[len], charsmax(buffer) - len"%L",LANG_PLAYER,"FRAGS");
        } 
        else 
        {
            
len += format(buffer[len], charsmax(buffer) - len" %L",LANG_PLAYER,RANKS[PlayerLevel[id]]);
            
len += format(buffer[len], charsmax(buffer) - len"^n%L",LANG_PLAYER,"PL_MAX");
        }
        
        
ShowSyncHudMsgid g_MsgHud buffer );
    }
        
// here if user dead hide his rank
        
return PLUGIN_HANDLED
   
}

    return 
PLUGIN_CONTINUE

i just added if(is_user_alive(id)) and an return handled.
and would be nice if you help me creating a fuction that will show the rank of the player you spectact. that means if you die, your rank already will hide but will show another player rank when you spectate him. thanks by the way!!
newb1e 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 09:29.


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