Error al compilar
#1
Hola, tengo un plugin de vip que al querer compilar me sale este error alguna solucion?

Cita:AMX Mod X Compiler 1.9.0.5294
Copyright © 1997-2006 ITB CompuPhase
Copyright © 2004-2013 AMX Mod X Team

Error: Undefined symbol "SCORE_STATUS_VIP" on line 1022
Error: Number of arguments does not match definition on line 1022

2 Errors.
Could not locate output file C:\Users\Documents\Plugin\vip.amx (compile failed).
Responder
#2
Qué tal si adjuntas el código? Interesting
Responder
#3
(28/05/2022, 07:54 PM)Valentina. escribió: Qué tal si adjuntas el código?  Interesting

perdon me olvide ese pequeño detalle

Código PHP:
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <json>

// Support GCMS
#tryinclude <gamecms5>

// Helper stocks
#include <emma_jule>

// native admin_expired(id);

const EntVars:viewmodel var_noise1// string_t
const EntVars:playermodel var_noise2// string_t
const EntVars:gunmodel var_message// string_t

stock const EntVars:weapon_access var_iuser4// int
stock const EntVars:weapon_speed var_fuser4// float
stock const EntVars:private_access var_noise// string_t

const FFADE_IN 0x0000;
const 
UNIT_SECOND = (<< 12);
const 
INVALID_ACCESS = (<< 31);

const 
MAX_CUSTOM_WEAPONS 64;

enum _:CVARS
{
    
// Core
    
ACCESS_MODE,
    
MENU_ROUND,
    
    
// Info
    
TAB_ACCESS,
    
ONLINE_ACCESS,
    
ONLINE_PLAYERS,
    
CONNECT_ACCESS,
    
    
// Equip
    
EQUIP_ROUND,
    
EQUIP_ONLY_1,
    
EQUIP_HE_ACCESS,
    
EQUIP_HE_NUMS,
    
EQUIP_FLASH_ACCESS,
    
EQUIP_FLASH_NUMS,
    
EQUIP_SMOKE_ACCESS,
    
EQUIP_SMOKE_NUMS,
    
EQUIP_AUTO_RELOAD_ACCESS,
    
EQUIP_ARMOR_ACCESS,
    
EQUIP_DKIT_ACCESS,
    
EQUIP_NIGHTVISION_ACCESS,
    
EQUIP_KNIFE_ACCESS,
    
EQUIP_SILENT_RUN_ACCESS,
    
    
// Abilities
    
ABILITY_FALL_DAMAGE,
    
ABILITY_PLANT_UNFREEZE,
    
ABILITY_ANTIFLASH,
    
ABILITY_MULTIJUMPS,
    
ABILITY_MULTIJUMP_COUNT,
    
ABILITY_HOOK_DAMAGE,
    
ABILITY_HOOK_DAMAGE_CHANCE,
    
ABILITY_HEALTH,
    
ABILITY_INSTANT_RELOAD_MODE,
    
ABILITY_INSTANT_RELOAD,
    
    
MENU_MODE,
    
ONLY_IN_BUYZONE,
    
EXPIRED,
    
Float:HEALTH_AMOUNT,
    
Float:EXPIRED_TIME,
    
    
// Bonuses
    
BONUS_ACCESS,
    
BONUS_FRAGS,
    
BONUS_KILLED,
    
BONUS_EXPLODE_BOMB,
    
BONUS_PLANT_BOMB,
    
BONUS_DEFUSED_BOMB,
    
BONUS_HOSTAGE_TOOK,
    
BONUS_HOSTAGE_RESCUED,
    
BONUS_VIP_KILLED,
    
BONUS_VIP_RESCUED_MYSELF,
    
Float:BONUS_ROUND,
    
Float:BONUS_DISCOUNT,
    
    
// Vampire
    
VAMPIRE_ACCESS,
    
Float:VAMPIRE_HEALTH,
    
Float:VAMPIRE_HEALTH_HS,
    
Float:VAMPIRE_HEALTH_NADE,
    
Float:VAMPIRE_HEALTH_MAX,
    
VAMPIRE_SCREENFADE,
    
VAMPIRE_HUD,
    
// VAMPIRE_OBEY_LIMIT,
    
VAMPIRE_PREVENT_MULTIPLY,
    
VAMPIRE_SAMPLE[MAX_RESOURCE_PATH_LENGTH]
    
};    new 
g_eCvar[CVARS];

enum _:WEAPON_DATA
{
    
NAME[64],    // Ð´Ð»Ñ ArrayFindString
    
    
ACCESS,
    
SERVICE[64],
    
BASE_NAME[24],
    
V_MODEL[MAX_RESOURCE_PATH_LENGTH],
    
P_MODEL[MAX_RESOURCE_PATH_LENGTH],
    
W_MODEL[MAX_RESOURCE_PATH_LENGTH],
    
Float:STAB_DISTANCE,
    
Float:SWING_DISTANCE,
    
Float:STAB_DAMAGE,
    
Float:SWING_DAMAGE,
    
Float:BASE_DAMAGE,
    
Float:SPEED_MULTIPLY,
    
AMMO,
    
BPAMMO,
    
GIVE_MODE,
    
COST,
    
ROUND,
    
PRIVATE_TOUCHES,
    
TeamNameTEAM,
    
FREE,    // NULL
    
MENU_FOLDER[64]    // NULL

};    new Array:g_aCustomWeaponsg_iCustomWeaponsNum;

enum (<<=1)
{
    
NO_PRIMARY 1// 1
    
DIE_IN_PREVIOUS_ROUND// 2
    
ADDITION_ITEMS // 4
};

new 
g_szAuthID[MAX_PLAYERS 1][MAX_AUTHID_LENGTH], g_iUsageCount[MAX_PLAYERS 1], g_iCustomWeaponLeftRounds[MAX_PLAYERS 1][MAX_CUSTOM_WEAPONS];
new Array:
g_aSampleConnectMusic, Array:g_aMenuSectionsg_SamplesConnectNum;
new 
Trie:g_tMaxUsagesTrie:g_tUsagesRoundRestrictionsTrie:g_tDefaultWeapons// Trie:g_tWallClassNames
new bool:g_IsNoVIPMenuOnThisMap falsebool:g_IsNoEquipOnThisMap false;
new 
HamHook:g_fC4_NextAttack;
new 
g_szMapName[64];

public 
plugin_natives()
{
    
set_native_filter("native_filter_handler");
}

public 
native_filter_handler(const native_func[], indextrap)
{
    if (
equal(native_func"admin_expired"))
    {
        if (!
trap)
        {
            
// #undef admin_expired
            
return PLUGIN_HANDLED;
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
plugin_precache()
{
    
register_plugin("VIP System""2.2.0""Emma Jule");
    
    
// Get current map name
    
get_mapname(g_szMapNamecharsmax(g_szMapName));
    
    
//
    
g_aCustomWeapons ArrayCreate(WEAPON_DATA0);
    
g_aSampleConnectMusic ArrayCreate(MAX_RESOURCE_PATH_LENGTH0);
    
g_aMenuSections ArrayCreate(640);
    
g_tMaxUsages TrieCreate();
    
g_tUsagesRoundRestrictions TrieCreate();
    
    
// Fix get_weaponid() Ð¿Ð¾ÑÐ»Ðµ Ñ€ÐµÐ»Ð¾Ð°Ð´Ð° ÑÐµÑ€Ð²ÐµÑ€Ð° Ð²ÑÐµÐ³Ð´Ð° Ð±ÑƒÐ´ÐµÑ‚ 0
    
g_tDefaultWeapons TrieCreate();
    {
        
enum eWeapons NAME[17], CSW };
        static const 
eDefWeapons[][eWeapons] = {
            { 
"p228" CSW_P228 }, { "scout" CSW_SCOUT }, { "hegrenade" CSW_HEGRENADE }, { "xm1014" CSW_XM1014 },
            { 
"mac10" CSW_MAC10 }, { "aug" CSW_AUG }, { "smokegrenade" CSW_SMOKEGRENADE }, { "elite" CSW_ELITE },
            { 
"fiveseven" CSW_FIVESEVEN }, { "ump45" CSW_UMP45 }, { "sg550" CSW_SG550 }, { "galil" CSW_GALIL },
            { 
"famas" CSW_FAMAS }, { "usp" CSW_USP }, { "glock18" CSW_GLOCK18 }, { "awp" CSW_AWP },
            { 
"mp5navy" CSW_MP5NAVY }, { "m249" CSW_M249 }, { "m3" CSW_M3 }, { "m4a1" CSW_M4A1 },
            { 
"tmp" CSW_TMP }, { "g3sg1" CSW_G3SG1 }, { "flashbang" CSW_FLASHBANG }, { "deagle" CSW_DEAGLE },
            { 
"sg552" CSW_SG552 }, { "ak47" CSW_AK47 }, { "knife" CSW_KNIFE }, { "p90" CSW_P90 }
        };
        
        for (new 
sizeof(eDefWeapons) - 1>= 0; --i)
            
TrieSetCell(g_tDefaultWeaponseDefWeapons[i][NAME], eDefWeapons[i][CSW]);
    }
    
    
// Load system
    
if (!LoadSettings())
        
set_fail_state("Something went wrong");
    
    if (
g_aCustomWeapons)
        
server_print("[VIP System] Ð£ÑÐ¿ÐµÑˆÐ½Ð¾ Ð·Ð°Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¾ %i ÐºÐ°ÑÑ‚омных Ð¾Ñ€ÑƒÐ¶Ð¸Ð¹!"g_iCustomWeaponsNum ArraySize(g_aCustomWeapons));
    
    if (!
g_aSampleConnectMusic)
        
ArrayDestroy(g_aSampleConnectMusic);
    else
        
g_SamplesConnectNum ArraySize(g_aSampleConnectMusic);
    
    if (
TrieGetSize(g_tMaxUsages) < 1)
        
TrieDestroy(g_tMaxUsages);
    
    
TrieDestroy(g_tDefaultWeapons);
}

public 
plugin_init()
{
    if (
register_dictionary("vip_system.txt") == 0)
    {
        
// createLangFile();
    
}
    
    if (
g_eCvar[TAB_ACCESS])
        
register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib");
    
    
//if (g_eCvar[ONLY_IN_BUYZONE])
        // register_event("StatusIcon", "Event_HideStatusIcon", "b", "1=0", "2=buyzone");
    
    
if (!g_IsNoEquipOnThisMap)
        
RegisterHookChain(RG_CBasePlayer_OnSpawnEquip"CBasePlayer_OnSpawnEquip"true);
    
    if (
get_member_game(m_bMapHasBombTarget))
    {
        if (
g_eCvar[ABILITY_PLANT_UNFREEZE])
        {
            
// ConnorMcLeod
            
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_c4""CBaseWeapon_C4_PrimaryAttack"false);
            
DisableHamForward(g_fC4_NextAttack RegisterHam(Ham_Weapon_PrimaryAttack"weapon_c4""CBaseWeapon_C4_PrimaryAttack_P"true));
            
            
RegisterHookChain(RG_CGrenade_DefuseBombStart"CGrenade_DefuseBombStart"true);
        }
        
        if (
g_eCvar[BONUS_ACCESS])
        {
            if (
g_eCvar[BONUS_EXPLODE_BOMB])
                
RegisterHookChain(RG_CGrenade_ExplodeBomb"CGrenade_ExplodeBomb"false);
            
            if (
g_eCvar[BONUS_PLANT_BOMB])
                
RegisterHookChain(RG_PlantBomb"PlantBomb"true);
            
            if (
g_eCvar[BONUS_DEFUSED_BOMB])
                
RegisterHookChain(RG_CGrenade_DefuseBombEnd"CGrenade_DefuseBombEnd"true);
        }
    }
    
    if (
g_eCvar[BONUS_ACCESS])
    {
        
RegisterHookChain(RG_CBasePlayer_AddAccount"CBasePlayer_AddAccount"false);
        if (
g_eCvar[BONUS_FRAGS])
            
RegisterHookChain(RG_CBasePlayer_AddPoints"CBasePlayer_AddPoints"false);
    }
    
    if (
g_eCvar[ABILITY_MULTIJUMPS])
        
RegisterHookChain(RG_CBasePlayer_Jump"CBasePlayer_Jump"true);
    
    if (
g_eCvar[ABILITY_FALL_DAMAGE])
        
RegisterHookChain(RG_CSGameRules_FlPlayerFallDamage"CSGameRules_FlPlayerFallDamage"true);
    
    if (
g_eCvar[ABILITY_ANTIFLASH])
        
RegisterHookChain(RG_PlayerBlind"CBasePlayer_PlayerBlind"false);
    
    if (
g_eCvar[ABILITY_HOOK_DAMAGE])
        
RegisterHookChain(RG_CSGameRules_FPlayerCanTakeDamage"CSGameRules_FPlayerCanTakeDamage"false);
    
    
// RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "CBasePlayer_ResetMaxSpeed", true);
    
RegisterHookChain(RG_CBasePlayer_Killed"CBasePlayer_Killed"true);
    
    if (
g_iCustomWeaponsNum 0)
    {
        
RegisterHookChain(RG_CSGameRules_RestartRound"CSGameRules_RestartRound"false);
        
RegisterHookChain(RG_CBasePlayer_ThrowGrenade"CBasePlayer_ThrowGrenade"true);
        
RegisterHookChain(RG_CBasePlayerWeapon_DefaultDeploy"CBasePlayerWeapon_DefaultDeploy"false);
        
RegisterHookChain(RG_CWeaponBox_SetModel"CWeaponBox_SetModel"false);
        
        
RegisterHam(Ham_Touch"weaponbox""CWeaponBox_Touch"false);
    }
}

public 
client_disconnected(id)
{
    
TrieSetArray(g_tUsagesRoundRestrictionsg_szAuthID[id], g_iCustomWeaponLeftRounds[id], sizeof(g_iCustomWeaponLeftRounds[]));
    
    
g_szAuthID[id][0] = '^0';
}

public 
client_authorized(id, const szAuth[])
{
    if (!
TrieGetArray(g_tUsagesRoundRestrictionsszAuthg_iCustomWeaponLeftRounds[id], sizeof(g_iCustomWeaponLeftRounds[])))
    {
        
g_iCustomWeaponLeftRounds[id][0] = '^0';
    }
    
    
copy(g_szAuthID[id], charsmax(g_szAuthID[]), szAuth);
}

// ÐŸÐ¾ÑÐ»Ðµ Ð¿Ñ€Ð¾Ð³Ñ€ÑƒÐ·ÐºÐ¸ Ð»Ð¾Ð°Ð´ÐµÑ€Ð¾Ð²
public client_putinserver(id)
{
    if (!
g_eCvar[CONNECT_ACCESS])
        return;
    
    
set_task(1.25"@print_vip"id);
}

@
print_vip(id)
{
    if (!
UTIL_IsAccessGranted(idg_eCvar[CONNECT_ACCESS]))
        return;
    
    
client_print_color(0id"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_CONNECT_INFO"id);
    
    if (
g_SamplesConnectNum 0)
        
rg_send_audio(0fmt("sound/%a"ArrayGetStringHandle(g_aSampleConnectMusicrandom(g_SamplesConnectNum))));
}

public 
clcmd_vip_menu(id)
{
    if (
g_iCustomWeaponsNum 1)
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_NO_CUSTOM_WEAPONS");
        return 
PLUGIN_HANDLED;
    }
    
    if (
g_IsNoVIPMenuOnThisMap)
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_NO_CUSTOM_WEAPONS_ON_THIS_MAP");
        return 
PLUGIN_HANDLED;
    }
    
    if (
rg_get_current_round() < g_eCvar[MENU_ROUND])
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_ROUND"g_eCvar[MENU_ROUND]);
        return 
PLUGIN_HANDLED;
    }

    if (!
rg_user_in_buyzone(id))
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_NOT_IN_BUYZONE");
        return 
PLUGIN_HANDLED;
    }
    
    if (!
is_user_alive(id))
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_NOT_ALIVE");
        return 
PLUGIN_HANDLED;
    }
    
    if (
UTIL_IsTimeExpired(idg_eCvar[EXPIRED_TIME]))
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_TIME_EXPIRED");
        return 
PLUGIN_HANDLED;
    }
    
    new 
iAmount;
    if (
UTIL_IsMaxTimesReached(idiAmount))
    {
        if (
iAmount 0)
            
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_MAX_USE");
        
        return 
PLUGIN_HANDLED;
    }
    
    
// Show vip weapons
    
show_vip_menu(id);
    
    return 
PLUGIN_HANDLED;
}

show_vip_menu(id)
{
    new 
iAmount;
    
UTIL_IsMaxTimesReached(idiAmount);
#if defined admin_expired
    
new menu menu_create(fmt("%L"LANG_PLAYER"VIP_MENU_TITLE"g_iUsageCount[id], iAmountUTIL_ShowExpiredTime(admin_expired(id))), "vip_menu_handler");
#else
    
new menu menu_create(fmt("%L"LANG_PLAYER"VIP_MENU_TITLE_WITHOUT_EXPIRED"g_iUsageCount[id], iAmount), "vip_menu_handler");
#endif
    // Load sections
    
for (new iaSize ArraySize(g_aMenuSections); aSizei++)
        
menu_additem(menufmt("%a"ArrayGetStringHandle(g_aMenuSectionsi)), fmt("%i"MAX_CUSTOM_WEAPONS i));
    
    
// Load weapons
    
FillCustomWeapons(idmenu);
    
    if (
menu_items(menu) < 1)
    {
        
// client_print_color(id, print_team_red, "%L %L", LANG_PLAYER, "VIP_PREFIX", LANG_PLAYER, "VIP_NO_ACCESS");
        
menu_destroy(menu);
        return;
    }
    
    
menu_setprop(menuMPROP_SHOWPAGEfalse);
    
menu_setprop(menuMPROP_NEXTNAMEfmt("%L"LANG_PLAYER"VIP_MENU_NEXT"));
    
menu_setprop(menuMPROP_BACKNAMEfmt("%L"LANG_PLAYER"VIP_MENU_BACK"));
    
menu_setprop(menuMPROP_EXITNAMEfmt("%L"LANG_PLAYER"VIP_MENU_EXIT"));
    
    
menu_display(idmenu);
}

public 
vip_menu_handler(idmenuitem)
{
    
// Just EXIT
    
if (item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    if (!
is_user_alive(id))
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_NOT_ALIVE");
        return 
PLUGIN_HANDLED;
    }
    
    if (
UTIL_IsTimeExpired(idg_eCvar[EXPIRED_TIME]))
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_TIME_EXPIRED");
        return 
PLUGIN_HANDLED;
    }
    
    if (!
rg_user_in_buyzone(id))
    {
        
client_print_color(idprint_team_red"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_NOT_IN_BUYZONE");
        return 
PLUGIN_HANDLED;
    }
    
    new 
szID[6], szMenu[64];
    
menu_item_getinfo(menuitem, .info szID, .infolen charsmax(szID), .name szMenu, .namelen charsmax(szMenu));
    
menu_destroy(menu);
    new 
strtol(szID);
    
    if (
MAX_CUSTOM_WEAPONS)
    {
        new 
aWeapon[WEAPON_DATA];
        
ArrayGetArray(g_aCustomWeaponsiaWeapon);
        
        if (
get_member(idm_iAccount) < aWeapon[COST])
        {
            
UTIL_BlinkAcct(MSG_ONE_UNRELIABLEid2);
            return 
PLUGIN_HANDLED;
        }
        
        if (
give_item(idaWeapon))
        {
            
//
            
rg_add_account(id, -aWeapon[COST]);
            
            
client_print_color(idprint_team_blue"%L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_BUY_CUSTOM_GUN"aWeapon[NAME])
            if (
aWeapon[ROUND] > 0)
                
g_iCustomWeaponLeftRounds[id][i] = aWeapon[ROUND];
            
            
g_iUsageCount[id]++;
            if (!
UTIL_IsMaxTimesReached(id) && (g_eCvar[MENU_MODE] & ADDITION_ITEMS))
                
show_vip_menu(id);
        }
    }
    else
    {
        
menu menu_create(NULL_STRING"vip_menu_handler");
        
        
// Load weapons
        
FillCustomWeapons(idmenuszMenu);
        
        if ((
menu_items(menu)) < 1)
        {
            
// client_print_color(id, print_team_red, "%L %L", LANG_PLAYER, "VIP_PREFIX", LANG_PLAYER, "VIP_NO_ACCESS");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        
        
menu_setprop(menuMPROP_TITLEfmt("%L"LANG_PLAYER"VIP_SECTION_MENU_TITLE"szMenui));
        
menu_setprop(menuMPROP_SHOWPAGEfalse);
        
menu_setprop(menuMPROP_NEXTNAMEfmt("%L"LANG_PLAYER"VIP_MENU_NEXT"));
        
menu_setprop(menuMPROP_BACKNAMEfmt("%L"LANG_PLAYER"VIP_MENU_BACK"));
        
menu_setprop(menuMPROP_EXITNAMEfmt("%L"LANG_PLAYER"VIP_MENU_EXIT"));
        
        
menu_display(idmenu);
    }
    
    return 
PLUGIN_HANDLED;
}

// Load custom weapons
FillCustomWeapons(const id, const menu, const folder[] = "")
{
    
// 
    
for (new iTeamName:team get_member(idm_iTeam), iAccount get_member(idm_iAccount), aWeapon[WEAPON_DATA], szMenu[128], pAccessg_iCustomWeaponsNumi++)
    {
        
ArrayGetArray(g_aCustomWeaponsiaWeapon);
        
        if (!
aWeapon[NAME][0])
            continue;
        
        if (
strcmp(folderaWeapon[MENU_FOLDER]) != 0)
            continue;
        
        if (
TEAM_UNASSIGNED aWeapon[TEAM] < TEAM_SPECTATOR && team != aWeapon[TEAM])
            continue;
        
        if (
aWeapon[SERVICE][0])
        {
        
#if defined _gamecms5_included
            
if (aWeapon[SERVICE][0] == '_' && cmsapi_get_user_services(id, .szService aWeapon[SERVICE]) == Invalid_Array)
                continue;
            else if (
strcmp(g_szAuthID[id], aWeapon[SERVICE]) != 0)
        
#else
            
if (strcmp(g_szAuthID[id], aWeapon[SERVICE]) != 0)
        
#endif
                
continue;
        }
        
        
// Fixes
        
szMenu[0] = '^0';
        
pAccess aWeapon[ACCESS];
        
        
// API Things
        // ExecuteForward();
        
        
formatex(szMenucharsmax(szMenu), aWeapon[NAME]);
        
        if (
aWeapon[BASE_DAMAGE] > 1.0)
            
strcat(szMenufmt(" %L"LANG_PLAYER"VIP_WEAPON_DAMAGE_ATTRIB", ((aWeapon[BASE_DAMAGE] - 1.0) * 100.0 1.0)), charsmax(szMenu));
        
        
strcat(szMenufmt(" %L"LANG_PLAYER"VIP_WEAPON_MONEY_ATTRIB"aWeapon[COST]), charsmax(szMenu));
        
        if (
iAccount aWeapon[COST])
            
pAccess INVALID_ACCESS;
        
        if (
g_iCustomWeaponLeftRounds[id][i] > 0)
        {
            
strcat(szMenufmt(" %L"LANG_PLAYER"VIP_WEAPON_INVALID_ROUND"g_iCustomWeaponLeftRounds[id][i]), charsmax(szMenu));
            
pAccess INVALID_ACCESS;
        }
        
        
menu_additem(menuszMenufmt("%i"i), pAccess);
    }
}

// ÐšÐ¾Ð¼Ð°Ð½Ð´Ð° /vips
public clcmd_vip_online(id)
{
    new 
aPlayers[MAX_PLAYERS], iPlayerspVIPiCountszText[192];
    new 
iMaxVisiblePlayers g_eCvar[ONLINE_PLAYERS];
    
get_players(aPlayersiPlayers"ch");
    
    while (--
iPlayers >= 0)
    {
        
pVIP aPlayers[iPlayers];
        
        if (!
UTIL_IsAccessGranted(pVIPg_eCvar[ONLINE_ACCESS]))
            continue;
        
        if (++
iCount == 1)
            
strcat(szTextfmt("%n"pVIP), charsmax(szText));
        else if (
iCount <= iMaxVisiblePlayers)
            
strcat(szTextfmt(", %n"pVIP), charsmax(szText));
    }
    
    if (
iCount 0)
    {
        if (
iCount iMaxVisiblePlayers)
            
strcat(szTextfmt(iCount iMaxVisiblePlayers == " Ð¸ ÐµÑ‰Ñ‘ 1" " Ð¸ %i Ð´Ñ€ÑƒÐ³Ð¸Ñ…"iCount iMaxVisiblePlayers), charsmax(szText));
        
        
client_print_color(idprint_team_blue"%L %L %s"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_ONLINE"szText);
    }
    else
        
client_print_color(idprint_team_red"%L %L %L"LANG_PLAYER"VIP_PREFIX"LANG_PLAYER"VIP_ONLINE"LANG_PLAYER"VIP_ONLINE_NO");
    
    return 
PLUGIN_HANDLED;
}

public 
Event_HideStatusIcon(const id)
{
    
// UTIL_CloseMenu(id);
}

public 
CSGameRules_RestartRound()
{
    if (
get_member_game(m_bCompleteReset))
    {
        
arrayset(g_iCustomWeaponLeftRounds[0][0], 0sizeof g_iCustomWeaponLeftRounds[] * sizeof g_iCustomWeaponLeftRounds);
        
        
TrieClear(g_tUsagesRoundRestrictions);
    }
    else
    {
        for (new 
MaxClients0i--)
        {
            for (new 
pWeaponpWeapon MAX_CUSTOM_WEAPONSpWeapon++)
            {
                
max(--g_iCustomWeaponLeftRounds[i][pWeapon], 0);
            }
        }
        
        new 
TrieIter:iter TrieIterCreate(g_tUsagesRoundRestrictions);
        {
            for (new 
szAuth[MAX_AUTHID_LENGTH], aArray[MAX_CUSTOM_WEAPONS], aSize; !TrieIterEnded(iter); TrieIterNext(iter))
            {
                
TrieIterGetKey(iterszAuthcharsmax(szAuth));
                
TrieIterGetArray(iteraArrayaSize sizeof(aArray));
                
                for (new 
iaSizei++)
                    
max(--aArray[i], 0);
                
                
TrieSetArray(g_tUsagesRoundRestrictionsszAuthaArrayaSize);
            }
            
            
TrieIterDestroy(iter);
        }
    }
}

public 
CBasePlayer_OnSpawnEquip(const id)
{
    if (
UTIL_IsAccessGranted(idg_eCvar[ABILITY_HEALTH]))
    {
        
set_entvar(idvar_healthFloatget_entvar(idvar_health) + g_eCvar[HEALTH_AMOUNT]);
    }
    
    if (
rg_get_current_round() < g_eCvar[EQUIP_ROUND])
        return;
    
    if (
g_eCvar[EQUIP_ONLY_1] && !rg_is_user_first_spawn(id))
        return;
    
    
// Reset counter
    
g_iUsageCount[id] = 0;
    
    
// Last Additions
    
if (UTIL_IsAccessGranted(idg_eCvar[EQUIP_HE_ACCESS]))
    {
        
rg_give_item(id"weapon_hegrenade");
        
rg_set_user_bpammo(idWEAPON_HEGRENADEg_eCvar[EQUIP_HE_NUMS]);
    }
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_FLASH_ACCESS]))
    {
        
rg_give_item(id"weapon_flashbang");
        
rg_set_user_bpammo(idWEAPON_FLASHBANGg_eCvar[EQUIP_FLASH_NUMS]);
    }
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_SMOKE_ACCESS]))
    {
        
rg_give_item(id"weapon_smokegrenade");
        
rg_set_user_bpammo(idWEAPON_SMOKEGRENADEg_eCvar[EQUIP_SMOKE_NUMS]);
    }
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_AUTO_RELOAD_ACCESS]))
        
rg_instant_reload_weapons(id);
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_ARMOR_ACCESS]))
        
rg_give_item(id"item_assaultsuit");
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_NIGHTVISION_ACCESS]))
        
set_member(idm_bHasNightVisiontrue);
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_SILENT_RUN_ACCESS]))
        
rg_set_user_footsteps(idtrue);
    
    if (
UTIL_IsAccessGranted(idg_eCvar[EQUIP_DKIT_ACCESS]) && get_member(idm_iTeam) == TEAM_CT)
        
rg_give_defusekit(idtrue);
    
    
//
    
if (g_iCustomWeaponsNum 1)
        return;
    
    
// Its free weapons
    
for (new iaWeapon[WEAPON_DATA]; g_iCustomWeaponsNumi++)
    {
        
ArrayGetArray(g_aCustomWeaponsiaWeapon);
        
        if (!
UTIL_IsAccessGranted(idaWeapon[FREE]))
            continue;
        
        
give_item(idaWeapon);
    }
    
    
// Fixes
    
if (rg_get_current_round() < g_eCvar[MENU_ROUND] || UTIL_IsMaxTimesReached(id))
        return;
    
    
// Show vip menu?
    
if ((g_eCvar[MENU_MODE] & NO_PRIMARY) && !rg_user_has_primary(id) || (g_eCvar[MENU_MODE] & DIE_IN_PREVIOUS_ROUND) && !get_member(idm_bNotKilled))
    {
        
show_vip_menu(id);
    }
}

public 
CBaseWeapon_C4_PrimaryAttack(const pWeapon)
{
    new 
id get_member(pWeaponm_pPlayer);
    
    
// ConnorMcLeod
    
if (UTIL_IsAccessGranted(idg_eCvar[ABILITY_PLANT_UNFREEZE]) && !get_member(pWeaponm_C4_bStartedArming) && rg_user_in_bombzone(id) && (get_entvar(idvar_flags) & FL_ONGROUND) == FL_ONGROUND)
    {
        
EnableHamForward(g_fC4_NextAttack);
    }
}

public 
CBaseWeapon_C4_PrimaryAttack_P(const pWeapon)
{
    
DisableHamForward(g_fC4_NextAttack);
    
    
// Def speed with bomb
    
set_entvar(get_member(pWeaponm_pPlayer), var_maxspeed250.0);
}

public 
PlantBomb(idFloat:vecStart[3], Float:vecVelocity[3])
{
    if (
UTIL_IsAccessGranted(idg_eCvar[BONUS_ACCESS]))
    {
        
rg_add_account(idg_eCvar[BONUS_PLANT_BOMB]);        
    }
}

public 
CGrenade_ExplodeBomb(const thistracehandle, const dmg_bits)
{
    new 
id get_entvar(thisvar_owner);
    
    if (
is_user_connected(id) && UTIL_IsAccessGranted(idg_eCvar[BONUS_ACCESS]))
    {
        
rg_add_account(idg_eCvar[BONUS_EXPLODE_BOMB]);
    }
}

public 
CGrenade_DefuseBombStart(const ent, const id)
{
    if (
UTIL_IsAccessGranted(idg_eCvar[ABILITY_PLANT_UNFREEZE]))
    {
        new 
Float:fSpeed 250.0;
        new 
pWeapon get_member(idm_pActiveItem);
        
        if (!
is_nullent(pWeapon))
            
ExecuteHamB(Ham_CS_Item_GetMaxSpeedpWeaponfSpeed);
        
        
set_entvar(idvar_maxspeedfSpeed);
    }
}

public 
CGrenade_DefuseBombEnd(const this, const idbool:bDefused)
{
    if (
bDefused && UTIL_IsAccessGranted(idg_eCvar[BONUS_ACCESS]))
    {
        
rg_add_account(idg_eCvar[BONUS_DEFUSED_BOMB]);
    }
}

public 
CBasePlayer_AddAccount(const idamountRewardType:typebool:bTrackChange)
{
    if (!
UTIL_IsAccessGranted(idg_eCvar[BONUS_ACCESS]))
        return;
    
    
// Def game bonuses
    
if (g_eCvar[BONUS_KILLED] && type == RT_ENEMY_KILLED)
        
SetHookChainArg(2ATYPE_INTEGERg_eCvar[BONUS_KILLED]);
    else if (
g_eCvar[BONUS_HOSTAGE_TOOK] && type == RT_HOSTAGE_TOOK)
        
SetHookChainArg(2ATYPE_INTEGERg_eCvar[BONUS_HOSTAGE_TOOK]);
    else if (
g_eCvar[BONUS_HOSTAGE_RESCUED] && type == RT_HOSTAGE_RESCUED)
        
SetHookChainArg(2ATYPE_INTEGERg_eCvar[BONUS_HOSTAGE_RESCUED]);    
    else if (
g_eCvar[BONUS_VIP_KILLED] && type == RT_VIP_KILLED)
        
SetHookChainArg(2ATYPE_INTEGERg_eCvar[BONUS_VIP_KILLED]);
    else if (
g_eCvar[BONUS_VIP_RESCUED_MYSELF] && type == RT_VIP_RESCUED_MYSELF)
        
SetHookChainArg(2ATYPE_INTEGERg_eCvar[BONUS_VIP_RESCUED_MYSELF]);
    else if (
g_eCvar[BONUS_DISCOUNT] && type == RT_PLAYER_BOUGHT_SOMETHING// shop discount
        
SetHookChainArg(2ATYPE_INTEGERfloatround(float(amount) - (amount 100.0 g_eCvar[BONUS_DISCOUNT]), floatround_ceil));
    else if (
g_eCvar[BONUS_ROUND] && type == RT_ROUND_BONUS// round terminating
        
SetHookChainArg(2ATYPE_INTEGERfloatround(float(amount) * g_eCvar[BONUS_ROUND]));
}

// Ð¡ÐºÐ¾Ñ€ÐµÐµ Ð²ÑÐµÐ³Ð¾ Ð² Ð±ÑƒÐ´ÑƒÑ‰ÐµÐ¼ ÑÑ‚от Ñ„орвард Ð±ÑƒÐ´ÐµÑ‚ Ð±Ð¾Ð»ÐµÐµ Ñ„ункциональней
// Ð”опустим ÑÑ‚о Ñ‚акже Ð±ÑƒÐ´ÐµÑ‚ Ð²Ñ‹Ð·Ñ‹Ð²Ð°Ñ‚ся ÐºÐ¾Ð³Ð´Ð° +3 Ð¾Ñ‚ Ð¿Ð¾Ð´Ñ€Ñ‹Ð²Ð° Ð¸Ð»Ð¸ Ñ€Ð°Ð·Ð¼Ð¸Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ð¾Ð¼Ð±Ñ‹
public CBasePlayer_AddPoints(const idscorebAllowNegativeScore)
{
    if (
UTIL_IsAccessGranted(idg_eCvar[BONUS_ACCESS]))
    {
        
SetHookChainArg(2ATYPE_INTEGERscore g_eCvar[BONUS_FRAGS]);
    }
}

public 
CSGameRules_FlPlayerFallDamage(const id)
{
    if (
UTIL_IsAccessGranted(idg_eCvar[ABILITY_FALL_DAMAGE]))
    {
        
SetHookChainReturn(ATYPE_FLOAT0.0);
    }
}

public 
CBasePlayer_PlayerBlind(const idinflictorattackerFloat:fadetime, const Float:fadehold, const alpha, const Float:color[3])
{
    if (
UTIL_IsAccessGranted(idg_eCvar[ABILITY_ANTIFLASH]))
    {
        
SetHookChainReturn(ATYPE_INTEGERfalse);
        return 
HC_SUPERCEDE;
    }
    
    return 
HC_CONTINUE;
}

public 
CBasePlayer_Jump(id)
{
    if (!
UTIL_IsAccessGranted(idg_eCvar[ABILITY_MULTIJUMPS]))
        return;
    
    new 
flags get_entvar(idvar_flags);
    
    
// Fixes
    
if (~flags FL_WATERJUMP && get_entvar(idvar_waterlevel) < && get_member(idm_afButtonPressed) & IN_JUMP)
    {
        static 
_j[MAX_PLAYERS 1];
        
        if (
flags FL_ONGROUND)
        {
            
_j[id] = 0;
        }
        else if (
Floatget_member(idm_flFallVelocity) < CS_PLAYER_MAX_SAFE_FALL_SPEED && _j[id]++ < g_eCvar[ABILITY_MULTIJUMP_COUNT])
        {
            static 
Float:vecSrc[3];
            
get_entvar(idvar_velocityvecSrc);
            
vecSrc[2] = 268.328157;
            
set_entvar(idvar_velocityvecSrc);
        }
    }
}

public 
CSGameRules_FPlayerCanTakeDamage(idattacker)
{
    if (!
VALID_PLAYER(attacker))
        return 
HC_CONTINUE;
        
    if (
id == attacker)
        return 
HC_CONTINUE;
    
    if (
UTIL_IsAccessGranted(idg_eCvar[ABILITY_HOOK_DAMAGE]) && random_num(1100) < g_eCvar[ABILITY_HOOK_DAMAGE_CHANCE])
    {
        
// set_member(id, m_flVelocityModifier, 1.0);
        
SetHookChainReturn(ATYPE_INTEGERfalse);
        return 
HC_SUPERCEDE;
    }
    
    return 
HC_CONTINUE;
}

public 
CBasePlayer_Killed(const pPlayer, const pevAttacker)
{
    
// UTIL_CloseMenu(pPlayer);
    
    
if (pPlayer == pevAttacker || !VALID_PLAYER(pevAttacker))
        return;
    
    if (
UTIL_IsAccessGranted(pevAttackerg_eCvar[ABILITY_INSTANT_RELOAD]))
    {
        if (
g_eCvar[ABILITY_INSTANT_RELOAD_MODE])
        {
            new 
pWeapon get_member(pevAttackerm_pActiveItem);
            if (!
is_nullent(pWeapon))
                
rg_instant_reload_weapons(pevAttackerpWeapon);
        }
        else
            
rg_instant_reload_weapons(pevAttacker);
    }
    
    if (
UTIL_IsAccessGranted(pevAttackerg_eCvar[VAMPIRE_ACCESS]))
    {
        if (
g_eCvar[VAMPIRE_PREVENT_MULTIPLY])
        {
            new 
Float:fCurTime get_gametime();
            static 
Float:fLastKill[MAX_CLIENTS 1];
            if (
fCurTime fLastKill[pevAttacker] < 0.2)
                return;
            
            
// Update as well
            
fLastKill[pevAttacker] = fCurTime 0.2;
        }
        
        new 
Float:fHealth
            
get_member(pPlayerm_bKilledByGrenade) ? g_eCvar[VAMPIRE_HEALTH_NADE]
            : 
get_member(pPlayerm_bHeadshotKilled) ? g_eCvar[VAMPIRE_HEALTH_HS]
            : 
g_eCvar[VAMPIRE_HEALTH]
        ;
        
        new 
Float:fClientHealthFloat:fMaxHealth;
        
get_entvar(pevAttackervar_healthfClientHealth);
        
        if ((
fMaxHealth g_eCvar[VAMPIRE_HEALTH_MAX]) <= 0.0)
            
fMaxHealth Floatget_entvar(pevAttackervar_max_health);
        
        if (
fClientHealth fMaxHealth)
        {
            
// Set new health
            
set_entvar(pevAttackervar_healthfloatmin(fClientHealth fHealthfMaxHealth));
            
            if (
g_eCvar[VAMPIRE_HUD])
            {
                
set_hudmessage(5022580, -1.00.2500.01.750.10.4);
                
show_hudmessage(pevAttacker"%L"LANG_PLAYER"VIP_VAMPIRE_HUD_INFO"fHealth);
            }
            
            if (
g_eCvar[VAMPIRE_SAMPLE][0])
                
client_cmd(pevAttacker"spk ^"%s^""g_eCvar[VAMPIRE_SAMPLE]);
            
            if (
g_eCvar[VAMPIRE_SCREENFADE])
                
UTIL_ScreenFade(pevAttacker);
        }
    }
}

public 
CBasePlayerWeapon_DefaultDeploy(pWeaponviewModel[], weaponModel[], animanimExt[], skiplocal)
{
    
// new id = get_member(pWeapon, m_pPlayer);
    
    
new szModel[MAX_RESOURCE_PATH_LENGTH];
    
get_entvar(pWeaponviewmodelszModelcharsmax(szModel));
    
    
// v_ model
    
if (szModel[0])
        
SetHookChainArg(2ATYPE_STRINGszModel);
    
    
get_entvar(pWeaponplayermodelszModelcharsmax(szModel));
    
    
// p_ model
    
if (szModel[0])
        
SetHookChainArg(3ATYPE_STRINGszModel);
}

public 
CWeaponBox_SetModel(pWeaponBox, const szModel[])
{
    new 
pWeapon UTIL_GetWeaponBoxWeapon(pWeaponBox);
    if (
pWeapon == NULLENT)
        return;
    
    
// w_ model
    
new szModel[MAX_RESOURCE_PATH_LENGTH];
    
get_entvar(pWeapongunmodelszModelcharsmax(szModel));
    if (
szModel[0])
        
SetHookChainArg(2ATYPE_STRINGszModel);
}

public 
CBasePlayer_ThrowGrenade()
{
    new 
pWeapon GetHookChainReturn(ATYPE_INTEGER);
    if (
is_nullent(pWeapon))
        return;
    
    
// w_ model (nades)
    
new szModel[MAX_RESOURCE_PATH_LENGTH];
    
get_entvar(pWeapongunmodelszModelcharsmax(szModel));
    if (
szModel[0])
        
engfunc(EngFunc_SetModelpWeaponszModel);
}

public 
CWeaponBox_Touch(pWeaponBoxid)
{
    if (!
ExecuteHam(Ham_IsPlayerid))
        return 
HAM_IGNORED;
    
    new 
pWeapon UTIL_GetWeaponBoxWeapon(pWeaponBox);
    if (
pWeapon == NULLENT)
        return 
HAM_IGNORED;
    
    new 
pAccess get_entvar(pWeaponweapon_access);
    if (
pAccess && !UTIL_IsAccessGranted(idpAccess))
    {
        
client_print(idprint_center"%L"LANG_PLAYER"VIP_CUSTOM_WEAPONS_BLOCK_PICKUP");
        return 
HAM_SUPERCEDE;
    }
    
    new 
szAccess[64];
    
get_entvar(pWeaponprivate_accessszAccesscharsmax(szAccess));
    if (!
szAccess[0])
        return 
HAM_IGNORED;
    
#if defined _gamecms5_included
    
if (szAccess[0] == '_' && cmsapi_get_user_services(id, .szService szAccess) == Invalid_Array)
    {
        
client_print(idprint_center"%L"LANG_PLAYER"VIP_CUSTOM_WEAPONS_BLOCK_PICKUP");
        return 
HAM_SUPERCEDE;
    }
    else if (
strcmp(g_szAuthID[id], szAccess) != 0)
#else
    
if (strcmp(g_szAuthID[id], szAccess) != 0)
#endif
    
{
        
client_print(idprint_center"%L"LANG_PLAYER"VIP_CUSTOM_WEAPONS_BLOCK_PICKUP");
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;
}

public 
CS_Item_GetMaxSpeed(const pWeapon)
{
    new 
Float:fSpeed;
    
get_entvar(pWeaponweapon_speedfSpeed);
    
    if (
fSpeed 0.0)
    {
        new 
pPlayer get_member(pWeaponm_pPlayer);
        
        
set_entvar(pPlayervar_maxspeedFloatget_entvar(pPlayervar_maxspeed) * fSpeed);
    }
}

public 
Message_ScoreAttrib(msg_idmsg_typemsg_entity)
{
    if (
get_msg_arg_int(2) > 0)
        return;
    
    if (!
UTIL_IsAccessGranted(get_msg_arg_int(1), g_eCvar[TAB_ACCESS]))
        return;
    
    
set_msg_arg_int(2ARG_BYTESCORE_STATUS_VIP);
}

LoadSettings()
{
    new 
szPath[PLATFORM_MAX_PATH];
    
get_localinfo("amxx_configsdir"szPathcharsmax(szPath));
    
add(szPathcharsmax(szPath), "/plugins");
    
    if (!
dir_exists(szPath))
        return 
false;
    
    
add(szPathcharsmax(szPath), "/vip_system.json");

    if (!
file_exists(szPath))
        return 
false;
    
    new 
JSON:jCFG json_parse(szPathtrue, .with_comments true);

    if (
jCFG == Invalid_JSON)
        return 
false;
    
    new 
szBuffer[128];
    new 
JSON:jMain json_object_get_value(jCFG"core");
    
    if (
json_is_object(jMain))
    {
        new 
JSON:jCommands json_object_get_value(jMain"commands");
        
        if (
json_is_array(jCommands))
        {
            for (new 
ijson_array_get_count(jCommands); i++)
            {
                
json_array_get_string(jCommandsiszBuffercharsmax(szBuffer));
                
                
// 
                
if (szBuffer[0] == '/' || szBuffer[0] == '!' || szBuffer[0] == '.')
                {
                    
register_clcmd(fmt("say %s"szBuffer), "clcmd_vip_menu");
                    
register_clcmd(fmt("say_team %s"szBuffer), "clcmd_vip_menu");
                }
                else
                {
                    
register_clcmd(szBuffer"clcmd_vip_menu");
                }
            }
            
            
json_free(jCommands);
        }
        
        
g_eCvar[ACCESS_MODE] = json_object_get_number(jMain"access_mode");
        
g_eCvar[MENU_ROUND] = json_object_get_number(jMain"round");
        
        new 
JSON:jMaps json_object_get_value(jMain"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
g_IsNoVIPMenuOnThisMap true;
                    
                    
server_print("[VIP System] Ð’ип Ð¼ÐµÐ½ÑŽ Ð¾Ñ‚ключёно, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jMain);
    }
    
    new 
JSON:jInformation json_object_get_value(jCFG"info");
    
    if (
json_is_object(jInformation))
    {
        
json_object_get_string(jInformation"tab"szBuffercharsmax(szBuffer));
        
g_eCvar[TAB_ACCESS] = read_flags(szBuffer);
        
        new 
JSON:jOnline json_object_get_value(jInformation"online");
        
        if (
json_is_object(jOnline))
        {
            
json_object_get_string(jOnline"online_access"szBuffercharsmax(szBuffer));
            
g_eCvar[ONLINE_ACCESS] = read_flags(szBuffer);
            
            if (
g_eCvar[ONLINE_ACCESS] > 0)
            {
                
g_eCvar[ONLINE_PLAYERS] = json_object_get_number(jOnline"online_players");
                
json_object_get_string(jOnline"online_command"szBuffercharsmax(szBuffer));
                
                if (
szBuffer[0] == '/' || szBuffer[0] == '!' || szBuffer[0] == '.')
                {
                    
register_clcmd(fmt("say %s"szBuffer), "clcmd_vip_online");
                    
register_clcmd(fmt("say_team %s"szBuffer), "clcmd_vip_online");
                }
                else
                {
                    
register_clcmd(szBuffer"clcmd_vip_online");
                }
            }
            
            
json_free(jOnline);
        }
        
        new 
JSON:jConnect json_object_get_value(jInformation"connect");
        
        if (
json_is_object(jConnect))
        {
            
json_object_get_string(jConnect"connect_access"szBuffercharsmax(szBuffer));
            
g_eCvar[CONNECT_ACCESS] = read_flags(szBuffer);
            
            new 
JSON:jMusic json_object_get_value(jConnect"connect_samples");
            
            if (
json_is_array(jMusic))
            {
                for (new 
ijson_array_get_count(jMusic); i++)
                {
                    
json_array_get_string(jMusiciszBuffercharsmax(szBuffer));
                    
                    if (
file_exists(fmt("sound/%s"szBuffer), .use_valve_fs true) == 1)
                    {
                        
precache_sound(szBuffer);
                        
                        
ArrayPushString(g_aSampleConnectMusicszBuffer);
                    }
                }
                
                
json_free(jMusic);
            }
            
            
json_free(jConnect);
        }
        
        new 
JSON:jMaps json_object_get_value(jInformation"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
//
                    
g_eCvar[TAB_ACCESS] = g_eCvar[ONLINE_ACCESS] = g_eCvar[CONNECT_ACCESS] = 0;
                    
ArrayDestroy(g_aSampleConnectMusic);
                    
                    
server_print("[VIP System] Ð Ð°Ð·Ð´ÐµÐ» Ð¸Ð½Ñ„ормирования Ð¾Ñ‚ключён, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jInformation);
    }
    
    new 
JSON:jEquip json_object_get_value(jCFG"equip_manager");
    
    if (
json_is_object(jEquip))
    {
        
g_eCvar[EQUIP_ROUND] = json_object_get_number(jEquip"equip_round");
        
g_eCvar[EQUIP_ONLY_1] = json_object_get_number(jEquip"equip_only_first_spawn");
        
        
json_object_get_string(jEquip"he"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_HE_ACCESS] = read_flags(szBuffer);
        
g_eCvar[EQUIP_HE_NUMS] = json_object_get_number(jEquip"he_value");
        
        
json_object_get_string(jEquip"flash"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_FLASH_ACCESS] = read_flags(szBuffer);
        
g_eCvar[EQUIP_FLASH_NUMS] = json_object_get_number(jEquip"flash_value");
        
        
json_object_get_string(jEquip"smoke"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_SMOKE_ACCESS] = read_flags(szBuffer);
        
g_eCvar[EQUIP_SMOKE_NUMS] = json_object_get_number(jEquip"smoke_value");
        
        
json_object_get_string(jEquip"auto_reload"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_AUTO_RELOAD_ACCESS] = read_flags(szBuffer);
        
        
json_object_get_string(jEquip"kevlar"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_ARMOR_ACCESS] = read_flags(szBuffer);
        
        
json_object_get_string(jEquip"defuse"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_DKIT_ACCESS] = read_flags(szBuffer);
        
        
json_object_get_string(jEquip"nightvision"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_NIGHTVISION_ACCESS] = read_flags(szBuffer);
        
        
json_object_get_string(jEquip"silent"szBuffercharsmax(szBuffer));
        
g_eCvar[EQUIP_SILENT_RUN_ACCESS] = read_flags(szBuffer);
        
        new 
JSON:jMaps json_object_get_value(jEquip"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
// g_eCvar[EQUIP_ROUND] = 99999;
                    
g_IsNoEquipOnThisMap true;
                    
                    
server_print("[VIP System] Ð Ð°Ð·Ð´ÐµÐ» ÑÐºÐ¸Ð¿Ð¸Ñ€Ð¾Ð²ÐºÐ¸ Ð¾Ñ‚ключён, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jEquip);
    }
    
    new 
JSON:jAbilities json_object_get_value(jCFG"abilities");
    
    if (
json_is_object(jAbilities))
    {
        
json_object_get_string(jAbilities"no_fall_dmg"szBuffercharsmax(szBuffer));
        
g_eCvar[ABILITY_FALL_DAMAGE] = read_flags(szBuffer);
        
        
json_object_get_string(jAbilities"plant_unfreeze"szBuffercharsmax(szBuffer));
        
g_eCvar[ABILITY_PLANT_UNFREEZE] = read_flags(szBuffer);
        
        
json_object_get_string(jAbilities"antiflash"szBuffercharsmax(szBuffer));
        
g_eCvar[ABILITY_ANTIFLASH] = read_flags(szBuffer);
        
        new 
JSON:jJumps json_object_get_value(jAbilities"jump");
        
        if (
json_is_object(jJumps))
        {
            
json_object_get_string(jJumps"jump_access"szBuffercharsmax(szBuffer));
            
            
g_eCvar[ABILITY_MULTIJUMPS] = read_flags(szBuffer);
            
g_eCvar[ABILITY_MULTIJUMP_COUNT] = json_object_get_number(jJumps"jump_count");
            
            
json_free(jJumps);
        }
        
        new 
JSON:jDamage json_object_get_value(jAbilities"hook_damage");
        
        if (
json_is_object(jDamage))
        {
            
json_object_get_string(jDamage"ABILITY_HOOK_DAMAGE"szBuffercharsmax(szBuffer));
            
            
g_eCvar[ABILITY_HOOK_DAMAGE] = read_flags(szBuffer);
            
g_eCvar[ABILITY_HOOK_DAMAGE_CHANCE] = json_object_get_number(jDamage"ABILITY_HOOK_DAMAGE_CHANCE");
            
        
/*
            json_object_get_string(jDamage, "wall_damage", szBuffer, charsmax(szBuffer));
            
            if ((g_eCvar[WALL_DAMAGE_ACCESS] = read_flags(szBuffer)))
            {
                TrieSetCell(g_tWallClassNames, "func_door", 0);
                TrieSetCell(g_tWallClassNames, "func_door_rotating", 0);
                TrieSetCell(g_tWallClassNames, "func_wall", 0);
                TrieSetCell(g_tWallClassNames, "worldspawn", 0);
            }
        */
            
            
json_free(jDamage);
        }
        
        new 
JSON:jHealth json_object_get_value(jAbilities"bonus_health");
        
        if (
json_is_object(jHealth))
        {
            
json_object_get_string(jHealth"bonus_health"szBuffercharsmax(szBuffer));
            
            
g_eCvar[ABILITY_HEALTH] = read_flags(szBuffer);
            
g_eCvar[HEALTH_AMOUNT] = json_object_get_real(jHealth"bonus_health_amount");
            
            
json_free(jHealth);
        }
        
        
json_object_get_string(jAbilities"menu_mode"szBuffercharsmax(szBuffer));
        
g_eCvar[MENU_MODE] = read_flags(szBuffer);
        
        
json_object_get_string(jAbilities"only_in_buyzone"szBuffercharsmax(szBuffer));
        
g_eCvar[ONLY_IN_BUYZONE] = read_flags(szBuffer);
        
        
json_object_get_string(jAbilities"expired"szBuffercharsmax(szBuffer));
        
g_eCvar[EXPIRED] = read_flags(szBuffer);
        
g_eCvar[EXPIRED_TIME] = json_object_get_real(jAbilities"expired_time");
        
        new 
JSON:jMaxUsage json_object_get_value(jAbilities"max_usage");
        
        if (
json_is_object(jMaxUsage))
        {
            for (new 
iszAccess[32]; json_object_get_count(jMaxUsage); i++)
            {
                
json_object_get_name(jMaxUsageiszAccesscharsmax(szAccess));
                
                
TrieSetCell(g_tMaxUsagesszAccessjson_object_get_number(jMaxUsageszAccess));
            }
            
            
json_free(jMaxUsage);
        }
        
        new 
JSON:jInstantReload json_object_get_value(jAbilities"instant_reload");
        
        if (
json_is_object(jInstantReload))
        {
            
json_object_get_string(jInstantReload"instant_reload_weapons_access"szBuffercharsmax(szBuffer));
            
            
g_eCvar[ABILITY_INSTANT_RELOAD] = read_flags(szBuffer);
            
g_eCvar[ABILITY_INSTANT_RELOAD_MODE] = json_object_get_number(jInstantReload"instant_reload_weapons_mode");
            
            
json_free(jInstantReload);
        }
        
        new 
JSON:jMaps json_object_get_value(jAbilities"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
//
                    
g_eCvar[ABILITY_FALL_DAMAGE] =
                        
g_eCvar[ABILITY_PLANT_UNFREEZE] =
                            
g_eCvar[ABILITY_MULTIJUMPS] =
                                
g_eCvar[ABILITY_HOOK_DAMAGE] =
                                    
g_eCvar[ABILITY_HEALTH] =
                                        
g_eCvar[ONLY_IN_BUYZONE] =
                                            
g_eCvar[ABILITY_INSTANT_RELOAD] =
                                                
0;
                    
                    
server_print("[VIP System] Ð Ð°Ð·Ð´ÐµÐ» ÑÐ¿ÐµÑ†.возможностей Ð¾Ñ‚ключён, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jAbilities);
    }
    
    new 
JSON:jBonuses json_object_get_value(jCFG"bonuses");
    
    if (
json_is_object(jBonuses))
    {
        
json_object_get_string(jBonuses"bonus_access"szBuffercharsmax(szBuffer));
        
g_eCvar[BONUS_ACCESS] = read_flags(szBuffer);
        
        
g_eCvar[BONUS_FRAGS] = json_object_get_number(jBonuses"frags");
        
g_eCvar[BONUS_KILLED] = json_object_get_number(jBonuses"killed");
        
g_eCvar[BONUS_PLANT_BOMB] = json_object_get_number(jBonuses"bomb_planted");
        
g_eCvar[BONUS_EXPLODE_BOMB] = json_object_get_number(jBonuses"bomb_explode");
        
g_eCvar[BONUS_DEFUSED_BOMB] = json_object_get_number(jBonuses"bomb_defused");
        
g_eCvar[BONUS_HOSTAGE_TOOK] = json_object_get_number(jBonuses"hostage_took");
        
g_eCvar[BONUS_HOSTAGE_RESCUED] = json_object_get_number(jBonuses"hostage_rescued");
        
g_eCvar[BONUS_VIP_KILLED] = json_object_get_number(jBonuses"vip_killed");
        
g_eCvar[BONUS_VIP_RESCUED_MYSELF] = json_object_get_number(jBonuses"vip_rescued_myself");
        
g_eCvar[BONUS_ROUND] = json_object_get_real(jBonuses"terminating");
        
g_eCvar[BONUS_DISCOUNT] = json_object_get_real(jBonuses"discount");
        
        new 
JSON:jMaps json_object_get_value(jBonuses"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
//
                    
g_eCvar[BONUS_ACCESS] = 0;
                    
                    
server_print("[VIP System] Ð Ð°Ð·Ð´ÐµÐ» Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ельных Ð±Ð¾Ð½ÑƒÑÐ¾Ð² Ð¾Ñ‚ключён, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jBonuses);
    }
    
    new 
JSON:jVampire json_object_get_value(jCFG"vampire");
    
    if (
json_is_object(jVampire))
    {
        
json_object_get_string(jVampire"vampire_access"szBuffercharsmax(szBuffer));
        
g_eCvar[VAMPIRE_ACCESS] = read_flags(szBuffer);
        
        
g_eCvar[VAMPIRE_HEALTH] = json_object_get_real(jVampire"vampire_health");
        
g_eCvar[VAMPIRE_HEALTH_HS] = json_object_get_real(jVampire"vampire_health_hs");
        
g_eCvar[VAMPIRE_HEALTH_NADE] = json_object_get_real(jVampire"vampire_health_nade");
        
g_eCvar[VAMPIRE_HEALTH_MAX] = json_object_get_real(jVampire"vampire_health_max");
        
g_eCvar[VAMPIRE_SCREENFADE] = json_object_get_number(jVampire"vampire_screenfade");
        
g_eCvar[VAMPIRE_HUD] = json_object_get_number(jVampire"vampire_hud");
        
// g_eCvar[VAMPIRE_OBEY_LIMIT] = json_object_get_number(jVampire, "vampire_obey_limit");
        
g_eCvar[VAMPIRE_PREVENT_MULTIPLY] = json_object_get_number(jVampire"vampire_prevent_multiply");
        
        
json_object_get_string(jVampire"vampire_sample"g_eCvar[VAMPIRE_SAMPLE], charsmax(g_eCvar[VAMPIRE_SAMPLE]));
        
        
// Fixes
        
if (g_eCvar[VAMPIRE_SAMPLE][0])
        {
            if (
file_exists(fmt("sound/%s"g_eCvar[VAMPIRE_SAMPLE]), .use_valve_fs true) == 1)
                
precache_sound(g_eCvar[VAMPIRE_SAMPLE]);
            else
                
g_eCvar[VAMPIRE_SAMPLE][0] = '^0';
        }
        
        new 
JSON:jMaps json_object_get_value(jVampire"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
//
                    
g_eCvar[VAMPIRE_ACCESS] = 0;
                    
                    
server_print("[VIP System] Ð Ð°Ð·Ð´ÐµÐ» Ð²Ð°Ð¼Ð¿Ð¸Ñ€ÐºÐ¸ Ð¾Ñ‚ключён, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jVampire);
    }
    
    new 
JSON:jCustomWeapons json_object_get_value(jCFG"custom_weapons");
    
    if (
json_is_object(jCustomWeapons))
    {
        new Array:
aWeaponSpeed ArrayCreate(320);
        
        for (new 
iJSON:jWeaponaWeapon[WEAPON_DATA], szName[64], iIdjSize json_object_get_count(jCustomWeapons) - 1jSizei++)
        {
            
json_object_get_name(jCustomWeaponsiszNamecharsmax(szName));
        
            if (
json_is_object((jWeapon json_object_get_value(jCustomWeaponsszName))))
            {
                
json_object_get_string(jWeapon"base_name"szNamecharsmax(szName));
                
                
// if ((iId = get_weaponid(fmt("weapon_%s", szName))) == 0)
                
if (!TrieGetCell(g_tDefaultWeaponsszNameiId) || iId == CSW_NONE)
                {
                    
server_print("[VIP System] ÐžÑ€ÑƒÐ¶Ð¸Ðµ %s Ð½Ðµ Ð¿Ð¾Ð´Ñ…одит"szName);
                    continue;
                }
                
            
/*
                if (!((1 << iId) & (CSW_ALL_GUNS | CSW_ALL_GRENADES | (1 << CSW_KNIFE))))
                {
                    server_print("[VIP System] ÐžÑ€ÑƒÐ¶Ð¸Ðµ %s Ð½Ðµ Ð¿Ð¾Ð´Ñ…одит..", szName);
                    continue;
                }
            */
                
                
copy(szNamecharsmax(szName), fmt("weapon_%s"szName));
                
copy(aWeapon[BASE_NAME], charsmax(aWeapon[BASE_NAME]), szName);
                
                
aWeapon[ACCESS] = 0;
                
                if (
json_object_has_value(jWeapon"service"JSONString))
                {
                    
json_object_get_string(jWeapon"service"aWeapon[SERVICE], charsmax(aWeapon[SERVICE]));
                }
                else
                {
                    
// access
                    
if (json_object_has_value(jWeapon"access"JSONString))
                    {
                        
json_object_get_string(jWeapon"access"szBuffercharsmax(szBuffer));
                        
                        
aWeapon[ACCESS] = read_flags(szBuffer);
                    }
                }
                
                
// name
                
if (json_object_has_value(jWeapon"name"JSONString))
                {
                    
json_object_get_string(jWeapon"name"aWeapon[NAME], charsmax(aWeapon[NAME]));
                }
                else
                    
aWeapon[NAME][0] = '^0';
                
                
// v model
                
if (json_object_has_value(jWeapon"v_model"JSONString))
                {
                    
json_object_get_string(jWeapon"v_model"aWeapon[V_MODEL], charsmax(aWeapon[V_MODEL]));
                    
                    if (
file_exists(aWeapon[V_MODEL]) > 0)
                    {
                        
precache_model(aWeapon[V_MODEL]);
                    }
                    else
                        
aWeapon[V_MODEL][0] = '^0';
                }
                else
                    
aWeapon[V_MODEL][0] = '^0';
                
                
// p model
                
if (json_object_has_value(jWeapon"p_model"JSONString))
                {
                    
json_object_get_string(jWeapon"p_model"aWeapon[P_MODEL], charsmax(aWeapon[P_MODEL]));
                    
                    if (
file_exists(aWeapon[P_MODEL]) > 0)
                    {
                        
precache_model(aWeapon[P_MODEL]);
                    }
                    else
                        
aWeapon[P_MODEL][0] = '^0';
                }
                else
                    
aWeapon[P_MODEL][0] = '^0';
                
                
// w model
                
if (json_object_has_value(jWeapon"w_model"JSONString))
                {
                    
json_object_get_string(jWeapon"w_model"aWeapon[W_MODEL], charsmax(aWeapon[W_MODEL]));
                    
                    if (
file_exists(aWeapon[W_MODEL]) > 0)
                    {
                        
precache_model(aWeapon[W_MODEL]);
                    }
                    else
                        
aWeapon[W_MODEL][0] = '^0';
                }
                else
                    
aWeapon[W_MODEL][0] = '^0';
                
                
// attrib
                
switch (iId)
                {
                    case 
CSW_KNIFE:
                    {
                        
// 2at distance
                        
if (json_object_has_value(jWeapon"stab_distance"JSONNumber))
                            
aWeapon[STAB_DISTANCE] = json_object_get_real(jWeapon"stab_distance");
                        else
                            
aWeapon[STAB_DISTANCE] = 0.0;
                        
                        
// 1at distance
                        
if (json_object_has_value(jWeapon"swing_distance"JSONNumber))
                            
aWeapon[SWING_DISTANCE] = json_object_get_real(jWeapon"swing_distance");
                        else
                            
aWeapon[SWING_DISTANCE] = 0.0;
                            
                        
// 2at damage
                        
if (json_object_has_value(jWeapon"stab_damage"JSONNumber))
                            
aWeapon[STAB_DAMAGE] = json_object_get_real(jWeapon"stab_damage");
                        else
                            
aWeapon[STAB_DAMAGE] = 0.0;
                            
                        
// 1at damage
                        
if (json_object_has_value(jWeapon"swing_damage"JSONNumber))
                            
aWeapon[SWING_DAMAGE] = json_object_get_real(jWeapon"swing_damage");
                        else
                            
aWeapon[SWING_DAMAGE] = 0.0;
                    }
                    
                    case 
CSW_HEGRENADECSW_FLASHBANGCSW_SMOKEGRENADE:
                    {
                        
                    }
                    
                    default:
                    {
                        if (
json_object_has_value(jWeapon"damage"JSONNumber))
                            
aWeapon[BASE_DAMAGE] = json_object_get_real(jWeapon"damage");
                        else
                            
aWeapon[BASE_DAMAGE] = 0.0;
                        
                        if (
json_object_has_value(jWeapon"ammo"JSONNumber))
                            
aWeapon[AMMO] = json_object_get_number(jWeapon"ammo");
                        else
                            
aWeapon[AMMO] = 0;
                        
                        if (
json_object_has_value(jWeapon"bpammo"JSONNumber))
                            
aWeapon[BPAMMO] = json_object_get_number(jWeapon"bpammo");
                        else
                            
aWeapon[BPAMMO] = 0;
                    }
                }
                
                if (
json_object_has_value(jWeapon"speed_power"JSONNumber))
                {
                    
aWeapon[SPEED_MULTIPLY] = json_object_get_real(jWeapon"speed_power");
                    
                    if (
ArrayFindString(aWeaponSpeedszName) == -1)
                    {
                        
ArrayPushString(aWeaponSpeedszName);
                        
                        
RegisterHam(Ham_CS_Item_GetMaxSpeedszName"CS_Item_GetMaxSpeed"true);
                    }
                }
                else
                    
aWeapon[SPEED_MULTIPLY] = 0.0;
                
                if (
json_object_has_value(jWeapon"give_type"JSONNumber))
                    
aWeapon[GIVE_MODE] = json_object_get_number(jWeapon"give_type");
                else
                    
aWeapon[GIVE_MODE] = 0;
                
                if (
json_object_has_value(jWeapon"cost"JSONNumber))
                    
aWeapon[COST] = json_object_get_number(jWeapon"cost");
                else
                    
aWeapon[COST] = 0;
                
                if (
json_object_has_value(jWeapon"round"JSONNumber))
                    
aWeapon[ROUND] = json_object_get_number(jWeapon"round");
                else
                    
aWeapon[ROUND] = 0;
                
                if (
aWeapon[ACCESS] > && json_object_has_value(jWeapon"touches"JSONNumber))
                    
aWeapon[PRIVATE_TOUCHES] = json_object_get_number(jWeapon"touches");
                else
                    
aWeapon[PRIVATE_TOUCHES] = 0;
                
                if (
json_object_has_value(jWeapon"team"JSONString))
                {
                    
json_object_get_string(jWeapon"team"szBuffercharsmax(szBuffer));
                    
                    
aWeapon[TEAM] = szBuffer[0] == 'T' TEAM_TERRORIST szBuffer[0] == 'C' TEAM_CT TEAM_UNASSIGNED;
                
/*
                    switch (szBuffer[0])
                    {
                        case 'T':
                        {
                            aWeapon[TEAM] = TEAM_TERRORIST;
                            break;
                        }
                        case 'C':
                        {
                            aWeapon[TEAM] = TEAM_CT;
                            break;
                        }
                    }
                */
                
}
                
// Fixes
                
else
                    
aWeapon[TEAM] = TEAM_UNASSIGNED;
                
                
// Ð‘есплатная Ð²Ñ‹Ð´Ð°Ñ‡Ð° Ð¿Ñ€Ð¸ ÑÐ¿Ð°Ð²Ð½Ðµ
                
if (json_object_has_value(jWeapon"free_access"JSONString))
                {
                    
json_object_get_string(jWeapon"free_access"szBuffercharsmax(szBuffer));
                    
aWeapon[FREE] = read_flags(szBuffer);
                }
                
// Ð’ Ð¿Ñ€Ð¾Ñ‚ивном ÑÐ»ÑƒÑ‡Ð°Ðµ Ð²Ñ‹ Ð¾Ð±ÑÐ·Ð°Ñ‚ельно Ð´Ð¾Ð»Ð¶Ð½Ñ‹ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ Ð¸Ð¼Ñ
                
else
                {
                    
aWeapon[FREE] = 0;
                    
                    if (!
aWeapon[NAME][0] || !aWeapon[ACCESS])
                    {
                        
server_print("[VIP System] ÐÐµ ÑƒÐºÐ°Ð·Ð°Ð½Ð¾ Ð¸Ð¼Ñ Ð¸Ð»Ð¸ Ñ„лаг Ð´Ð¾ÑÑ‚упа Ðº Ð¾Ñ€ÑƒÐ¶Ð¸ÑŽ %i"i);
                        
// server_print("[VIP System] Ð˜ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ðµ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚ра free_access Ð¾ÑÐ¾Ð²Ð±Ð¾Ð´Ð¸Ñ‚ Ð²Ð°Ñ Ð¾Ñ‚ ÑÑ‚их Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ð¹");
                        
continue;
                    }
                }
                
                if (
json_object_has_value(jWeapon"menu_folder"JSONString))
                {
                    
json_object_get_string(jWeapon"menu_folder"aWeapon[MENU_FOLDER], charsmax(aWeapon[MENU_FOLDER]));
                    
                    if (
ArrayFindString(g_aMenuSectionsaWeapon[MENU_FOLDER]) == -1)
                        
ArrayPushString(g_aMenuSectionsaWeapon[MENU_FOLDER]);
                }
                else
                    
aWeapon[MENU_FOLDER][0] = '^0';
                
                
ArrayPushArray(g_aCustomWeaponsaWeapon);
                
                
json_free(jWeapon);
                
                if (++
g_iCustomWeaponsNum >= MAX_CUSTOM_WEAPONS)
                    break;
            }
        }
        
        if (
aWeaponSpeed)
            
ArrayDestroy(aWeaponSpeed);
        
        new 
JSON:jMaps json_object_get_value(jCustomWeapons"maps");
        
        if (
json_is_array(jMaps))
        {
            for (new 
ijson_array_get_count(jMaps); i++)
            {
                
json_array_get_string(jMapsiszBuffercharsmax(szBuffer));
                
                if (
containi(g_szMapNameszBuffer) != -1)
                {
                    
//
                    
ArrayDestroy(g_aCustomWeapons);
                    
g_iCustomWeaponsNum 0;
                    
// g_IsNoVIPMenuOnThisMap = true;
                    
                    
server_print("[VIP System] Ð Ð°Ð·Ð´ÐµÐ» ÐºÐ°ÑÑ‚омных Ð¾Ñ€ÑƒÐ¶Ð¸Ð¹ Ð¾Ñ‚ключён, Ð¿Ñ€Ð¸Ñ‡Ð¸Ð½Ð°: ÐÐµ ÑÐ¾Ð¾Ñ‚ветствует ÐºÐ°Ñ€Ñ‚а");
                    break;
                }
            }
            
            
json_free(jMaps);
        }
        
        
json_free(jCustomWeapons);
    }
    
    
json_free(jCFG);
    return 
true;
}

bool:give_item(idany:array[])
{
    new 
iId rg_get_weapon_info(array[BASE_NAME], WI_ID);
    
/*
    if (iId == CSW_KNIFE)
    {
        rg_remove_item(id, "weapon_knife");
    }
    else (array[GIVE_MODE] && 1 << iId & CSW_ALL_GUNS)
    {
        rg_drop_items_by_slot(id, (1 << iId & CSW_ALL_PISTOLS) ? PISTOL_SLOT : PRIMARY_WEAPON_SLOT);
    }
*/
    
    
new GiveType:type GT_APPEND;
    
    if (
iId == CSW_KNIFE)
    {
        
type GT_REPLACE;
    }
    else if (
<< iId CSW_ALL_GUNS)
    {
        if (array[
GIVE_MODE] == 2)
            
type GT_REPLACE;
        else if (array[
GIVE_MODE] == 1)
            
type GT_DROP_AND_REPLACE;
    }
    
    
// Ignore API things
    
new pWeapon rg_give_custom_item(id, array[BASE_NAME], type);
    
    if (
is_nullent(pWeapon))
        return 
false;
    
    if (
iId == CSW_KNIFE)
    {
        
// Ð”истанция ÐŸÐšÐœ
        
if (array[STAB_DISTANCE] > 0.0)
            
set_member(pWeaponm_Knife_flStabDistanceFloatget_member(pWeaponm_Knife_flStabDistance) * array[STAB_DISTANCE]);
        
        
// Ð”истанция Ð›ÐšÐœ
        
if (array[SWING_DISTANCE] > 0.0)
            
set_member(pWeaponm_Knife_flSwingDistanceFloatget_member(pWeaponm_Knife_flSwingDistance) * array[SWING_DISTANCE]);
        
        
// Ð£Ñ€Ð¾Ð½ ÐŸÐšÐœ
        
if (array[STAB_DAMAGE] > 0.0)
            
set_member(pWeaponm_Knife_flStabBaseDamageFloatget_member(pWeaponm_Knife_flStabBaseDamage) * array[STAB_DAMAGE]);
        
        
// Ð£Ñ€Ð¾Ð½ Ð›ÐšÐœ
        
if (array[SWING_DAMAGE] > 0.0)
        {
            
set_member(pWeaponm_Knife_flSwingBaseDamageFloatget_member(pWeaponm_Knife_flSwingBaseDamage) * array[SWING_DAMAGE]);
            
set_member(pWeaponm_Knife_flSwingBaseDamage_FastFloatget_member(pWeaponm_Knife_flSwingBaseDamage_Fast) * array[SWING_DAMAGE]);
        }
    }
    else if (!(
<< iId NOCLIP_WEAPONS))
    {
        
// ÐœÐ°Ð³Ð°Ð·Ð¸Ð½
        
if (array[AMMO] > 0)
        {
            
rg_set_iteminfo(pWeaponItemInfo_iMaxClip, array[AMMO]);
            
rg_set_user_ammo(idWeaponIdType:iId, array[AMMO]);
        }
        
        
// Ð—апас
        
if (array[BPAMMO] > 0)
        {
            
rg_set_iteminfo(pWeaponItemInfo_iMaxAmmo1, array[BPAMMO]);
            
rg_set_user_bpammo(idWeaponIdType:iId, array[BPAMMO]);
        }
    
        if (array[
BASE_DAMAGE] > 0.0)
        {
            if (
iId == CSW_USP)
                
set_member(pWeaponm_USP_flBaseDamageSilFloatget_member(pWeaponm_USP_flBaseDamageSil) * array[BASE_DAMAGE]);
            else if (
iId == CSW_M4A1)
                
set_member(pWeaponm_M4A1_flBaseDamageSilFloatget_member(pWeaponm_M4A1_flBaseDamageSil) * array[BASE_DAMAGE]);
            else if (
iId == CSW_FAMAS)
                
set_member(pWeaponm_Famas_flBaseDamageBurstFloatget_member(pWeaponm_Famas_flBaseDamageBurst) * array[BASE_DAMAGE]);
            else
                
set_member(pWeaponm_Weapon_flBaseDamageFloatget_member(pWeaponm_Weapon_flBaseDamage) * array[BASE_DAMAGE]);
        }
    }
    
    
// ÐšÐ°ÑÐ°Ð½Ð¸Ðµ
    
if (array[SERVICE][0])
        
set_entvar(pWeaponprivate_access, array[SERVICE]);
    else if (array[
PRIVATE_TOUCHES] > 0)
        
set_entvar(pWeaponweapon_access, array[ACCESS]);
    
    
// Ð¡ÐºÐ¾Ñ€Ð¾ÑÑ‚ÑŒ
    
if (array[SPEED_MULTIPLY] > 0.0)
        
set_entvar(pWeaponweapon_speed, array[SPEED_MULTIPLY]);
    
    
// Ð’ид Ð² Ñ€ÑƒÐºÐµ
    
if (array[V_MODEL][0])
        
set_entvar(pWeaponviewmodel, array[V_MODEL]);
    
    
// Ð’ид Ñƒ Ð¸Ð³Ñ€Ð¾ÐºÐ°
    
if (array[P_MODEL][0])
        
set_entvar(pWeaponplayermodel, array[P_MODEL]);
    
    
// Ð’ид Ð»ÐµÐ¶Ð¸Ñ‚ Ð½Ð° Ð·ÐµÐ¼Ð»Ðµ
    
if (array[W_MODEL][0])
        
set_entvar(pWeapongunmodel, array[W_MODEL]);
    
    
// engclient_cmd(id, array[BASE_NAME]);
    // ExecuteHam(Ham_Item_Deploy, pWeapon);
    
if (get_member(idm_pActiveItem) == pWeapon)
        
rg_switch_weapon(idpWeapon);
    
    return 
true;
}

stock SignalState:rg_get_user_mapzones(const id)
{
    new 
iSignals[UnifiedSignals];
    
get_member(idm_signalsiSignals);

    return 
SignalState:iSignals[US_State];
}

stock bool:rg_user_in_buyzone(const id)
{
    if (!
UTIL_IsAccessGranted(idg_eCvar[ONLY_IN_BUYZONE]))
        return 
true;
    
    return 
bool:(rg_get_user_mapzones(id) & SIGNAL_BUY);
}

stock bool:rg_user_in_bombzone(const id)
{
    return 
bool:(rg_get_user_mapzones(id) & SIGNAL_BOMB);
}

stock bool:rg_user_has_primary(const id)
{
    return 
bool:((get_member(idm_rgpPlayerItemsPRIMARY_WEAPON_SLOT) > 0) || get_member(idm_bHasPrimary));
}

stock UTIL_ScreenFade(const id, const Float:fxtime 1.0, const Float:holdtime 0.15, const color[3] = { 0255100 }, const alpha 150)
{
    
// blind players
    
if (Floatget_member(idm_blindUntilTime) > get_gametime())
        return;
    
    static 
iMsgScreenFade;
    if (
iMsgScreenFade || (iMsgScreenFade get_user_msgid("ScreenFade")))
    {
        
message_begin(MSG_ONE_UNRELIABLEiMsgScreenFade, .player id);
        
write_short(clamp(floatround(fxtime UNIT_SECOND), 00xFFFF));
        
write_short(clamp(floatround(holdtime UNIT_SECOND), 00xFFFF));
        
write_short(FFADE_IN);
        
write_byte(color[0]);
        
write_byte(color[1]);
        
write_byte(color[2]);
        
write_byte(alpha);
        
message_end();
    }
}

stock UTIL_IsMaxTimesReached(const id, &0)
{
    if (
g_tMaxUsages == Invalid_Trie)
    {
        
1;
        goto @
result
    
}
    
    new 
TrieIter:iter TrieIterCreate(g_tMaxUsages);
    {
        for (new 
szAccess[32]; !TrieIterEnded(iter); TrieIterNext(iter))
        {
            
TrieIterGetKey(iterszAccesscharsmax(szAccess));
            
            if (
UTIL_IsAccessGranted(idread_flags(szAccess)))
            {
                
TrieIterGetCell(iteri);
                break;
            }
        }
        
        
TrieIterDestroy(iter);
    }
    
    @
result:
    return 
== true : (<= g_iUsageCount[id]);
}

stock UTIL_IsTimeExpired(const id, const Float:timeleft)
{
    if (!
UTIL_IsAccessGranted(idg_eCvar[EXPIRED]))
        return 
false;
    
    if (
timeleft == -1.0)
    {
        static 
mp_buytime;
        if (
mp_buytime || (mp_buytime get_cvar_pointer("mp_buytime")))
        {
            new 
Float:buytime get_pcvar_float(mp_buytime);
            
            if (
buytime == -1.0)    // infinity
                
return 0;
            
            if (
buytime == 0.0)        // disabled
                
return 1;
            
            return (
get_gametime() - Floatget_member_game(m_fRoundStartTime) > (buytime 60.0));
        }
    }
    
    return (
rg_is_time_expired(timeleft) != 0);
}

stock UTIL_BlinkAcct(const dest, const id, const times)
{
    static 
iMsgBlinkAcct;
    if (
iMsgBlinkAcct || (iMsgBlinkAcct get_user_msgid("BlinkAcct")))
    {
        
message_begin(destiMsgBlinkAcct, .player id);
        
write_byte(times);
        
message_end();
    }
}

stock UTIL_GetWeaponBoxWeapon(const pWeaponBox)
{
    for (new 
itemInventorySlotType:PRIMARY_WEAPON_SLOT<= GRENADE_SLOTi++)
    {
        if (!
is_nullent((item get_member(pWeaponBoxm_WeaponBox_rgpPlayerItemsi))))
            return 
item;
    }
    
    return 
NULLENT;
}

stock UTIL_IsAccessGranted(id, const flags)
{
    new 
__user_flags get_user_flags(id);
    
    if (
flags == ADMIN_ADMIN)
    {
        static 
_amx_default_access;
        if (!
_amx_default_access)
        {
            
_amx_default_access get_cvar_pointer("amx_default_access");
            
            if (
_amx_default_access == 0)
            {
                
// def
                
_amx_default_access ADMIN_USER;
            }
            else
            {
                static 
szAccess[16]; get_pcvar_string(_amx_default_accessszAccesscharsmax(szAccess));
                
_amx_default_access read_flags(szAccess);
            }
        }
        
        return (
__user_flags ADMIN_ALL && !(__user_flags _amx_default_access));
    }
    else if (
flags == ADMIN_ALL)
    {
        return 
0;    // Ð² Ð´Ð°Ð½Ð½Ð¾Ð¼ ÑÐ»ÑƒÑ‡Ð°Ðµ Ð¾Ð±Ñ€Ð°Ñ‚ный ÑÑ„фект
    
}
    else if (
g_eCvar[ACCESS_MODE] && (__user_flags flags) < flags/* Ð¸Ð³Ñ€Ð¾Ðº Ð´Ð¾Ð»Ð¶ÐµÐ½ Ð¸Ð¼ÐµÑ‚ÑŒ Ñ…оть ÑÑ‚рого Ð²ÑÐµ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ðµ Ñ„лаги */
    
{
        return 
0;
    }
    
    
// classic
    
return (__user_flags flags);
}

stock UTIL_ShowExpiredTime(sec)
{
    new 
szName[64];
    
    if (
sec 0)
    {
        
sec -= get_systime();
        
        if (
sec 86400 0)
            
formatex(szNamecharsmax(szName), "\y%d Ð´Ð½."sec 86400);
        else if (
sec 3600 0)
            
formatex(szNamecharsmax(szName), "\y%d Ñ‡Ð°Ñ."sec 3600);
        else if (
sec 60 0)
            
formatex(szNamecharsmax(szName), "\y%d Ð¼Ð¸Ð½."sec 60);
        else
            
formatex(szNamecharsmax(szName), "\y%d ÑÐµÐº."sec);
    }
    else
        
formatex(szNamecharsmax(szName), "%L"LANG_PLAYERsec == "VIP_MENU_NEVER_ENDING" "VIP_MENU_BUY");
    
    return 
szName;

Responder
#4
Código PHP:
#define SCORE_STATUS_VIP  (1<< 2) 
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)