AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Add VIP Tag to terrorist. (https://forums.alliedmods.net/showthread.php?t=245612)

DataCore 08-04-2014 16:18

Add VIP Tag to terrorist.
 
Hello!

I have vipmenu, and there adds VIP tag to CT http://prntscr.com/49jwhy, but how can i add it to terrorists to if user is VIP.

PHP Code:

const VipFlags ADMIN_LEVEL_H;

enum {
    
SCOREATTRIB_ARG_PLAYERID 1,
    
SCOREATTRIB_ARG_FLAGS
};

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

public 
MessageScoreAttribiMsgId iDest iReceiver ) {
    new 
iPlayer get_msg_arg_intSCOREATTRIB_ARG_PLAYERID );
    
    if( 
is_user_aliveiPlayer ) && get_user_flagsiPlayer ) & VipFlags && cs_get_user_teamiPlayer ) == CS_TEAM_CT )
        
set_msg_arg_intSCOREATTRIB_ARG_FLAGS ARG_BYTE SCOREATTRIB_FLAG_VIP );



wickedd 08-04-2014 17:06

Re: Add VIP Tag to terrorist.
 
Not possible

Edit: Only CTs will be able to see VIP on the scoreboard

DataCore 08-04-2014 17:11

Re: Add VIP Tag to terrorist.
 
I`ve seen VIP tag on terrorists...

wickedd 08-04-2014 17:20

Re: Add VIP Tag to terrorist.
 
Search the forum and you will see that only CTs can see VIP on the scoreboard.

Edit: Just to clarify. You can set a VIP tag on anyone (CT or TT), but only the CT team will be able to see it.

popeye10 08-13-2014 07:51

Re: Add VIP Tag to terrorist.
 
Nothing is impossible ....:D

popeye10 08-13-2014 07:55

Re: Add VIP Tag to terrorist.
 
PHP Code:

public plugin_init()

        
register_event("ResetHUD","Event_reset_hud","be")
}

public 
Event_reset_hud(id)
    if(
get_user_flags(id) & VIP_ACCESSsetVipScoreAttrib(id)

stock setVipScoreAttrib(id)
{
    if(
is_user_alive(id)){
        
message_begin(MSG_ALL,84,{0,0,0},id)
        
write_byte(id)
        
write_byte(4)
        
message_end()
    }



HamletEagle 08-13-2014 08:36

Re: Add VIP Tag to terrorist.
 
Quote:

Originally Posted by popeye10 (Post 2183373)
Nothing is impossible ....:D

It's impossible since the way in which cs is build block it. This is because the vip has to be protected on maps like as_oilrig. Your code has the same limitations, T can't see the vip tag.

DataCore 08-14-2014 14:55

Re: Add VIP Tag to terrorist.
 
Thanks guys!


All times are GMT -4. The time now is 12:52.

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