Всем привет!
Столкнулся с неожиданной проблемой, VIP в табе не отображается для Террористов.
Как мне объяснили, живые Т ни при каких условиях не могут увидеть VIP у Т в табе и это особенность движка cs.
Быть может, кто-нибудь знает как обойти это досадное ограничение?
Чтобы VIP показывался в табе всем.
Код:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
public plugin_init() {
register_plugin("Admins VIP", "1.0", "UNREAL/Esecman/serfreeman1337")
RegisterHam(Ham_Spawn,"player","VIP",1)
register_message( get_user_msgid( "ScoreAttrib" ), "msgScoreAttrib" )
}
public VIP(id) {
if(!is_user_alive(id))
return HAM_IGNORED
if(get_user_flags(id) & ADMIN_LEVEL_G){
DropWeaponSlot(id,2)
fm_give_item(id,"weapon_hegrenade")
fm_give_item(id,"item_assaultsuit")
fm_give_item(id,"weapon_deagle")
fm_give_item(id,"ammo_50ae")
fm_give_item(id,"ammo_50ae")
fm_give_item(id,"ammo_50ae")
fm_give_item(id,"ammo_50ae")
fm_give_item(id,"ammo_50ae")
}
return HAM_IGNORED
}
DropWeaponSlot( iPlayer, iSlot ){
static const m_rpgPlayerItems = 367; // player
static const m_pNext = 42; // weapon_*
static const m_iId = 43; // weapon_*
if( !( 1 <= iSlot <= 2 ) ) {
return 0;
}
new iCount;
new iId
new iEntity = get_pdata_cbase( iPlayer, ( m_rpgPlayerItems + iSlot ), 5 );
if( iEntity > 0 ) {
new iNext;
do {
iNext = get_pdata_cbase( iEntity, m_pNext, 4 );
iId = get_pdata_int( iEntity, m_iId, 4 )
if( iId ) {
fm_strip_user_gun( iPlayer, iId)
iCount++;
}
} while( ( iEntity = iNext ) > 0 );
}
return iCount;
}
public msgScoreAttrib(const MsgId, const MsgType, const MsgDest) { //xpaw's code
#define is_user_cool(%1) ( get_user_flags(%1) & ADMIN_LEVEL_G ) // set to whatever you want
#define VIP_TAG (1<<2)
#define ARG_PLAYER_ID 1
#define ARG_SCOREBOARD_TAG 2
if( is_user_cool( get_msg_arg_int(ARG_PLAYER_ID) ) && !get_msg_arg_int(ARG_SCOREBOARD_TAG) )
set_msg_arg_int( ARG_SCOREBOARD_TAG, ARG_BYTE, VIP_TAG )
}