Raised This Month: $ Target: $400
 0% 

VIP on Scoreboard


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Afternova
Junior Member
Join Date: Sep 2015
Location: Riga, Latvia
Old 10-02-2015 , 23:24   VIP on Scoreboard
Reply With Quote #1

Hello!

I want to achieve that VIP flag show on Scoreboard.

If i'm in CT i see all CT and T vip flags on score board, but if i switch to T vip flags don't show.



Code:
#include < amxmodx > 
#include < amxmisc > 

#define ADMIN_VIP ADMIN_LEVEL_H 

enum { 
    SCOREATTRIB_ARG_PLAYERID = 1, 
    SCOREATTRIB_ARG_FLAGS 
}; 

enum ( <<= 1 ) { 
    SCOREATTRIB_FLAG_NONE = 0, 
    SCOREATTRIB_FLAG_DEAD = 1, 
    SCOREATTRIB_FLAG_BOMB, 
    SCOREATTRIB_FLAG_VIP 
}; 

new pCvar_AdminVIP; 

public plugin_init( ) { 
    register_plugin( "Admin VIP ScoreBoard", "0.0.1", "AUTHOR" ); 
     
    register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" ); 
     
    pCvar_AdminVIP = register_cvar( "amx_adminvip", "1" ); 
} 

public MessageScoreAttrib( iMsgId, iDest, iReceiver ) { 
    if( get_pcvar_num( pCvar_AdminVIP ) ) { 
        new iPlayer = get_msg_arg_int( SCOREATTRIB_ARG_PLAYERID ); 
         
        if( access( iPlayer, ADMIN_VIP ) ) { 
            set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP ); 
        } 
    } 
}
Thank you very much!

Last edited by Afternova; 10-02-2015 at 23:24.
Afternova 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 22:17.


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