War3ft 3.0 (addons)

Сообщения
125
Реакции
38
Предупреждения
5
Нужна помощь в исправлении следующих ошибок:

ERRORS:

#1
// war3ft/cstrike.cpp(183) : error 088: number of arguments does not match definition

#2
// war3ft/loot.cpp(339) : error 088: number of arguments does not match definition
// war3ft/loot.cpp(346) : error 088: number of arguments does not match definition
// war3ft/loot.cpp(352) : error 088: number of arguments does not match definition
// war3ft/loot.cpp(358) : error 088: number of arguments does not match definition
// war3ft/loot.cpp(364) : error 088: number of arguments does not match definition

#3
// war3ft/multi_xp.cpp(41) : error 088: number of arguments does not match definition

#4
// war3ft/race_priest.h(45) : error 075: input line too long (after substitutions)

#5
// war3ft/showwin.cpp(83) : error 088: number of arguments does not match definition
// war3ft/showwin.cpp(86) : error 088: number of arguments does not match definition
// war3ft/showwin.cpp(91) : error 088: number of arguments does not match definition
// war3ft/showwin.cpp(94) : error 088: number of arguments does not match definition

#6
// war3ft/system_talisman.cpp(226) : error 088: number of arguments does not match definition

#7
// war3ft/util.cpp(157) : error 088: number of arguments does not match definition

#8
// war3ft/vip_system/vip_system.cpp(660) : error 088: number of arguments does not match definition


Код:
/*
*    Counter-Strike and Condition Zero only functions
*/

public on_EndRound()
{

    if ( !WC3_Check() )
        return;

    g_EndRound = true;

    new players[32], numplayers, i;
    get_players( players, numplayers );
    for ( i = 0; i < numplayers; i++ )
    {
        new idUser = players[i];

        UTIL_AutoHideMenu(idUser);

    }//for

    // Save XP at the end of the round?
    if ( get_pcvar_num( CVAR_wc3_save_end_round ) )
    {
        // Threaded saves on end round!
        DB_SaveAll( true );
    }

    return;
}

// Called when freezetime is over
public on_FreezeTimeComplete()
{

    if ( !WC3_Check() )
        return;

    g_freezeTime = false;

    return;
}

public on_TerroristWin()
{

    if ( !WC3_Check() )
    {
        return;
    }

    XP_WinRound( TEAM_T );

    //Отображение победителя в конце раунда
    fShowWinnPlayer(TEAM_T);

    return;
}

public on_CTWin()
{
    if ( !WC3_Check() )
    {
        return;
    }

    XP_WinRound( TEAM_CT );

    //Отображение победителя в конце раунда
    fShowWinnPlayer(TEAM_CT);

    return;
}


public _CS_MinModelsLoop()
{
    if ( !WC3_Check() )
    {
        return;
    }

    if ( get_pcvar_num( CVAR_wc3_query_client ) )
    {
        new iPlayers[32], iNumPlayers, i;
        get_players( iPlayers, iNumPlayers, "c" );
 
        for ( i = 0; i < iNumPlayers; i++ )
        {
            query_client_cvar( iPlayers[i], "cl_minmodels", "_CS_CheckMinModelsValue" );
        }
    }
}

public _CS_CheckMinModelsValue( idUser, const cvar[], const value[] )
{
    if ( equali( cvar,"cl_minmodels" ) && strcmp( value, "0" ) )
    {
        client_cmd( idUser, "echo ^"======== CSSB Warcraft 3 Frozen Throne Private ========^"" );
        format(szMessage, charsmax(szMessage), "echo ^"%L^"",LANG_PLAYER,"CLIENT_KICK_CL_MODELS_1");
        client_cmd( idUser, szMessage);
        format(szMessage, charsmax(szMessage), "echo ^"%L^"",LANG_PLAYER,"CLIENT_KICK_CL_MODELS_2");
        client_cmd( idUser, szMessage);
        client_cmd( idUser, "echo ^"=========================================^"" );
        format(szMessage, charsmax(szMessage), "kick #%d ^"%L^"",get_user_userid( idUser ),LANG_PLAYER,"CLIENT_KICK_CL_MODELS_3");
        server_cmd( szMessage );
    }
}

// Function called when a user's armor changes
public on_Battery( idUser )
{
    if ( !WC3_Check() )
    {
        return;
    }

    if ( !bIgnoreArmorSet[idUser] )
    {
        // Store the previous value (we do this b/c the Battery event is triggered (and set to 0) before weapon reincarnation)
        arrIntData[idUser][P_LASTARMOR] = arrIntData[idUser][P_ARMORONDEATH];

        arrIntData[idUser][P_ARMORONDEATH] = read_data( 1 );
    }

    return;
}

public on_ArmorType(idUser)
{
    if (!WC3_Check())
        return;
 
    new iCurrentArmor = clAr:getUserArmor(idUser,g_ArmorType[idUser]);
    arrIntData[idUser][P_ARMORONDEATH] = iCurrentArmor;

    return;
}

// Event triggered when you look at another player
public on_ShowStatus(idUser)
{
    if (!WC3_Check())
        return;

    //Очищает когда слева внизу отображает здоровье на кого навел (мусор короче :) )
    Create_StatusText(idUser,0,"");
    UTIL_ClearHudChannel(idUser, HUD_SHOWSTATUS);

    new idTarget = read_data( 2 );
    if(is_user_alive(idUser) && is_user_connected(idUser) &&
        is_user_alive(idTarget) && is_user_connected(idTarget))
        {
            //Отображение текущего здоровья и брони
            new iCurrentHealth =  clHP:getUserHealth(idUser);
            new iCurrentArmor = clAr:getArmorNum(idUser);

            if(iCurrentHealth > 255 || iCurrentArmor > 255)
            {
                new szMsgHealthArmor[256];
                formatex(szMsgHealthArmor, charsmax(szMsgHealthArmor),
                 "%L: %d | %L: %d",LANG_PLAYER,"CURRENT_HEALTH",iCurrentHealth,
                                        LANG_PLAYER,"WORD_ARMOR",iCurrentArmor);

                Create_StatusText(idUser, 0, szMsgHealthArmor);
            }


            new iTargetTeam = get_user_team( idTarget );
            new iViewerTeam = get_user_team( idUser );

            // Same team check
            if ( iViewerTeam == iTargetTeam )
            {
                // Check if your teammate looks like the enemy!
                if ( arrBoolData[idTarget][PB_SKINSWITCHED] )
                {
                    new szMessageDontShot[256];
                    format(szMessageDontShot, charsmax(szMessageDontShot),
                        "%L",LANG_PLAYER, "HES_ON_YOUR_TEAM_DONT_SHOOT");

                    set_dhudmessage(79, 79, 79 ,-1.0,0.30,0, 0.01, 1.0, 0.01, 0.01, -1);
                    show_dhudmessage(idUser, szMessageDontShot);
             
                    client_cmd( idUser, "speak %s", arrStrSounds[SOUND_ANTEND] );
                }
            }

        // Отображение информации на экране при наведении прицелом
        if ( get_pcvar_num( CVAR_wc3_show_player ) )
        {
                new szTargetName[32];
                get_user_name(idTarget, szTargetName,charsmax(szTargetName));
                     
                if(!SM_IsValidRace( arrIntData[idTarget][P_RACE] ))
                    return;
         
                new szShortRaceNameTarget[32];
                Lang_GetRaceName(arrIntData[idTarget][P_RACE], idUser, szShortRaceNameTarget,charsmax(szShortRaceNameTarget),true);
     
                new szMessageStatus[256];

                new iColorRGB_TEAM_T[3];
                iColorRGB_TEAM_T[0] = 255;
                iColorRGB_TEAM_T[1] = 69;
                iColorRGB_TEAM_T[2] = 0;

                new iColorRGB_TEAM_CT[3];
                iColorRGB_TEAM_CT[0] = 58;
                iColorRGB_TEAM_CT[1] = 95;
                iColorRGB_TEAM_CT[2] = 205;
         
                if(iViewerTeam == TEAM_T)//Если наводящий курсор из команды террористов
                {
                    if(iTargetTeam == TEAM_T)
                    {
                        format(szMessageStatus, charsmax(szMessageStatus),
                        "%s ^n%L %d %L %d ^n%L %s ^n%L %d",
                        szTargetName,
                        LANG_PLAYER, "WC3_HEALTH",
                        clHP:getUserHealth(idTarget),
                        LANG_PLAYER, "WC3_ARMOR",
                        clAr:getArmorNum(idTarget),
                        LANG_PLAYER, "WC3_RACE",
                        szShortRaceNameTarget,        
                        LANG_PLAYER, "WORD_LEVEL",
                        arrIntData[idTarget][P_LEVEL]);
                                     
                        set_hudmessage(iColorRGB_TEAM_T[0],iColorRGB_TEAM_T[1],iColorRGB_TEAM_T[2], -1.0, 0.60, 0, 0.01, 3.0, 0.01, 0.01, HUD_SHOWSTATUS );
                        show_hudmessage(idUser,szMessageStatus);
                 
                    }
                    if(iTargetTeam == TEAM_CT)
                    {
                        format(szMessageStatus, charsmax(szMessageStatus),
                        "%s  ^n%L %s ^n%L %d",
                        szTargetName,
                        LANG_PLAYER, "WC3_RACE",
                        szShortRaceNameTarget,        
                        LANG_PLAYER, "WORD_LEVEL",
                        arrIntData[idTarget][P_LEVEL]);
                 
                        set_hudmessage(iColorRGB_TEAM_CT[0],iColorRGB_TEAM_CT[1],iColorRGB_TEAM_CT[2], -1.0, 0.60, 0, 0.01, 3.0, 0.01, 0.01, HUD_SHOWSTATUS );
                        show_hudmessage(idUser,szMessageStatus);
                    }
                }

                if(iViewerTeam == TEAM_CT)//Если наводящий курсор из команды коунтер-террористов
                {
                    if(iTargetTeam == TEAM_T)
                    {
                        format(szMessageStatus, charsmax(szMessageStatus),
                        "%s  ^n%L %s ^n%L %d",
                        szTargetName,
                        LANG_PLAYER, "WC3_RACE",
                        szShortRaceNameTarget,        
                        LANG_PLAYER, "WORD_LEVEL",
                        arrIntData[idTarget][P_LEVEL]);
                 
                        set_hudmessage(iColorRGB_TEAM_T[0],iColorRGB_TEAM_T[1],iColorRGB_TEAM_T[2], -1.0, 0.60, 0, 0.01, 3.0, 0.01, 0.01, HUD_SHOWSTATUS );
                        show_hudmessage(idUser,szMessageStatus);
                    }
                    if(iTargetTeam == TEAM_CT)
                    {
             
                        format(szMessageStatus, charsmax(szMessageStatus),
                        "%s ^n%L %d %L %d ^n%L %s ^n%L %d",
                        szTargetName,
                        LANG_PLAYER, "WC3_HEALTH",
                        clHP:getUserHealth(idTarget),
                        LANG_PLAYER, "WC3_ARMOR",
                        clAr:getArmorNum(idTarget),
                        LANG_PLAYER, "WC3_RACE",
                        szShortRaceNameTarget,        
                        LANG_PLAYER, "WORD_LEVEL",
                        arrIntData[idTarget][P_LEVEL]);
             
                        set_hudmessage(iColorRGB_TEAM_CT[0],iColorRGB_TEAM_CT[1],iColorRGB_TEAM_CT[2], -1.0, 0.60, 0, 0.01, 3.0, 0.01, 0.01, HUD_SHOWSTATUS );
                        show_hudmessage(idUser,szMessageStatus);
                    }
                }

        }//if ( get_pcvar_num( CVAR_wc3_show_player ) )

     }//if(is_user_alive(idUser) && is_user_connected(idUser)

    return;
}

// This is called when the user is no longer viewing the player
public on_HideStatus(idUser)
{
    if ( !WC3_Check() )
    {
        return;
    }

    if ( get_pcvar_num( CVAR_wc3_show_player ) && !g_freezeTime )
    {
        UTIL_ClearHudChannel( idUser, HUD_SHOWSTATUS );
        UTIL_ClearDHudChannel( idUser );
    }

    ClearSyncHud(idUser, msgSyncObj);
}

// Function is called when buytime is over
public _CS_BuyTimeOver()
{
    g_buyTime = false;
}

public on_WeapPickup( idUser )
{

    if ( !WC3_Check() )
    {
        return;
    }

    SHARED_SaveWeapons( idUser );

    return;
}

public on_GameRestart()
{
    if ( !WC3_Check() )
        return;

    // Save all XP on game restart - do not do this threaded or it might take 300 years
    DB_SaveAll(false);

    g_GameRestarting = true;

    sm4_4_2_evRoundRestart();

    iRoundCount = 0;

    return;
}

// From war3x
public on_Zoom(idUser)
{

    if ( !WC3_Check() )
    {
        return;
    }

    if ( read_data( 1 ) < 90 )
    {
        g_bPlayerZoomed[idUser] = true;
    }

    else
    {
        g_bPlayerZoomed[idUser] = false;
    }

    // We will need to change the user's speed on zooming
    SHARED_SetSpeed( idUser );

    return;
}

public on_BombPlanting( idUser )
{
    arrBoolData[idUser][PB_ISPLANTING] = true;
}

public on_BombStopPlanting( idUser )
{
    arrBoolData[idUser][PB_ISPLANTING] = false;
Код:
public fLootPrecache()
{
    engfunc(EngFunc_PrecacheModel, szModelItems);
    engfunc(EngFunc_PrecacheModel, szModelArXpHpItems);

    idSpriteItems = engfunc(EngFunc_PrecacheModel,szSpriteItems);
    idSpriteNoItems = engfunc(EngFunc_PrecacheModel,szSpriteNoItems);

}

public fScreenFadePlayer(idUser)
{
    message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, idUser) ;
    write_short(1<<12);
    write_short(1<<12);
    write_short(1<<12);
    write_byte(0);
    write_byte(200);
    write_byte(0);
    write_byte(20);
    message_end();
}

FloatToNum(Float:floatn)
{
    new str[64], num;
    float_to_str(floatn, str, 63);
    num = str_to_num(str);

    return num
}

//Удаление всех брошеных предметов
//(в данном случае запускается при старте нового раунда
//файл events.inl - функция public EVENT_NewRound()  )
fRemoveAllItems()
{
    if(get_pcvar_num( CVAR_wc3_loot_items ) > 0)
    {
        new nextitem  = find_ent_by_class(-1, szClassNameItems);
        while(nextitem)
        {
            remove_entity(nextitem);
            nextitem = find_ent_by_class(-1, szClassNameItems);
        }

        ArrayClear(arrIntTotalLootEntity);
        ArrayClear(arrIntOriginsLootX);
        ArrayClear(arrIntOriginsLootY);
        ArrayClear(arrIntOriginsLootZ);
        ArrayClear(arrIntItemVictimShop1);
        ArrayClear(arrIntItemVictimShop2);
        ArrayClear(arrIntItemVictimShop3);
        ArrayClear(arrIntDrawSpriteItems);
        ArrayClear(arrIntScaleSpriteItems);

        if (get_pcvar_num( CVAR_wc3_loot_remove ) == 1)
                ArrayClear(arrIntLootRemove);
    }

}

fCreateArXpHpClass(idUser)
{
    // get origin
    new Float:origin[3];
    pev(idUser, pev_origin, origin);

    new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
    if (!ent) return -1;

    // Set data
    set_pev(ent, pev_classname, szClassNameItems);
    set_pev(ent, pev_solid, SOLID_TRIGGER);
    set_pev(ent, pev_movetype, MOVETYPE_TOSS);//#define    MOVETYPE_TOSS 6 gravity/collisions
    set_pev(ent, pev_sequence, 0);
    set_pev(ent, pev_frame, 0.0);
    set_pev(ent, pev_owner, idUser);


    // Set size
//    new Float:mins[3] = { -20.0, -20.0, 0.0 };
//    new Float:maxs[3] = { 20.0, 20.0, 30.0 };
//    engfunc(EngFunc_SetSize, ent, mins, maxs);

    // Set model
    engfunc(EngFunc_SetModel, ent, szModelArXpHpItems);

    // Set position
    set_pev(ent, pev_origin, origin);
 
    // Установка невидимости и подсветки выпавшего предмета
//    fm_set_rendering(ent,kRenderFxGlowShell,arrColorNoItemsRGB[0],arrColorNoItemsRGB[1],arrColorNoItemsRGB[2],kRenderTransAlpha, 128);
    fm_set_rendering(ent,kRenderFxGlowShell,arrColorNoItemsRGB[0],arrColorNoItemsRGB[1],arrColorNoItemsRGB[2],kRenderNormal, 128);

    ArrayPushCell(arrIntTotalLootEntity, ent);
    ArrayPushCell(arrIntOriginsLootX, FloatToNum(origin[0]));
    ArrayPushCell(arrIntOriginsLootY, FloatToNum(origin[1]));
    ArrayPushCell(arrIntOriginsLootZ, FloatToNum(origin[2] + 10));

    /*
    if(get_pcvar_num( CVAR_wc3_loot_remove ) == 1)
    {
        new arrParams[2];
        arrParams[0] = ent;
        arrParams[1] = (TASK_LOOTREMOVE + ent);

        set_task(get_pcvar_float( CVAR_wc3_loot_stay ), "fRemoveLootItem", TASK_LOOTREMOVE + ent,arrParams, sizeof(arrParams));
    }
*/
    return -1;
}

fCreateItemsClass(idUser)
{
    // get origin
    new Float:origin[3];
    pev(idUser, pev_origin, origin);

    new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
    if (!ent) return -1;

    // Set data
    set_pev(ent, pev_classname, szClassNameItems);
    set_pev(ent, pev_solid, SOLID_TRIGGER);
    set_pev(ent, pev_movetype, MOVETYPE_TOSS);//#define    MOVETYPE_TOSS 6 gravity/collisions
    set_pev(ent, pev_sequence, 0);
    set_pev(ent, pev_frame, 0.0);
    set_pev(ent, pev_owner, idUser);

    // Set size
//    new Float:mins[3] = { -20.0, -20.0, 0.0 };
//    new Float:maxs[3] = { 20.0, 20.0, 30.0 };
//    engfunc(EngFunc_SetSize, ent, mins, maxs);

    // Set model
    engfunc(EngFunc_SetModel, ent, szModelItems);

    // Set position
    set_pev(ent, pev_origin, origin);
 
    // Установка невидимости и подсветки выпавшего предмета
//    fm_set_rendering(ent,kRenderFxGlowShell,arrColorItemsRGB[0],arrColorItemsRGB[1],arrColorItemsRGB[2],kRenderTransAlpha, 128);
    fm_set_rendering(ent,kRenderFxGlowShell,arrColorItemsRGB[0],arrColorItemsRGB[1],arrColorItemsRGB[2],kRenderNormal, 128);

    ArrayPushCell(arrIntTotalLootEntity, ent);
    ArrayPushCell(arrIntOriginsLootX, FloatToNum(origin[0]));
    ArrayPushCell(arrIntOriginsLootY, FloatToNum(origin[1]));
    ArrayPushCell(arrIntOriginsLootZ, FloatToNum(origin[2] + 10));


    /*
    if(get_pcvar_num( CVAR_wc3_loot_remove ) == 1)
    {
        new arrParams[2];
        arrParams[0] = ent;
        arrParams[1] = (TASK_LOOTREMOVE + ent);

        set_task(get_pcvar_float( CVAR_wc3_loot_stay ), "fRemoveLootItem", TASK_LOOTREMOVE + ent,arrParams, sizeof(arrParams));
    }
    */

    return -1;
}


public bIsItemUserSlot(idUser,iSlot)
{
    new iVictimItemShop = ITEM_NONE;

    if(ITEM_Has( idUser, ITEM_ANKH ) == iSlot && ITEM_HasItem( idUser, ITEM_ANKH ) == ITEM_ANKH )
        iVictimItemShop = ITEM_ANKH;
    if(ITEM_Has( idUser, ITEM_BOOTS ) == iSlot && ITEM_HasItem( idUser, ITEM_BOOTS ) == ITEM_BOOTS )
        iVictimItemShop = ITEM_BOOTS;
    if(ITEM_Has( idUser, ITEM_CLAWS ) == iSlot && ITEM_HasItem( idUser, ITEM_CLAWS ) == ITEM_CLAWS )
        iVictimItemShop = ITEM_CLAWS;
    if(ITEM_Has( idUser, ITEM_CLOAK ) == iSlot && ITEM_HasItem( idUser, ITEM_CLOAK ) == ITEM_CLOAK )
        iVictimItemShop = ITEM_CLOAK;
    if(ITEM_Has( idUser, ITEM_MASK ) == iSlot && ITEM_HasItem( idUser, ITEM_MASK ) == ITEM_MASK )
        iVictimItemShop = ITEM_MASK;
    if(ITEM_Has( idUser, ITEM_NECKLACE ) == iSlot && ITEM_HasItem( idUser, ITEM_NECKLACE ) == ITEM_NECKLACE )
        iVictimItemShop = ITEM_NECKLACE;
    if(ITEM_Has( idUser, ITEM_FROST ) == iSlot && ITEM_HasItem( idUser, ITEM_FROST ) == ITEM_FROST )
        iVictimItemShop = ITEM_FROST;
    if(ITEM_Has( idUser, ITEM_HEALTH ) == iSlot && ITEM_HasItem( idUser, ITEM_HEALTH ) == ITEM_HEALTH )
        iVictimItemShop = ITEM_HEALTH;
//    if(ITEM_Has( idUser, ITEM_TOME ) == iSlot && ITEM_HasItem( idUser, ITEM_TOME ) == ITEM_TOME ) //Не входит в слот
//        client_print(idUser,print_chat,"ITEM_TOME YES");
    if(ITEM_Has( idUser, ITEM_SCROLL ) == iSlot && ITEM_HasItem( idUser, ITEM_SCROLL ) == ITEM_SCROLL )
        iVictimItemShop = ITEM_SCROLL;
    if(ITEM_Has( idUser, ITEM_PROTECTANT ) == iSlot && ITEM_HasItem( idUser, ITEM_PROTECTANT ) == ITEM_PROTECTANT )
        iVictimItemShop = ITEM_PROTECTANT;
    if(ITEM_Has( idUser, ITEM_HELM ) == iSlot && ITEM_HasItem( idUser, ITEM_HELM ) == ITEM_HELM )
        iVictimItemShop = ITEM_HELM;
    if(ITEM_Has( idUser, ITEM_AMULET ) == iSlot && ITEM_HasItem( idUser, ITEM_AMULET ) == ITEM_AMULET )
        iVictimItemShop = ITEM_AMULET;
    if(ITEM_Has( idUser, ITEM_SOCK ) == iSlot && ITEM_HasItem( idUser, ITEM_SOCK ) == ITEM_SOCK )
        iVictimItemShop = ITEM_SOCK;
    if(ITEM_Has( idUser, ITEM_GLOVES ) == iSlot && ITEM_HasItem( idUser, ITEM_GLOVES ) == ITEM_GLOVES )
        iVictimItemShop = ITEM_GLOVES;
    if(ITEM_Has( idUser, ITEM_RING ) == iSlot && ITEM_HasItem( idUser, ITEM_RING ) == ITEM_RING )
        iVictimItemShop = ITEM_RING;
    if(ITEM_Has( idUser, ITEM_CHAMELEON ) == iSlot && ITEM_HasItem( idUser, ITEM_CHAMELEON ) == ITEM_CHAMELEON )
        iVictimItemShop = ITEM_CHAMELEON;
    if(ITEM_Has( idUser, ITEM_MOLE ) == iSlot && ITEM_HasItem( idUser, ITEM_MOLE ) == ITEM_MOLE )
        iVictimItemShop = ITEM_MOLE;
    //Для shopmenu3
    if(ITEM_Has( idUser, ITEM_INTELLECT ) == iSlot && ITEM_HasItem( idUser, ITEM_INTELLECT ) == ITEM_INTELLECT )
        iVictimItemShop = ITEM_INTELLECT;
    if(ITEM_Has( idUser, ITEM_GRENADE_PROTECTION ) == iSlot && ITEM_HasItem( idUser, ITEM_GRENADE_PROTECTION ) == ITEM_GRENADE_PROTECTION )
        iVictimItemShop = ITEM_GRENADE_PROTECTION;
    if(ITEM_Has( idUser, ITEM_MIRROR_SHIELD ) == iSlot && ITEM_HasItem( idUser, ITEM_MIRROR_SHIELD ) == ITEM_MIRROR_SHIELD )
        iVictimItemShop = ITEM_MIRROR_SHIELD;
    if(ITEM_Has( idUser, ITEM_ESP ) == iSlot && ITEM_HasItem( idUser, ITEM_ESP ) == ITEM_ESP )
        iVictimItemShop = ITEM_ESP;
    if(ITEM_Has( idUser, ITEM_FROST_ARMOR ) == iSlot && ITEM_HasItem( idUser, ITEM_FROST_ARMOR ) == ITEM_FROST_ARMOR )
        iVictimItemShop = ITEM_FROST_ARMOR;
    if(ITEM_Has( idUser, ITEM_DEATH_TOUCH ) == iSlot && ITEM_HasItem( idUser, ITEM_DEATH_TOUCH ) == ITEM_DEATH_TOUCH )
        iVictimItemShop = ITEM_DEATH_TOUCH;
    if(ITEM_Has( idUser, ITEM_ULTIMATE_TIMER_DIVIDER ) == iSlot && ITEM_HasItem( idUser, ITEM_ULTIMATE_TIMER_DIVIDER ) == ITEM_ULTIMATE_TIMER_DIVIDER )
        iVictimItemShop = ITEM_ULTIMATE_TIMER_DIVIDER;
    if(ITEM_Has( idUser, ITEM_DEVOURER_LIGHT ) == iSlot && ITEM_HasItem( idUser, ITEM_DEVOURER_LIGHT ) == ITEM_DEVOURER_LIGHT )
        iVictimItemShop = ITEM_DEVOURER_LIGHT;
    if(ITEM_Has( idUser, ITEM_ICE_BLOCK ) == iSlot && ITEM_HasItem( idUser, ITEM_ICE_BLOCK ) == ITEM_ICE_BLOCK )
        iVictimItemShop = ITEM_ICE_BLOCK;
    if(ITEM_Has( idUser, ITEM_THIEF ) == iSlot && ITEM_HasItem( idUser, ITEM_THIEF ) == ITEM_THIEF )
        iVictimItemShop = ITEM_THIEF;
    if(ITEM_Has( idUser, ITEM_MIRROR_ULTIMATE ) == iSlot && ITEM_HasItem( idUser, ITEM_MIRROR_ULTIMATE ) == ITEM_MIRROR_ULTIMATE )
        iVictimItemShop = ITEM_MIRROR_ULTIMATE;
    if(ITEM_Has( idUser, ITEM_DEATHCOIL ) == iSlot && ITEM_HasItem( idUser, ITEM_DEATHCOIL ) == ITEM_DEATHCOIL )
        iVictimItemShop = ITEM_DEATHCOIL;
    if(ITEM_Has( idUser, ITEM_IMPALE ) == iSlot && ITEM_HasItem( idUser, ITEM_IMPALE ) == ITEM_IMPALE )
        iVictimItemShop = ITEM_IMPALE;
    if(ITEM_Has( idUser, ITEM_SLEEP ) == iSlot && ITEM_HasItem( idUser, ITEM_SLEEP ) == ITEM_SLEEP )
        iVictimItemShop = ITEM_SLEEP;
    if(ITEM_Has( idUser, ITEM_BOOK_DEAD ) == iSlot && ITEM_HasItem( idUser, ITEM_BOOK_DEAD ) == ITEM_BOOK_DEAD )
        iVictimItemShop = ITEM_BOOK_DEAD;
    if(ITEM_Has( idUser, ITEM_TRANQUILITY ) == iSlot && ITEM_HasItem( idUser, ITEM_TRANQUILITY ) == ITEM_TRANQUILITY )
        iVictimItemShop = ITEM_TRANQUILITY;

    return iVictimItemShop;
}

//Цвет выпавших вещей
stock fColorItems(iItemVictimShop1,iItemVictimShop2,iItemVictimShop3)
{
                new bIsDropItems = 3;
         
                if(iItemVictimShop1 != ITEM_NONE)//Если были у жертвы вещи в слоте 1
                {
                    arrColorItemsRGB[0] = 255;
                    arrColorItemsRGB[1] = 0;
                    arrColorItemsRGB[2] = 0;
                    return arrColorItemsRGB;
                }
                else
                {
                    bIsDropItems -= 1;
                }
         
                if(iItemVictimShop2 != ITEM_NONE)//Если были у жертвы вещи в слоте 2
                {
                    arrColorItemsRGB[0] = 255;
                    arrColorItemsRGB[1] = 0;
                    arrColorItemsRGB[2] = 0;
                    return arrColorItemsRGB;
                }
                else
                {
                    bIsDropItems -= 1;
                }

                if(iItemVictimShop3 != ITEM_NONE)//Если были у жертвы вещи в слоте 3
                {
                    arrColorItemsRGB[0] = 255;
                    arrColorItemsRGB[1] = 0;
                    arrColorItemsRGB[2] = 0;
                    return arrColorItemsRGB;
                }
                else
                {
                    bIsDropItems -= 1;
                }
         
                //Если у жертвы совсем не оказалось предметов
                if(bIsDropItems == 0)
                {
                    arrColorItemsRGB[0] = 30;
                    arrColorItemsRGB[1] = 144;
                    arrColorItemsRGB[2] = 255;
                    return arrColorItemsRGB;
                }
         
    return arrColorItemsRGB;
}


//Есть ли выпавшие вещи у жертвы
stock fIsDropItems(iItemVictimShop1,iItemVictimShop2,iItemVictimShop3)
{
    new bIsDropItems = 3;

    if(iItemVictimShop1 == ITEM_NONE)//Если были у жертвы вещи в слоте 1
        bIsDropItems -= 1;

    if(iItemVictimShop2 == ITEM_NONE)//Если были у жертвы вещи в слоте 2
        bIsDropItems -= 1;

    if(iItemVictimShop3 == ITEM_NONE)//Если были у жертвы вещи в слоте 3
        bIsDropItems -= 1;

    //Если у жертвы совсем не оказалось предметов
    if(bIsDropItems == 0)
        return bIsDropItems;
         
    return bIsDropItems;
}

//Отображение сообщения при поднятии предмета
stock fShowMsgPickUpItem(idUserTouch,szShowMessage[256],iRed,iGreen,iBlue)
{
    set_hudmessage(iRed,iGreen,iBlue,0.85,0.5,0,0.0,5.0,0.02,0.02,-1);
    ShowSyncHudMsg(idUserTouch, msgSyncObj,szShowMessage);
}


//Отображение сообщения при поднятии предмета
stock fShowMessagePickUpItem(idUserTouch,szShowMessage[256],iRed,iGreen,iBlue,iTypeLoot)
{
    UTIL_ClearDHudChannel(idUserTouch);
    UTIL_ClearHudChannel(idUserTouch,HUD_XP);
    WC3_ShowBar(idUserTouch);


    switch(iTypeLoot)
    {
        case enMoney:
            {
                set_dhudmessage(iRed,iGreen,iBlue, 0.85,0.5,2,0.0,2.0,0.02,0.02, -1);
                show_dhudmessage(idUserTouch, szShowMessage);

            }

        case enHealth:
            {
                set_dhudmessage(iRed,iGreen,iBlue, 0.85,0.55,2,0.0,2.0,0.02,0.02, -1);
                show_dhudmessage(idUserTouch, szShowMessage);
            }

        case enArmor:
            {
                set_dhudmessage(iRed,iGreen,iBlue, 0.85,0.6,2,0.0,2.0,0.02,0.02, -1);
                show_dhudmessage(idUserTouch, szShowMessage);
            }

        case enXP:
            {
                set_dhudmessage(iRed,iGreen,iBlue, 0.85,0.65,2,0.0,2.0,0.02,0.02, -1);
                show_dhudmessage(idUserTouch, szShowMessage);
            }

        case enOther:
            {
                set_dhudmessage(iRed,iGreen,iBlue, 0.85,0.45,2,0.0,2.0,0.02,0.02, -1);
                show_dhudmessage(idUserTouch, szShowMessage);
            }
    }

}



//Запуск счетчика отсчета на удаление предмета
public fRunCalcRemoveLootItem()
{
    if (get_pcvar_num( CVAR_wc3_loot_remove ) == 0)
        return;

    if(ArraySize(arrIntTotalLootEntity) == 0)
        return;

    for (new i = 0; i < ArraySize(arrIntTotalLootEntity); i++)
    {
        new entLoot = ArrayGetCell(arrIntTotalLootEntity, i);
        if (!is_valid_ent(entLoot))
            continue;

        new iTimerLoot = ArrayGetCell(arrIntLootRemove, i);

        if(iTimerLoot == 0)
        {
            fRemoveLootItem(entLoot);
        }
        else
        {
            ArraySetCell(arrIntLootRemove,i, iTimerLoot - 1);

        }
    }


}
 
//Удаление предмета если он долго лежит на земле
public fRemoveLootItem(idEntLootItem)
{
    if(!is_valid_ent(idEntLootItem))
        return;
 
    entity_set_int(idEntLootItem, EV_INT_movetype, MOVETYPE_FLY);
    entity_set_int(idEntLootItem, EV_INT_rendermode, kRenderTransAlpha);
    entity_set_int(idEntLootItem, EV_INT_renderfx, kRenderFxGlowShell);
    entity_set_float(idEntLootItem, EV_FL_renderamt, 255.0);
    entity_set_vector(idEntLootItem, EV_VEC_rendercolor, Float:{255.0, 255.0, 0.0});
    entity_set_vector(idEntLootItem, EV_VEC_velocity, Float:{0.0, 0.0, 20.0});

    new arrParams[2];
    arrParams[0] = idEntLootItem;
    arrParams[1] = 250;

    fEffectRemoveLootItem(arrParams);

}

public fEffectRemoveLootItem(arr[2]) // arr = [idEntLootItem, Float:fStart
{
    new idEntLootItem = arr[0];
    new iStart = arr[1];

    if(!is_valid_ent(idEntLootItem))
    {
        task_remove(TASK_LOOTITEM + idEntLootItem);
        return;
    }

    static Float:fFadeAmount[4096];

    if(iStart)
    {
        task_remove(TASK_LOOTITEM + idEntLootItem);
        fFadeAmount[idEntLootItem] = float(iStart);
    }

    fFadeAmount[idEntLootItem] -= 25.0;

    if(fFadeAmount[idEntLootItem] > 0.0)
    {
        entity_set_float(idEntLootItem, EV_FL_renderamt, fFadeAmount[idEntLootItem]);

            new arrParams[2];
            arrParams[0] = idEntLootItem;
            arrParams[1] = 0;
            task_set(0.1, "fEffectRemoveLootItem",TASK_LOOTITEM + idEntLootItem,arrParams, sizeof(arrParams));
    }
    else
    {
        new classname[32];
        pev(idEntLootItem, pev_classname, classname, sizeof classname - 1);

        if (equali(classname, "war3ft_loot_items"))
        {
            for (new i = 0; i < ArraySize(arrIntTotalLootEntity); i++)
            {
                if(idEntLootItem == ArrayGetCell(arrIntTotalLootEntity, i))
                {
                    new entLoot = ArrayGetCell(arrIntTotalLootEntity, i);
                    if (is_valid_ent(entLoot))
                        engfunc(EngFunc_RemoveEntity, entLoot);

                    ArrayDeleteItem(arrIntTotalLootEntity,i);
                    ArrayDeleteItem(arrIntOriginsLootX,i);
                    ArrayDeleteItem(arrIntOriginsLootY,i);
                    ArrayDeleteItem(arrIntOriginsLootZ,i);
                    ArrayDeleteItem(arrIntItemVictimShop1,i);
                    ArrayDeleteItem(arrIntItemVictimShop2,i);
                    ArrayDeleteItem(arrIntItemVictimShop3,i);
                    ArrayDeleteItem(arrIntDrawSpriteItems,i);
                    ArrayDeleteItem(arrIntScaleSpriteItems,i);
                    ArrayDeleteItem(arrIntLootRemove,i);
             
                    //client_print(0,print_chat,"Item DELETE");

                    break;
                }
            }

        }
    }
}

//Отрисовка иконок
public client_PostThink(idUser)
{
    if(!is_user_alive(idUser))
    return;

    if ((fIconDelayLootItems + fIconUpdateLootItems) > get_gametime())
        return;
 
    fIconDelayLootItems = get_gametime();

    //Включение/отключение иконки отображающейся над выпавшим талисманом
    if(get_pcvar_num( CVAR_wc3_icon_talisman ) > 0)
        create_icon_origin(idUser, entTalisman, arrIdSprites[SPR_ICON_TALISMAN]);

    if(get_pcvar_num( CVAR_wc3_loot_items ) > 0)
    {
        if (!is_user_alive(idUser) || ArraySize(arrIntTotalLootEntity) == 0)
            return;

        for (new i = 0; i < ArraySize(arrIntTotalLootEntity); i++)
        {
            new iSprite = ArrayGetCell(arrIntDrawSpriteItems, i);
            new iScale = ArrayGetCell(arrIntScaleSpriteItems, i);
            fDrawSprite(idUser,i,iSprite,iScale);
        }
    }

    return;
}


stock create_icon_origin(id, ent, sprite)
{
    if(!is_user_alive(id) || !is_user_connected(id))
      return;

    if (!pev_valid(ent))
        return;

    new Float:fMyOrigin[3]
    entity_get_vector(id, EV_VEC_origin, fMyOrigin)

    new target = ent
    new Float:fTargetOrigin[3]
    entity_get_vector(target, EV_VEC_origin, fTargetOrigin)
    fTargetOrigin[2] += 70.0

    if (!is_in_viewcone(id, fTargetOrigin))
        return;

    new Float:fMiddle[3], Float:fHitPoint[3]
    xs_vec_sub(fTargetOrigin, fMyOrigin, fMiddle)
    trace_line(-1, fMyOrigin, fTargetOrigin, fHitPoint)
                     
    new Float:fWallOffset[3], Float:fDistanceToWall
    fDistanceToWall = vector_distance(fMyOrigin, fHitPoint) - 10.0
    normalize(fMiddle, fWallOffset, fDistanceToWall)

    new Float:fSpriteOffset[3]
    xs_vec_add(fWallOffset, fMyOrigin, fSpriteOffset)
    new Float:fScale//, Float:fDistanceToTarget = vector_distance(fMyOrigin, fTargetOrigin)
    fScale = 0.01 * fDistanceToWall;

    new scale = floatround(fScale)
    scale = max(scale, 1)
    scale = min(scale, 2)
    scale = max(scale, 1)

    te_sprite(id, fSpriteOffset, sprite, scale, 100);
}

stock te_sprite(id, Float:origin[3], sprite, scale, brightness)
{
    message_begin(MSG_ONE, SVC_TEMPENTITY, _, id)
    write_byte(TE_SPRITE)
    write_coord(floatround(origin[0]))
    write_coord(floatround(origin[1]))
    write_coord(floatround(origin[2]))
    write_short(sprite)
    write_byte(scale)
    write_byte(brightness)
    message_end()
}
stock normalize(Float:fIn[3], Float:fOut[3], Float:fMul)
{
    new Float:fLen = xs_vec_len(fIn)
    xs_vec_copy(fIn, fOut)

    fOut[0] /= fLen, fOut[1] /= fLen, fOut[2] /= fLen
    fOut[0] *= fMul, fOut[1] *= fMul, fOut[2] *= fMul
}

//Функция отрисовки
fDrawSprite(idUser,iLoot,iSprite,iScale)
{
    message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, idUser);
    write_byte(TE_SPRITE); // additive sprite, plays 1 cycle
    write_coord(ArrayGetCell(arrIntOriginsLootX, iLoot)); // xpos
    write_coord(ArrayGetCell(arrIntOriginsLootY, iLoot)); // ypos
    write_coord(ArrayGetCell(arrIntOriginsLootZ, iLoot)); // zpos
    write_short(iSprite); // spr index
    write_byte(iScale); // (scale in 0.1's)
    write_byte(30); //brightness
    message_end();
}

//Когда прикасаешься к предмету
public player_Touch(idEntityTouched, idUserTouch)
{
    if(get_pcvar_num( CVAR_wc3_loot_items ) > 0)
    {
        if (!pev_valid(idEntityTouched) || !is_user_alive(idUserTouch))
            return FMRES_IGNORED
 
        new szClassname[32];
        pev(idEntityTouched, pev_classname, szClassname, sizeof szClassname - 1)
 
        new iSumMoney = 0;

        if (equali(szClassname, "war3ft_loot_items"))
        {
            for (new i = 0; i < ArraySize(arrIntTotalLootEntity); i++)
            {
                if(idEntityTouched == ArrayGetCell(arrIntTotalLootEntity, i))
                {
                    new entLoot = ArrayGetCell(arrIntTotalLootEntity, i);
                    if (is_valid_ent(entLoot))
                        engfunc(EngFunc_RemoveEntity, entLoot);
             
                    fScreenFadePlayer(idUserTouch);
             
                    new iItemVictimShop1 = ArrayGetCell(arrIntItemVictimShop1, i);
                    new iItemVictimShop2 = ArrayGetCell(arrIntItemVictimShop2, i);
                    new iItemVictimShop3 = ArrayGetCell(arrIntItemVictimShop3, i);
                    new bIsDropItems = 3;
                    new szShowMessageLoot[256];
             
                    if(iItemVictimShop1 != ITEM_NONE)//Если были у жертвы вещи в слоте 1
                    {
                            if(ITEM_GetSlot( idUserTouch ) != ITEM_SLOT_FULL &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_ONE) != iItemVictimShop1 &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_TWO) != iItemVictimShop1 &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_THREE) != iItemVictimShop1)
                            {
                         
                                ITEM_GiveItem( idUserTouch, iItemVictimShop1);
                            }
                            else
                            {
                                //Вознаграждение если у подобравшего все слоты заняты.Дается денежка за вещь
                                new iItemMoneyDrop1 = ITEM_Cost( idUserTouch, iItemVictimShop1 );
                                iSumMoney += iItemMoneyDrop1;
                            }
                    }
                    else
                    {
                        bIsDropItems -= 1;
                    }
             
                    if(iItemVictimShop2 != ITEM_NONE)//Если были у жертвы вещи в слоте 2
                    {
                            if(ITEM_GetSlot( idUserTouch ) != ITEM_SLOT_FULL &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_ONE) != iItemVictimShop2 &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_TWO) != iItemVictimShop2 &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_THREE) != iItemVictimShop2)
                            {
                                ITEM_GiveItem( idUserTouch, iItemVictimShop2 );
                            }
                            else
                            {
                                //Вознаграждение если у подобравшего все слоты заняты.Дается денежка за вещь
                                new iItemMoneyDrop2 = ITEM_Cost( idUserTouch, iItemVictimShop2 );
                                iSumMoney += iItemMoneyDrop2;
                            }
                    }
                    else
                    {
                        bIsDropItems -= 1;
                    }
             
                    if(iItemVictimShop3 != ITEM_NONE)//Если были у жертвы вещи в слоте 3
                    {
                            if(ITEM_GetSlot( idUserTouch ) != ITEM_SLOT_FULL &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_ONE) != iItemVictimShop3 &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_TWO) != iItemVictimShop3 &&
                                bIsItemUserSlot(idUserTouch,ITEM_SLOT_THREE) != iItemVictimShop3)
                            {
                                ITEM_GiveItem( idUserTouch, iItemVictimShop3 );
                            }
                            else
                            {
                                //Вознаграждение если у подобравшего все слоты заняты.Дается денежка за вещь
                                new iItemMoneyDrop3 = ITEM_Cost( idUserTouch, iItemVictimShop3 );
                                iSumMoney += iItemMoneyDrop3;
                            }
                    }
                    else
                    {
                        bIsDropItems -= 1;
                    }
             
                    //Начисление денег за все предметы
                    if(iSumMoney > 0)
                    {
                        SHARED_SetUserMoney( idUserTouch,SHARED_GetUserMoney( idUserTouch ) + iSumMoney, 1 );
                         
                        format(szShowMessageLoot, charsmax(szShowMessageLoot), "+$: %d",iSumMoney);
                        //fShowMsgPickUpItem(idUserTouch,szShowMessageLoot,188,143,143);
                        fShowMessagePickUpItem(idUserTouch,szShowMessageLoot,188,143,143,enMoney);
                    }
             
                    //Если у жертвы совсем не оказалось предметов
                    if(bIsDropItems == 0)
                    {
                        //client_print(idUserTouch,print_chat,"XP: %d",XP_GivenByLevel( iLevel ));
                        //client_print(idUserTouch,print_chat,"XP 2: %d",XP_GetByLevel( iLevel ));
                                     
                        switch(random_num(0, 2))
                        {
                            case 0:
                            {
                                new iMaxHealth = clHP:getRaceMaxHealth(idUserTouch);
                                new iCurrentHealth =  clHP:getUserHealth(idUserTouch);
                                new iBonusHp = get_pcvar_num(CVAR_wc3_loot_items_health);
                         
                                if((iCurrentHealth + iBonusHp) > iMaxHealth)
                                    clHP:setUserHealth(idUserTouch,iMaxHealth);
                                else
                                    clHP:setUserHealth(idUserTouch,iCurrentHealth + iBonusHp);
                         
                                format(szShowMessageLoot, charsmax(szShowMessageLoot), "+HP: %d",iBonusHp);
                                fShowMessagePickUpItem(idUserTouch,szShowMessageLoot,205,92,92,enHealth);
                            }
                            case 1:
                            {
                                new iMaxArmor = clAr:getRaceMaxArmor(idUserTouch);
                                new CsArmorType:tArmor;
                                new iCurrentArmor =  clAr:getUserArmor(idUserTouch,tArmor);
                                new iBonusArmor = get_pcvar_num(CVAR_wc3_loot_items_armor);
                         
                                if((iCurrentArmor + iBonusArmor) > iMaxArmor)
                                    clAr:setUserArmor(idUserTouch,iMaxArmor);
                                else
                                    clAr:setUserArmor(idUserTouch,iCurrentArmor + iBonusArmor);

                                format(szShowMessageLoot, charsmax(szShowMessageLoot), "+AR: %d",iBonusArmor);
                                fShowMessagePickUpItem(idUserTouch,szShowMessageLoot,0,255,127,enArmor);
                            }
                            case 2:
                            {
                                new iLevel = arrIntData[idUserTouch][P_LEVEL];
                                new iBonusXP = XP_GivenByLevel( iLevel );
                                XP_Give( idUserTouch, iBonusXP );
                     
                                format(szShowMessageLoot, charsmax(szShowMessageLoot), "+XP: %d",iBonusXP);
                                fShowMessagePickUpItem(idUserTouch,szShowMessageLoot,188,143,143,enXP);
                     
                            }
                        }
                    }
     
                    ArrayDeleteItem(arrIntTotalLootEntity,i);
                    ArrayDeleteItem(arrIntOriginsLootX,i);
                    ArrayDeleteItem(arrIntOriginsLootY,i);
                    ArrayDeleteItem(arrIntOriginsLootZ,i);
                    ArrayDeleteItem(arrIntItemVictimShop1,i);
                    ArrayDeleteItem(arrIntItemVictimShop2,i);
                    ArrayDeleteItem(arrIntItemVictimShop3,i);
                    ArrayDeleteItem(arrIntDrawSpriteItems,i);
                    ArrayDeleteItem(arrIntScaleSpriteItems,i);
             
                    if (get_pcvar_num( CVAR_wc3_loot_remove ) == 1)
                        ArrayDeleteItem(arrIntLootRemove,i);
             
             
                    break;
                }
            }
        }//if (equali(classname, "war3ft_loot_items"))
    }//if(get_pcvar_num( CVAR_wc3_loot_items ) > 0)

    //Для talisman +
    touchPlayerTalisman(idEntityTouched, idUserTouch);

    return FMRES_IGNORED
}
Код:
//јктиваци¤ двойного опыта
public fActiveDoubleXP()//добавлена в events.inl (public EVENT_NewRound())
{
   
    if (iMultiXPOnOff <= 0)
        return;

    //ќбнуление двойного активации опыта
    bDoubleXPActive = false;

    new szCurrentTime[31];
    get_time("%H",szCurrentTime,charsmax(szCurrentTime));
    new iHour = str_to_num(szCurrentTime);

    for(new i = 0; i < MAX_HOUR; i++)
    {
        new iMultiXPHour = ArrayGetCell(arrIntMultiXPHourData,i);

        if(iHour == LIST_TIME[i] && iMultiXPHour == ON)
        {
            bDoubleXPActive = true;
            break;
        }
    }
}

public mxp_ClientPutinserver(idUser)//добавлена в cssbWar3ftMod.sma ( public client_putinserver( idUser ) )
{
   
    if ( idUser >= TASK_MULTIXP )
        idUser -= TASK_MULTIXP;

    fActiveDoubleXP();

    if(bDoubleXPActive == true)
    {
        new szShowMsgMultiXP[255];
        format(szShowMsgMultiXP, charsmax(szShowMsgMultiXP), "%L",LANG_PLAYER,"WC3_MULTI_XP_ACTIVE",iBonusFactorXP);
        set_dhudmessage(119,136,153,-1.0,-1.0,2,0.0,2.0,0.02,0.02, -1);
        show_dhudmessage(idUser, szShowMsgMultiXP);

        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szShowMsgMultiXP);
    }

}
Код:
/*
*    Race: Priest (∆рец) Functions
*/

//»нициализаци¤ скилов Race: Priest (∆рец)
public clRacePriest::setPriestSkillsInit()//добавлена в skill_manager.cpp ( SM_Init() )
{
    // Set up the Skill Owners
    g_SkillOwner[SKILL_PRIEST_ENTRYINTOCHASM                ]    = RACE_PRIEST;
    g_SkillOwner[SKILL_PRIEST_SACRED_FIRE                    ]    = RACE_PRIEST;
    g_SkillOwner[SKILL_PRIEST_SPIRITUAL_ACCURACY            ]    = RACE_PRIEST;
    g_SkillOwner[ULTIMATE_PRIEST_DARKNESS_WORD_DEATH        ]    = RACE_PRIEST;
    g_SkillOwner[PASS_PRIEST_MYSTICISM                        ]    = RACE_PRIEST;

    // Set up the skill types
    g_SkillType[SKILL_PRIEST_ENTRYINTOCHASM                    ]    = SKILL_TYPE_TRAINABLE;
    g_SkillType[SKILL_PRIEST_SACRED_FIRE                    ]    = SKILL_TYPE_TRAINABLE;
    g_SkillType[SKILL_PRIEST_SPIRITUAL_ACCURACY                ]    = SKILL_TYPE_TRAINABLE;
    g_SkillType[ULTIMATE_PRIEST_DARKNESS_WORD_DEATH            ]    = SKILL_TYPE_ULTIMATE;
    g_SkillType[PASS_PRIEST_MYSTICISM                        ]    = SKILL_TYPE_PASSIVE;

    // Set up the skill order
    g_SkillOrder[SKILL_PRIEST_ENTRYINTOCHASM                ]    = SKILL_POS_1;
    g_SkillOrder[SKILL_PRIEST_SACRED_FIRE                    ]    = SKILL_POS_2;
    g_SkillOrder[SKILL_PRIEST_SPIRITUAL_ACCURACY            ]    = SKILL_POS_3;
    g_SkillOrder[ULTIMATE_PRIEST_DARKNESS_WORD_DEATH        ]    = SKILL_POS_4;
    g_SkillOrder[PASS_PRIEST_MYSTICISM                        ]    = SKILL_POS_NONE;

}



// *******************************************************
// —кил 1 уровн¤ - Entry into a chasm - ¬хождение в бездну - защитный
// *******************************************************
public clRacePriest::skillEntryInChasm(idVictim,idAttacker)
{
    if (!is_user_alive( idAttacker ) && !arrBoolData[idAttacker][PB_ISCONNECTED])
        return;

    new iSkillLevel = SM_GetSkillLevel(idAttacker, SKILL_PRIEST_ENTRYINTOCHASM);
    if(iSkillLevel > 0)
    {
        if(isDisabledSkillsOnMap(idAttacker,SKILL_PRIEST_ENTRYINTOCHASM) == true)
            return;

        new Float:fEntryintochasm = ArrayGetCell(arrEntryintochasm,iSkillLevel-1);
        if (!arrBoolData[idAttacker][PB_HEXED] &&
            random_float(fPriestSkill1MinPercent,fPriestSkill1MaxPercent) <= fEntryintochasm &&
            arrBoolData[idAttacker][PB_ISFROZENSKILL] == false)
        {
            if(get_user_team(idVictim) != get_user_team(idAttacker) )
            {
                new iAttackerCurHealth = clHP:getUserHealth(idAttacker);
                new iVictimCurHealth = clHP:getUserHealth(idVictim);

                if(iVictimCurHealth > iAttackerCurHealth)
                {
                    clHP:setUserHealth(idAttacker,iVictimCurHealth);
                    clHP:setUserHealth(idVictim,iAttackerCurHealth);
                }
            }
     
        }
    }
}
// *******************************************************
// —кил 2 уровн¤ - Sacred fire - —в¤щенный огонь - наступательный
// *******************************************************
public fwHamWeapPriAttack(idWeapon)
{
    if (!pev_valid(idWeapon))
        return HAM_IGNORED;

    static idOwner;
    idOwner = pev(idWeapon, pev_owner)

    if (!is_user_alive( idOwner ) && !arrBoolData[idOwner][PB_ISCONNECTED])
        return HAM_IGNORED;

    if (fm_get_weaponid(idWeapon) == CSW_KNIFE)
        return HAM_IGNORED;

    if (fm_get_weapon_ammo(idWeapon) > 0 && arrFireWeapon[idOwner] > 0 && arrIsWorkFireWeapon[idOwner] == true)
    {
        arrFireWeapon[idOwner] -= 1;
        arrIsWorkFireWeapon[idOwner] = false;
    }

    return HAM_IGNORED;
}

public fwHamTraceAttackPriest(idVictim, idAttacker, Float:fDamage, Float:fDirection[3], tracehandle, damage_type)
{
    //client_print(idAttacker,print_chat,"FA: %d",arrFireWeapon[idAttacker]);

    if (!is_user_alive( idAttacker ))
        return HAM_HANDLED;

    if (!is_user_alive( idVictim ))
        return HAM_HANDLED;

    if (!is_user_alive( idAttacker ) && !arrBoolData[idAttacker][PB_ISCONNECTED])
        return HAM_HANDLED;

    if (!is_user_alive( idVictim ) && !arrBoolData[idVictim][PB_ISCONNECTED])
        return HAM_HANDLED;


    if ((get_user_weapon(idAttacker) == CSW_KNIFE))
        return HAM_IGNORED;

    if ( (idVictim == idAttacker) || !is_user_connected(idAttacker) ||
         (get_user_team(idVictim) == get_user_team(idAttacker))
       )
        return HAM_HANDLED;

    if(arrIsEffectBubble[idAttacker] == true)
        clRacePriest::stBubbles(idAttacker);

    new iSkillLevel = SM_GetSkillLevel(idVictim, SKILL_PRIEST_SPIRITUAL_ACCURACY);
    if (iSkillLevel > 0 && isDisabledSkillsOnMap(idVictim,SKILL_PRIEST_SPIRITUAL_ACCURACY) == false)
    {
        new Float:fSpiritual = ArrayGetCell(arrSpiritualAccuracy,iSkillLevel-1);
        if (is_user_alive( idVictim ) && arrBoolData[idVictim][PB_ISCONNECTED]&&
                random_float(fPriestSkill3MinPercent,fPriestSkill3MaxPercent) <= fSpiritual &&
                arrBoolData[idAttacker][PB_ISFROZENSKILL] == false &&
                arrIsEffectBubble[idAttacker] == false)
        {
            clRacePriest::skillSpAccuracy(idVictim,idAttacker);
        }
    }

    if (!arrFireWeapon[idAttacker])
        return HAM_HANDLED;

    if (!(damage_type & DMG_BULLET))
        return HAM_HANDLED;

    iSkillLevel = SM_GetSkillLevel(idAttacker, SKILL_PRIEST_SACRED_FIRE);
    if (iSkillLevel > 0 && isDisabledSkillsOnMap(idAttacker,SKILL_PRIEST_SACRED_FIRE) == false)
    {
        new Float:fSacredfire = ArrayGetCell(arrSacredFire,iSkillLevel-1);
        if (is_user_alive( idAttacker ) && arrBoolData[idAttacker][PB_ISCONNECTED]&&
                random_float(fPriestSkill2MinPercent,fPriestSkill2MaxPercent) <= fSacredfire     &&
                arrBoolData[idAttacker][PB_ISFROZENSKILL] == false)
        {

            fStartFire(idVictim, idAttacker);
            arrIsWorkFireWeapon[idAttacker] = true;
        }
    }


    return HAM_IGNORED;
}

fStartFire(idVictim, idAttacker)
{
    static params[3];
    params[0] = floatround(fFireDuration * 5.0); // duration
    params[1] = idAttacker; // attacker
    params[2] = idVictim + clRacePriest::tID_SACRED_FIRE;

    if (task_exists(idVictim + clRacePriest::tID_SACRED_FIRE ))
        return;

    set_task(0.2, "fBurningFlame",params[2], params, sizeof params);


}

public fBurningFlame(args[3])
{
    //client_print(0,print_chat,"fBurningFlame");

    new idUser = args[2];
    if (args[2] >= clRacePriest::tID_SACRED_FIRE )
        idUser -= clRacePriest::tID_SACRED_FIRE;

    if (!is_user_alive(idUser))
        return;

    static Float:originF[3]
    pev(idUser, pev_origin, originF)

    if ((pev(idUser, pev_flags) & FL_INWATER) || FLAME_DURATION < 1)
    {
        // Smoke sprite
        engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0);
        write_byte(TE_SMOKE); // TE id
        engfunc(EngFunc_WriteCoord, originF[0]); // x
        engfunc(EngFunc_WriteCoord, originF[1]); // y
        engfunc(EngFunc_WriteCoord, originF[2]-50.0); // z
        write_short(arrIdSprites[SPR_SMOKE_PRIEST]); // sprite
        write_byte(random_num(15, 20)); // scale
        write_byte(random_num(10, 20)); // framerate
        message_end()
 
        return;
    }

    if ((pev(idUser, pev_flags) & FL_ONGROUND) && fFireSlowdown > 0.0)
    {
        static Float:velocity[3];
        pev(idUser, pev_velocity, velocity);
        xs_vec_mul_scalar(velocity, fFireSlowdown, velocity);
        set_pev(idUser, pev_velocity, velocity);
    }

    new health = clHP:getUserHealth(idUser);

    if (health > fFireDamage)
        clHP:setUserHealth(idUser,health - floatround(fFireDamage));
    else
        ExecuteHamB(Ham_Killed, idUser, FLAME_ATTACKER, 0);

    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0);
    write_byte(TE_SPRITE); // TE id
    engfunc(EngFunc_WriteCoord, originF[0]+random_float(-5.0, 5.0)); // x
    engfunc(EngFunc_WriteCoord, originF[1]+random_float(-5.0, 5.0)); // y
    engfunc(EngFunc_WriteCoord, originF[2]+random_float(-10.0, 10.0)); // z
    write_short(arrIdSprites[SPR_FIRE_PRIEST]); // sprite
    write_byte(random_num(5, 10)); // scale
    write_byte(200); // brightness
    message_end();

    // Decrease burning duration counter
    FLAME_DURATION -= 1;

    new Float:firl_time
    if (0.2 > fFireDuration)
        firl_time = fFireDuration - 0.1;
    else
        firl_time = 0.2;

    set_task(firl_time, "fBurningFlame", args[2], args, sizeof args);
}

// *******************************************************
// —кил 3 уровн¤ - ƒуховна¤ меткость - Spiritual accuracy - защитный
// *******************************************************
public clRacePriest::skillSpAccuracy(idVictim,idAttacker)
{
    if(!arrBoolData[idAttacker][PB_ISCONNECTED])
        return 0;

    clRacePriest::stBubbles(idAttacker);

    if (task_exists(idAttacker + clRacePriest::tID_SP_ACCURACY ) == 0 )
    {
        set_user_hitzones(idAttacker, 0, 0); //ƒелаем холостые выстрелы

        arrIsEffectBubble[idAttacker] = true;

        set_task(0.7, "_setTaskResetSPA", clRacePriest::tID_SP_ACCURACY + idAttacker );
    }

    return 0;
}

public clRacePriest::setTaskResetSPA(idAttacker)
{
    if (idAttacker >= clRacePriest::tID_SP_ACCURACY )
        idAttacker -= clRacePriest::tID_SP_ACCURACY;

    if(!arrBoolData[idAttacker][PB_ISCONNECTED])
        return;

    set_user_hitzones(idAttacker, 0, 255);    // ¬осстанавливаем нормальный режим стрельбы
    arrIsEffectBubble[idAttacker] = false;
}

stock clRacePriest::stBubbles(idAttacker)
{
    new ptPlayerOrigin[3], ptBulletOrigin[3];
    get_user_origin(idAttacker, ptPlayerOrigin, 1);
    get_user_origin(idAttacker, ptBulletOrigin, 4);

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY, ptBulletOrigin);
    write_byte(114);
    write_coord(ptPlayerOrigin[0]);
    write_coord(ptPlayerOrigin[1]);
    write_coord(ptPlayerOrigin[2]);
    write_coord(ptBulletOrigin[0]);
    write_coord(ptBulletOrigin[1]);
    write_coord(ptBulletOrigin[2]);
    write_coord(40);
    write_short(arrIdSprites[SPR_BUBBLE_PRIEST]);
    write_byte(10);
    write_coord(40);
    message_end();
}


// *******************************************************
// —упер навык - —лово “ьмы - —мерть - Darkness word: Death
// *******************************************************
public clRacePriest::ultDarkWordDeath(idVictim)
{
    if ( !ULT_Available( idVictim ) )
        return;

    if ( arrBoolData[idVictim][PB_CHANGINGTEAM] )
        return;

    //Ѕлокировка супер навыка если у игрока ќжерелье {
    new Float:ptVictim[3]
    pev(idVictim, pev_origin, ptVictim);

    new arrPlayers[32], iNumPlayers;
    get_players(arrPlayers, iNumPlayers, "a" );

    new iTargetID;
    new iTeam = get_user_team( idVictim );

    for(new i = 0; i < iNumPlayers; i++)
    {
        iTargetID = arrPlayers[i];

        if(iTargetID == idVictim)
            continue;

        if(is_user_alive(iTargetID))
        {
            new Float:ptOriginTarget[3], Float:fDistance;
            pev(iTargetID, pev_origin, ptOriginTarget);
            fDistance = get_distance_f(ptVictim, ptOriginTarget);

            //client_print(idVictim,print_chat,"fDistance: %.1f",fDistance);

            if(fDistance <= fBlockUltRadius && iTeam != get_user_team(iTargetID))
            {
                if (ULT_CanUserBlockUlt(iTargetID,idVictim))
                {
                    ULT_RemoveCharge(iTargetID);

                    ULT_Blocked(idVictim);
             
                    fResetUltimateTimerDivider(idVictim);

                    return;
                }
            }
        }
    }
    //Ѕлокировка супер навыка если у игрока ќжерелье }

    set_pev(idVictim, pev_sequence, 12);
    set_pev(idVictim, pev_animtime, halflife_time());
    set_pev(idVictim, pev_framerate, 1.0);
    set_pev(idVictim, pev_movetype, MOVETYPE_NONE);

    new Float:ptOrigin[3];
    pev(idVictim, pev_origin, ptOrigin);
    clRacePriest::stGetPos(idVictim, 150.0, 0.0, 0.0, ptOrigin);

    emit_sound(idVictim,CHAN_STATIC, arrStrSounds[SOUND_FIREBALL_PRIEST], 0.5, ATTN_NORM,SND_CHANGE_VOL, PITCH_NORM);

    new taskParm[4]
    taskParm[0] = idVictim;
    taskParm[1] = floatround(ptOrigin[0]);
    taskParm[2] = floatround(ptOrigin[1]);
    taskParm[3] = floatround(ptOrigin[2]);

    set_task(0.5, "_fSetFireAttack", idVictim + clRacePriest::tID_FIRE_ATTACK, taskParm, 4 );
    set_task(3.0, "_fStopUlt", idVictim + clRacePriest::tID_REMOVE_ATTACK);

    fResetUltimateTimerDivider(idVictim);

}

public clRacePriest::fSetFireAttack(taskParm[4])
{
    new idVictim = taskParm[0];

    new Float:ptSkyOrigin[3];
    ptSkyOrigin[0] = float(taskParm[1]);
    ptSkyOrigin[1] = float(taskParm[2]);
    ptSkyOrigin[2] = float(taskParm[3]);

    new Float:ptExplosion[24][3], Float:ptBall[24][3]
    ptExplosion[0][0] = 200.0;
    ptExplosion[0][1] = 0.0;
    ptExplosion[0][2] = ptSkyOrigin[2];

    ptExplosion[1][0] = 400.0;
    ptExplosion[1][1] = 0.0;
    ptExplosion[1][2] = ptSkyOrigin[2];

    ptExplosion[2][0] = -200.0;
    ptExplosion[2][1] = 0.0;
    ptExplosion[2][2] = ptSkyOrigin[2];

    ptExplosion[3][0] = -400.0;
    ptExplosion[3][1] = 0.0;
    ptExplosion[3][2] = ptSkyOrigin[2];

    ptExplosion[4][0] = 0.0;
    ptExplosion[4][1] = 200.0;
    ptExplosion[4][2] = ptSkyOrigin[2];

    ptExplosion[5][0] = 0.0;
    ptExplosion[5][1] = 400.0;
    ptExplosion[5][2] = ptSkyOrigin[2];

    ptExplosion[6][0] = 0.0;
    ptExplosion[6][1] = -200.0;
    ptExplosion[6][2] = ptSkyOrigin[2];

    ptExplosion[7][0] = 0.0;
    ptExplosion[7][1] = -400.0;
    ptExplosion[7][2] = ptSkyOrigin[2];

    ptExplosion[8][0] = 200.0;
    ptExplosion[8][1] = 200.0;
    ptExplosion[8][2] = ptSkyOrigin[2];

    ptExplosion[9][0] = 400.0;
    ptExplosion[9][1] = 400.0;
    ptExplosion[9][2] = ptSkyOrigin[2];

    ptExplosion[10][0] = 200.0;
    ptExplosion[10][1] = 400.0;
    ptExplosion[10][2] = ptSkyOrigin[2];

    ptExplosion[11][0] = 400.0;
    ptExplosion[11][1] = 200.0;
    ptExplosion[11][2] = ptSkyOrigin[2];

    ptExplosion[12][0] = -200.0;
    ptExplosion[12][1] = 200.0;
    ptExplosion[12][2] = ptSkyOrigin[2];

    ptExplosion[13][0] = -400.0;
    ptExplosion[13][1] = 400.0;
    ptExplosion[13][2] = ptSkyOrigin[2];

    ptExplosion[14][0] = -200.0
    ptExplosion[14][1] = 400.0
    ptExplosion[14][2] = ptSkyOrigin[2];

    ptExplosion[15][0] = -400.0;
    ptExplosion[15][1] = 200.0;
    ptExplosion[15][2] = ptSkyOrigin[2];

    ptExplosion[16][0] = -200.0;
    ptExplosion[16][1] = -200.0;
    ptExplosion[17][2] = ptSkyOrigin[2];

    ptExplosion[17][0] = -200.0;
    ptExplosion[17][1] = -200.0;
    ptExplosion[17][2] = ptSkyOrigin[2];

    ptExplosion[18][0] = -200.0;
    ptExplosion[18][1] = -400.0;
    ptExplosion[18][2] = ptSkyOrigin[2];

    ptExplosion[19][0] = -400.0;
    ptExplosion[19][1] = -200.0;
    ptExplosion[19][2] = ptSkyOrigin[2];

    ptExplosion[20][0] = 200.0;
    ptExplosion[20][1] = -200.0;
    ptExplosion[20][2] = ptSkyOrigin[2];

    ptExplosion[21][0] = 400.0;
    ptExplosion[21][1] = -400.0;
    ptExplosion[21][2] = ptSkyOrigin[2];

    ptExplosion[22][0] = 200.0;
    ptExplosion[22][1] = -400.0;
    ptExplosion[22][2] = ptSkyOrigin[2];

    ptExplosion[23][0] = 400.0;
    ptExplosion[23][1] = -200.0;
    ptExplosion[23][2] = ptSkyOrigin[2];


    for(new i = 0; i < sizeof(ptExplosion); i++)
    {
        ptBall[i][0] = float(taskParm[1]);
        ptBall[i][1] = float(taskParm[2]);
        ptBall[i][2] = float(taskParm[3]);

        clRacePriest::stGetPos(idVictim, ptExplosion[i][0], ptExplosion[i][1], ptExplosion[i][2], ptBall[i])
        clRacePriest::fCreateFireball(idVictim, ptBall[i])
    }

    set_task(1.0, "_fSetFireAttack", idVictim + clRacePriest::tID_FIRE_ATTACK, taskParm, 4 );
}

stock clRacePriest::stGetPos(idUser, Float:fForward, Float:fRight, Float:fUp, Float:fVecStart[])
{
    new Float:fVecAngle[3], Float:fVecForward[3], Float:fVecRight[3], Float:fViewOfs[3];

    pev(idUser, pev_view_ofs,fViewOfs);
    xs_vec_add(fVecStart,fViewOfs,fVecStart)
    pev(idUser, pev_v_angle, fVecAngle);
    fVecAngle[0] = 0.0;
    angle_vector(fVecAngle,ANGLEVECTOR_FORWARD,fVecForward);
    angle_vector(fVecAngle,ANGLEVECTOR_RIGHT,fVecRight);
    angle_vector(fVecAngle,ANGLEVECTOR_UP,fViewOfs);
    fVecStart[0] = fVecStart[0] + fVecForward[0] * fForward + fVecRight[0] * fRight + fViewOfs[0] * fUp;
    fVecStart[1] = fVecStart[1] + fVecForward[1] * fForward + fVecRight[1] * fRight + fViewOfs[1] * fUp;
    fVecStart[2] = fVecStart[2] + fVecForward[2];
}

public clRacePriest::fCreateFireball(idUser, Float:ptOrigin[3])
{
    new entBall = create_entity("info_target");

    static Float:fAngles[3];
    pev(idUser, pev_angles, fAngles);

    entity_set_origin(entBall, ptOrigin);
    fAngles[0] = -100.0;
    entity_set_vector(entBall, EV_VEC_angles, fAngles);
    fAngles[0] = 100.0;
    entity_set_vector(entBall, EV_VEC_v_angle, fAngles);
    entity_set_string(entBall, EV_SZ_classname, "entBallFire");
    entity_set_model(entBall, arrStrModels[MDL_FIREBALL]);
    entity_set_int(entBall, EV_INT_solid, 2);
    entity_set_int(entBall, EV_INT_movetype, MOVETYPE_FLY);

    new Float:fMaxsSize[3] = {15.0, 15.0, 15.0};
    new Float:fMinSize[3] = {-15.0, -15.0, -15.0};
    entity_set_size(entBall, fMinSize, fMaxsSize);

    set_pev(entBall, pev_owner, idUser);

    static Float:fVelocity[3];
    VelocityByAim(entBall, random_num(250, 1000), fVelocity);
    set_pev(entBall, pev_light_level, 180);
    set_pev(entBall, pev_rendermode, kRenderTransAdd);
    set_pev(entBall, pev_renderamt, 255.0);
    entity_set_vector(entBall, EV_VEC_velocity, fVelocity);

    clRacePriest::fBurning(entBall, 0.5);
}

public clRacePriest::fStopUlt(idUser)//ќстановка работающей ульты ∆реца
{
    if (idUser >= clRacePriest::tID_REMOVE_ATTACK)
        idUser -= clRacePriest::tID_REMOVE_ATTACK;

    remove_task(idUser + clRacePriest::tID_FIRE_ATTACK);
}

public clRacePriest::fBurning(entBall, Float:fSize)
{
    static entEnvSprite;
    entEnvSprite = create_entity("env_sprite");
    set_pev(entEnvSprite, pev_takedamage, 0.0);
    set_pev(entEnvSprite, pev_solid, SOLID_NOT);
    set_pev(entEnvSprite, pev_movetype, MOVETYPE_NONE);
    set_pev(entEnvSprite, pev_classname, "_entBallFire");
    engfunc(EngFunc_SetModel, entEnvSprite, arrStrSprites[SPR_FLAME_PRIEST]);
    set_pev(entEnvSprite, pev_rendermode, kRenderTransAdd);
    set_pev(entEnvSprite, pev_renderamt, 255.0);
    set_pev(entEnvSprite, pev_light_level, 180);
    set_pev(entEnvSprite, pev_scale, fSize);
    set_pev(entEnvSprite, pev_owner, entBall);
    set_pev(entEnvSprite, pev_animtime, get_gametime());
    set_pev(entEnvSprite, pev_framerate, 8.0);
    set_pev(entEnvSprite, pev_frame, 0.1);
    set_pev(entEnvSprite, pev_spawnflags, SF_SPRITE_STARTON);
    dllfunc(DLLFunc_Spawn, entEnvSprite);

    thinkBallFire(entEnvSprite);
    set_pev(entEnvSprite, pev_nextthink, get_gametime() + 0.01);

    return entEnvSprite;
}

public thinkBallFire(entBallFire)
{
    if(!pev_valid(entBallFire))
        return;

    if(!pev_valid(pev(entBallFire, pev_owner)))
    {
        remove_entity(entBallFire);
        return;
    }
    static idOwner;
    idOwner = pev(entBallFire, pev_owner);
    static Float:ptOrigin[3];

    pev(idOwner, pev_origin, ptOrigin);
    ptOrigin[2] += 25.0;
    entity_set_origin(entBallFire, ptOrigin);
    set_pev(entBallFire, pev_nextthink, get_gametime() + 0.01);

}

public touchBallFire(entBallFire, idUserTouch)
{
    if(!pev_valid(entBallFire))
        return;

    static Float:ptOrigin[3]
    pev(entBallFire, pev_origin, ptOrigin);

    new idOwner = pev(entBallFire, pev_owner);

    message_begin(MSG_BROADCAST ,SVC_TEMPENTITY);
    write_byte(TE_EXPLOSION);
    engfunc(EngFunc_WriteCoord, ptOrigin[0]);
    engfunc(EngFunc_WriteCoord, ptOrigin[1]);
    engfunc(EngFunc_WriteCoord, ptOrigin[2]);
    write_short(arrIdSprites[SPR_ZEXPLODE_PRIEST]);
    write_byte(10);
    write_byte(30);
    write_byte(4);
    message_end();

    emit_sound(entBallFire,CHAN_STATIC, arrStrSounds[SOUND_FIREBALL_EXP_PRIEST], 0.07, ATTN_NORM,SND_CHANGE_VOL, PITCH_NORM);

    new arrPlayers[32], iNumPlayers;
    get_players(arrPlayers, iNumPlayers, "a" );

    new iTargetID;
    new iTeam = get_user_team( idOwner );

    for(new i = 0; i < iNumPlayers; i++)
    {
        iTargetID = arrPlayers[i];

        if(is_user_alive(iTargetID))
        {
            new Float:ptOriginTarget[3], Float:fDistance;
            pev(iTargetID, pev_origin, ptOriginTarget);
            fDistance = get_distance_f(ptOrigin, ptOriginTarget);

            if(fDistance <= fBallExpRadius && iTeam != get_user_team(iTargetID))
            {
                clRacePriest::stShakeScreenPriest(iTargetID);

                WC3_Damage(iTargetID,idOwner,iWordDeathDmg,CSW_WORDDEATH, -1 );

                clRacePriest::stScreenFadePriest(iTargetID, 3, {255, 0, 0}, 120);

            }
        }

 
    }

    remove_entity(entBallFire);
}

stock clRacePriest::stScreenFadePriest(idUser, Timer, Colors[3], Alpha)
{
    message_begin(MSG_ONE_UNRELIABLE,gmsgScreenFade,_, idUser);
    write_short((1<<12) * Timer);
    write_short(1<<12);
    write_short(0);
    write_byte(Colors[0]);
    write_byte(Colors[1]);
    write_byte(Colors[2]);
    write_byte(Alpha);
    message_end();
}
stock clRacePriest::stShakeScreenPriest(idUser)
{
    message_begin(MSG_ONE_UNRELIABLE,gmsgScreenShake,{0,0,0}, idUser);
    write_short(1<<14);
    write_short(1<<13);
    write_short(1<<13);
    message_end();
}
Код:
/*
*    Race: Priest (∆рец) Functions
*/

//»нициализаци¤ скилов Race: Priest (∆рец)
public clRacePriest::setPriestSkillsInit()//добавлена в skill_manager.cpp ( SM_Init() )
{
    // Set up the Skill Owners
    g_SkillOwner[SKILL_PRIEST_ENTRYINTOCHASM                ]    = RACE_PRIEST;
    g_SkillOwner[SKILL_PRIEST_SACRED_FIRE                    ]    = RACE_PRIEST;
    g_SkillOwner[SKILL_PRIEST_SPIRITUAL_ACCURACY            ]    = RACE_PRIEST;
    g_SkillOwner[ULTIMATE_PRIEST_DARKNESS_WORD_DEATH        ]    = RACE_PRIEST;
    g_SkillOwner[PASS_PRIEST_MYSTICISM                        ]    = RACE_PRIEST;

    // Set up the skill types
    g_SkillType[SKILL_PRIEST_ENTRYINTOCHASM                    ]    = SKILL_TYPE_TRAINABLE;
    g_SkillType[SKILL_PRIEST_SACRED_FIRE                    ]    = SKILL_TYPE_TRAINABLE;
    g_SkillType[SKILL_PRIEST_SPIRITUAL_ACCURACY                ]    = SKILL_TYPE_TRAINABLE;
    g_SkillType[ULTIMATE_PRIEST_DARKNESS_WORD_DEATH            ]    = SKILL_TYPE_ULTIMATE;
    g_SkillType[PASS_PRIEST_MYSTICISM                        ]    = SKILL_TYPE_PASSIVE;

    // Set up the skill order
    g_SkillOrder[SKILL_PRIEST_ENTRYINTOCHASM                ]    = SKILL_POS_1;
    g_SkillOrder[SKILL_PRIEST_SACRED_FIRE                    ]    = SKILL_POS_2;
    g_SkillOrder[SKILL_PRIEST_SPIRITUAL_ACCURACY            ]    = SKILL_POS_3;
    g_SkillOrder[ULTIMATE_PRIEST_DARKNESS_WORD_DEATH        ]    = SKILL_POS_4;
    g_SkillOrder[PASS_PRIEST_MYSTICISM                        ]    = SKILL_POS_NONE;

}



// *******************************************************
// —кил 1 уровн¤ - Entry into a chasm - ¬хождение в бездну - защитный
// *******************************************************
public clRacePriest::skillEntryInChasm(idVictim,idAttacker)
{
    if (!is_user_alive( idAttacker ) && !arrBoolData[idAttacker][PB_ISCONNECTED])
        return;

    new iSkillLevel = SM_GetSkillLevel(idAttacker, SKILL_PRIEST_ENTRYINTOCHASM);
    if(iSkillLevel > 0)
    {
        if(isDisabledSkillsOnMap(idAttacker,SKILL_PRIEST_ENTRYINTOCHASM) == true)
            return;

        new Float:fEntryintochasm = ArrayGetCell(arrEntryintochasm,iSkillLevel-1);
        if (!arrBoolData[idAttacker][PB_HEXED] &&
            random_float(fPriestSkill1MinPercent,fPriestSkill1MaxPercent) <= fEntryintochasm &&
            arrBoolData[idAttacker][PB_ISFROZENSKILL] == false)
        {
            if(get_user_team(idVictim) != get_user_team(idAttacker) )
            {
                new iAttackerCurHealth = clHP:getUserHealth(idAttacker);
                new iVictimCurHealth = clHP:getUserHealth(idVictim);

                if(iVictimCurHealth > iAttackerCurHealth)
                {
                    clHP:setUserHealth(idAttacker,iVictimCurHealth);
                    clHP:setUserHealth(idVictim,iAttackerCurHealth);
                }
            }
     
        }
    }
}
// *******************************************************
// —кил 2 уровн¤ - Sacred fire - —в¤щенный огонь - наступательный
// *******************************************************
public fwHamWeapPriAttack(idWeapon)
{
    if (!pev_valid(idWeapon))
        return HAM_IGNORED;

    static idOwner;
    idOwner = pev(idWeapon, pev_owner)

    if (!is_user_alive( idOwner ) && !arrBoolData[idOwner][PB_ISCONNECTED])
        return HAM_IGNORED;

    if (fm_get_weaponid(idWeapon) == CSW_KNIFE)
        return HAM_IGNORED;

    if (fm_get_weapon_ammo(idWeapon) > 0 && arrFireWeapon[idOwner] > 0 && arrIsWorkFireWeapon[idOwner] == true)
    {
        arrFireWeapon[idOwner] -= 1;
        arrIsWorkFireWeapon[idOwner] = false;
    }

    return HAM_IGNORED;
}

public fwHamTraceAttackPriest(idVictim, idAttacker, Float:fDamage, Float:fDirection[3], tracehandle, damage_type)
{
    //client_print(idAttacker,print_chat,"FA: %d",arrFireWeapon[idAttacker]);

    if (!is_user_alive( idAttacker ))
        return HAM_HANDLED;

    if (!is_user_alive( idVictim ))
        return HAM_HANDLED;

    if (!is_user_alive( idAttacker ) && !arrBoolData[idAttacker][PB_ISCONNECTED])
        return HAM_HANDLED;

    if (!is_user_alive( idVictim ) && !arrBoolData[idVictim][PB_ISCONNECTED])
        return HAM_HANDLED;


    if ((get_user_weapon(idAttacker) == CSW_KNIFE))
        return HAM_IGNORED;

    if ( (idVictim == idAttacker) || !is_user_connected(idAttacker) ||
         (get_user_team(idVictim) == get_user_team(idAttacker))
       )
        return HAM_HANDLED;

    if(arrIsEffectBubble[idAttacker] == true)
        clRacePriest::stBubbles(idAttacker);

    new iSkillLevel = SM_GetSkillLevel(idVictim, SKILL_PRIEST_SPIRITUAL_ACCURACY);
    if (iSkillLevel > 0 && isDisabledSkillsOnMap(idVictim,SKILL_PRIEST_SPIRITUAL_ACCURACY) == false)
    {
        new Float:fSpiritual = ArrayGetCell(arrSpiritualAccuracy,iSkillLevel-1);
        if (is_user_alive( idVictim ) && arrBoolData[idVictim][PB_ISCONNECTED]&&
                random_float(fPriestSkill3MinPercent,fPriestSkill3MaxPercent) <= fSpiritual &&
                arrBoolData[idAttacker][PB_ISFROZENSKILL] == false &&
                arrIsEffectBubble[idAttacker] == false)
        {
            clRacePriest::skillSpAccuracy(idVictim,idAttacker);
        }
    }

    if (!arrFireWeapon[idAttacker])
        return HAM_HANDLED;

    if (!(damage_type & DMG_BULLET))
        return HAM_HANDLED;

    iSkillLevel = SM_GetSkillLevel(idAttacker, SKILL_PRIEST_SACRED_FIRE);
    if (iSkillLevel > 0 && isDisabledSkillsOnMap(idAttacker,SKILL_PRIEST_SACRED_FIRE) == false)
    {
        new Float:fSacredfire = ArrayGetCell(arrSacredFire,iSkillLevel-1);
        if (is_user_alive( idAttacker ) && arrBoolData[idAttacker][PB_ISCONNECTED]&&
                random_float(fPriestSkill2MinPercent,fPriestSkill2MaxPercent) <= fSacredfire     &&
                arrBoolData[idAttacker][PB_ISFROZENSKILL] == false)
        {

            fStartFire(idVictim, idAttacker);
            arrIsWorkFireWeapon[idAttacker] = true;
        }
    }


    return HAM_IGNORED;
}

fStartFire(idVictim, idAttacker)
{
    static params[3];
    params[0] = floatround(fFireDuration * 5.0); // duration
    params[1] = idAttacker; // attacker
    params[2] = idVictim + clRacePriest::tID_SACRED_FIRE;

    if (task_exists(idVictim + clRacePriest::tID_SACRED_FIRE ))
        return;

    set_task(0.2, "fBurningFlame",params[2], params, sizeof params);


}

public fBurningFlame(args[3])
{
    //client_print(0,print_chat,"fBurningFlame");

    new idUser = args[2];
    if (args[2] >= clRacePriest::tID_SACRED_FIRE )
        idUser -= clRacePriest::tID_SACRED_FIRE;

    if (!is_user_alive(idUser))
        return;

    static Float:originF[3]
    pev(idUser, pev_origin, originF)

    if ((pev(idUser, pev_flags) & FL_INWATER) || FLAME_DURATION < 1)
    {
        // Smoke sprite
        engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0);
        write_byte(TE_SMOKE); // TE id
        engfunc(EngFunc_WriteCoord, originF[0]); // x
        engfunc(EngFunc_WriteCoord, originF[1]); // y
        engfunc(EngFunc_WriteCoord, originF[2]-50.0); // z
        write_short(arrIdSprites[SPR_SMOKE_PRIEST]); // sprite
        write_byte(random_num(15, 20)); // scale
        write_byte(random_num(10, 20)); // framerate
        message_end()
 
        return;
    }

    if ((pev(idUser, pev_flags) & FL_ONGROUND) && fFireSlowdown > 0.0)
    {
        static Float:velocity[3];
        pev(idUser, pev_velocity, velocity);
        xs_vec_mul_scalar(velocity, fFireSlowdown, velocity);
        set_pev(idUser, pev_velocity, velocity);
    }

    new health = clHP:getUserHealth(idUser);

    if (health > fFireDamage)
        clHP:setUserHealth(idUser,health - floatround(fFireDamage));
    else
        ExecuteHamB(Ham_Killed, idUser, FLAME_ATTACKER, 0);

    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0);
    write_byte(TE_SPRITE); // TE id
    engfunc(EngFunc_WriteCoord, originF[0]+random_float(-5.0, 5.0)); // x
    engfunc(EngFunc_WriteCoord, originF[1]+random_float(-5.0, 5.0)); // y
    engfunc(EngFunc_WriteCoord, originF[2]+random_float(-10.0, 10.0)); // z
    write_short(arrIdSprites[SPR_FIRE_PRIEST]); // sprite
    write_byte(random_num(5, 10)); // scale
    write_byte(200); // brightness
    message_end();

    // Decrease burning duration counter
    FLAME_DURATION -= 1;

    new Float:firl_time
    if (0.2 > fFireDuration)
        firl_time = fFireDuration - 0.1;
    else
        firl_time = 0.2;

    set_task(firl_time, "fBurningFlame", args[2], args, sizeof args);
}

// *******************************************************
// —кил 3 уровн¤ - ƒуховна¤ меткость - Spiritual accuracy - защитный
// *******************************************************
public clRacePriest::skillSpAccuracy(idVictim,idAttacker)
{
    if(!arrBoolData[idAttacker][PB_ISCONNECTED])
        return 0;

    clRacePriest::stBubbles(idAttacker);

    if (task_exists(idAttacker + clRacePriest::tID_SP_ACCURACY ) == 0 )
    {
        set_user_hitzones(idAttacker, 0, 0); //ƒелаем холостые выстрелы

        arrIsEffectBubble[idAttacker] = true;

        set_task(0.7, "_setTaskResetSPA", clRacePriest::tID_SP_ACCURACY + idAttacker );
    }

    return 0;
}

public clRacePriest::setTaskResetSPA(idAttacker)
{
    if (idAttacker >= clRacePriest::tID_SP_ACCURACY )
        idAttacker -= clRacePriest::tID_SP_ACCURACY;

    if(!arrBoolData[idAttacker][PB_ISCONNECTED])
        return;

    set_user_hitzones(idAttacker, 0, 255);    // ¬осстанавливаем нормальный режим стрельбы
    arrIsEffectBubble[idAttacker] = false;
}

stock clRacePriest::stBubbles(idAttacker)
{
    new ptPlayerOrigin[3], ptBulletOrigin[3];
    get_user_origin(idAttacker, ptPlayerOrigin, 1);
    get_user_origin(idAttacker, ptBulletOrigin, 4);

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY, ptBulletOrigin);
    write_byte(114);
    write_coord(ptPlayerOrigin[0]);
    write_coord(ptPlayerOrigin[1]);
    write_coord(ptPlayerOrigin[2]);
    write_coord(ptBulletOrigin[0]);
    write_coord(ptBulletOrigin[1]);
    write_coord(ptBulletOrigin[2]);
    write_coord(40);
    write_short(arrIdSprites[SPR_BUBBLE_PRIEST]);
    write_byte(10);
    write_coord(40);
    message_end();
}


// *******************************************************
// —упер навык - —лово “ьмы - —мерть - Darkness word: Death
// *******************************************************
public clRacePriest::ultDarkWordDeath(idVictim)
{
    if ( !ULT_Available( idVictim ) )
        return;

    if ( arrBoolData[idVictim][PB_CHANGINGTEAM] )
        return;

    //Ѕлокировка супер навыка если у игрока ќжерелье {
    new Float:ptVictim[3]
    pev(idVictim, pev_origin, ptVictim);

    new arrPlayers[32], iNumPlayers;
    get_players(arrPlayers, iNumPlayers, "a" );

    new iTargetID;
    new iTeam = get_user_team( idVictim );

    for(new i = 0; i < iNumPlayers; i++)
    {
        iTargetID = arrPlayers[i];

        if(iTargetID == idVictim)
            continue;

        if(is_user_alive(iTargetID))
        {
            new Float:ptOriginTarget[3], Float:fDistance;
            pev(iTargetID, pev_origin, ptOriginTarget);
            fDistance = get_distance_f(ptVictim, ptOriginTarget);

            //client_print(idVictim,print_chat,"fDistance: %.1f",fDistance);

            if(fDistance <= fBlockUltRadius && iTeam != get_user_team(iTargetID))
            {
                if (ULT_CanUserBlockUlt(iTargetID,idVictim))
                {
                    ULT_RemoveCharge(iTargetID);

                    ULT_Blocked(idVictim);
             
                    fResetUltimateTimerDivider(idVictim);

                    return;
                }
            }
        }
    }
    //Ѕлокировка супер навыка если у игрока ќжерелье }

    set_pev(idVictim, pev_sequence, 12);
    set_pev(idVictim, pev_animtime, halflife_time());
    set_pev(idVictim, pev_framerate, 1.0);
    set_pev(idVictim, pev_movetype, MOVETYPE_NONE);

    new Float:ptOrigin[3];
    pev(idVictim, pev_origin, ptOrigin);
    clRacePriest::stGetPos(idVictim, 150.0, 0.0, 0.0, ptOrigin);

    emit_sound(idVictim,CHAN_STATIC, arrStrSounds[SOUND_FIREBALL_PRIEST], 0.5, ATTN_NORM,SND_CHANGE_VOL, PITCH_NORM);

    new taskParm[4]
    taskParm[0] = idVictim;
    taskParm[1] = floatround(ptOrigin[0]);
    taskParm[2] = floatround(ptOrigin[1]);
    taskParm[3] = floatround(ptOrigin[2]);

    set_task(0.5, "_fSetFireAttack", idVictim + clRacePriest::tID_FIRE_ATTACK, taskParm, 4 );
    set_task(3.0, "_fStopUlt", idVictim + clRacePriest::tID_REMOVE_ATTACK);

    fResetUltimateTimerDivider(idVictim);

}

public clRacePriest::fSetFireAttack(taskParm[4])
{
    new idVictim = taskParm[0];

    new Float:ptSkyOrigin[3];
    ptSkyOrigin[0] = float(taskParm[1]);
    ptSkyOrigin[1] = float(taskParm[2]);
    ptSkyOrigin[2] = float(taskParm[3]);

    new Float:ptExplosion[24][3], Float:ptBall[24][3]
    ptExplosion[0][0] = 200.0;
    ptExplosion[0][1] = 0.0;
    ptExplosion[0][2] = ptSkyOrigin[2];

    ptExplosion[1][0] = 400.0;
    ptExplosion[1][1] = 0.0;
    ptExplosion[1][2] = ptSkyOrigin[2];

    ptExplosion[2][0] = -200.0;
    ptExplosion[2][1] = 0.0;
    ptExplosion[2][2] = ptSkyOrigin[2];

    ptExplosion[3][0] = -400.0;
    ptExplosion[3][1] = 0.0;
    ptExplosion[3][2] = ptSkyOrigin[2];

    ptExplosion[4][0] = 0.0;
    ptExplosion[4][1] = 200.0;
    ptExplosion[4][2] = ptSkyOrigin[2];

    ptExplosion[5][0] = 0.0;
    ptExplosion[5][1] = 400.0;
    ptExplosion[5][2] = ptSkyOrigin[2];

    ptExplosion[6][0] = 0.0;
    ptExplosion[6][1] = -200.0;
    ptExplosion[6][2] = ptSkyOrigin[2];

    ptExplosion[7][0] = 0.0;
    ptExplosion[7][1] = -400.0;
    ptExplosion[7][2] = ptSkyOrigin[2];

    ptExplosion[8][0] = 200.0;
    ptExplosion[8][1] = 200.0;
    ptExplosion[8][2] = ptSkyOrigin[2];

    ptExplosion[9][0] = 400.0;
    ptExplosion[9][1] = 400.0;
    ptExplosion[9][2] = ptSkyOrigin[2];

    ptExplosion[10][0] = 200.0;
    ptExplosion[10][1] = 400.0;
    ptExplosion[10][2] = ptSkyOrigin[2];

    ptExplosion[11][0] = 400.0;
    ptExplosion[11][1] = 200.0;
    ptExplosion[11][2] = ptSkyOrigin[2];

    ptExplosion[12][0] = -200.0;
    ptExplosion[12][1] = 200.0;
    ptExplosion[12][2] = ptSkyOrigin[2];

    ptExplosion[13][0] = -400.0;
    ptExplosion[13][1] = 400.0;
    ptExplosion[13][2] = ptSkyOrigin[2];

    ptExplosion[14][0] = -200.0
    ptExplosion[14][1] = 400.0
    ptExplosion[14][2] = ptSkyOrigin[2];

    ptExplosion[15][0] = -400.0;
    ptExplosion[15][1] = 200.0;
    ptExplosion[15][2] = ptSkyOrigin[2];

    ptExplosion[16][0] = -200.0;
    ptExplosion[16][1] = -200.0;
    ptExplosion[17][2] = ptSkyOrigin[2];

    ptExplosion[17][0] = -200.0;
    ptExplosion[17][1] = -200.0;
    ptExplosion[17][2] = ptSkyOrigin[2];

    ptExplosion[18][0] = -200.0;
    ptExplosion[18][1] = -400.0;
    ptExplosion[18][2] = ptSkyOrigin[2];

    ptExplosion[19][0] = -400.0;
    ptExplosion[19][1] = -200.0;
    ptExplosion[19][2] = ptSkyOrigin[2];

    ptExplosion[20][0] = 200.0;
    ptExplosion[20][1] = -200.0;
    ptExplosion[20][2] = ptSkyOrigin[2];

    ptExplosion[21][0] = 400.0;
    ptExplosion[21][1] = -400.0;
    ptExplosion[21][2] = ptSkyOrigin[2];

    ptExplosion[22][0] = 200.0;
    ptExplosion[22][1] = -400.0;
    ptExplosion[22][2] = ptSkyOrigin[2];

    ptExplosion[23][0] = 400.0;
    ptExplosion[23][1] = -200.0;
    ptExplosion[23][2] = ptSkyOrigin[2];


    for(new i = 0; i < sizeof(ptExplosion); i++)
    {
        ptBall[i][0] = float(taskParm[1]);
        ptBall[i][1] = float(taskParm[2]);
        ptBall[i][2] = float(taskParm[3]);

        clRacePriest::stGetPos(idVictim, ptExplosion[i][0], ptExplosion[i][1], ptExplosion[i][2], ptBall[i])
        clRacePriest::fCreateFireball(idVictim, ptBall[i])
    }

    set_task(1.0, "_fSetFireAttack", idVictim + clRacePriest::tID_FIRE_ATTACK, taskParm, 4 );
}

stock clRacePriest::stGetPos(idUser, Float:fForward, Float:fRight, Float:fUp, Float:fVecStart[])
{
    new Float:fVecAngle[3], Float:fVecForward[3], Float:fVecRight[3], Float:fViewOfs[3];

    pev(idUser, pev_view_ofs,fViewOfs);
    xs_vec_add(fVecStart,fViewOfs,fVecStart)
    pev(idUser, pev_v_angle, fVecAngle);
    fVecAngle[0] = 0.0;
    angle_vector(fVecAngle,ANGLEVECTOR_FORWARD,fVecForward);
    angle_vector(fVecAngle,ANGLEVECTOR_RIGHT,fVecRight);
    angle_vector(fVecAngle,ANGLEVECTOR_UP,fViewOfs);
    fVecStart[0] = fVecStart[0] + fVecForward[0] * fForward + fVecRight[0] * fRight + fViewOfs[0] * fUp;
    fVecStart[1] = fVecStart[1] + fVecForward[1] * fForward + fVecRight[1] * fRight + fViewOfs[1] * fUp;
    fVecStart[2] = fVecStart[2] + fVecForward[2];
}

public clRacePriest::fCreateFireball(idUser, Float:ptOrigin[3])
{
    new entBall = create_entity("info_target");

    static Float:fAngles[3];
    pev(idUser, pev_angles, fAngles);

    entity_set_origin(entBall, ptOrigin);
    fAngles[0] = -100.0;
    entity_set_vector(entBall, EV_VEC_angles, fAngles);
    fAngles[0] = 100.0;
    entity_set_vector(entBall, EV_VEC_v_angle, fAngles);
    entity_set_string(entBall, EV_SZ_classname, "entBallFire");
    entity_set_model(entBall, arrStrModels[MDL_FIREBALL]);
    entity_set_int(entBall, EV_INT_solid, 2);
    entity_set_int(entBall, EV_INT_movetype, MOVETYPE_FLY);

    new Float:fMaxsSize[3] = {15.0, 15.0, 15.0};
    new Float:fMinSize[3] = {-15.0, -15.0, -15.0};
    entity_set_size(entBall, fMinSize, fMaxsSize);

    set_pev(entBall, pev_owner, idUser);

    static Float:fVelocity[3];
    VelocityByAim(entBall, random_num(250, 1000), fVelocity);
    set_pev(entBall, pev_light_level, 180);
    set_pev(entBall, pev_rendermode, kRenderTransAdd);
    set_pev(entBall, pev_renderamt, 255.0);
    entity_set_vector(entBall, EV_VEC_velocity, fVelocity);

    clRacePriest::fBurning(entBall, 0.5);
}

public clRacePriest::fStopUlt(idUser)//ќстановка работающей ульты ∆реца
{
    if (idUser >= clRacePriest::tID_REMOVE_ATTACK)
        idUser -= clRacePriest::tID_REMOVE_ATTACK;

    remove_task(idUser + clRacePriest::tID_FIRE_ATTACK);
}

public clRacePriest::fBurning(entBall, Float:fSize)
{
    static entEnvSprite;
    entEnvSprite = create_entity("env_sprite");
    set_pev(entEnvSprite, pev_takedamage, 0.0);
    set_pev(entEnvSprite, pev_solid, SOLID_NOT);
    set_pev(entEnvSprite, pev_movetype, MOVETYPE_NONE);
    set_pev(entEnvSprite, pev_classname, "_entBallFire");
    engfunc(EngFunc_SetModel, entEnvSprite, arrStrSprites[SPR_FLAME_PRIEST]);
    set_pev(entEnvSprite, pev_rendermode, kRenderTransAdd);
    set_pev(entEnvSprite, pev_renderamt, 255.0);
    set_pev(entEnvSprite, pev_light_level, 180);
    set_pev(entEnvSprite, pev_scale, fSize);
    set_pev(entEnvSprite, pev_owner, entBall);
    set_pev(entEnvSprite, pev_animtime, get_gametime());
    set_pev(entEnvSprite, pev_framerate, 8.0);
    set_pev(entEnvSprite, pev_frame, 0.1);
    set_pev(entEnvSprite, pev_spawnflags, SF_SPRITE_STARTON);
    dllfunc(DLLFunc_Spawn, entEnvSprite);

    thinkBallFire(entEnvSprite);
    set_pev(entEnvSprite, pev_nextthink, get_gametime() + 0.01);

    return entEnvSprite;
}

public thinkBallFire(entBallFire)
{
    if(!pev_valid(entBallFire))
        return;

    if(!pev_valid(pev(entBallFire, pev_owner)))
    {
        remove_entity(entBallFire);
        return;
    }
    static idOwner;
    idOwner = pev(entBallFire, pev_owner);
    static Float:ptOrigin[3];

    pev(idOwner, pev_origin, ptOrigin);
    ptOrigin[2] += 25.0;
    entity_set_origin(entBallFire, ptOrigin);
    set_pev(entBallFire, pev_nextthink, get_gametime() + 0.01);

}

public touchBallFire(entBallFire, idUserTouch)
{
    if(!pev_valid(entBallFire))
        return;

    static Float:ptOrigin[3]
    pev(entBallFire, pev_origin, ptOrigin);

    new idOwner = pev(entBallFire, pev_owner);

    message_begin(MSG_BROADCAST ,SVC_TEMPENTITY);
    write_byte(TE_EXPLOSION);
    engfunc(EngFunc_WriteCoord, ptOrigin[0]);
    engfunc(EngFunc_WriteCoord, ptOrigin[1]);
    engfunc(EngFunc_WriteCoord, ptOrigin[2]);
    write_short(arrIdSprites[SPR_ZEXPLODE_PRIEST]);
    write_byte(10);
    write_byte(30);
    write_byte(4);
    message_end();

    emit_sound(entBallFire,CHAN_STATIC, arrStrSounds[SOUND_FIREBALL_EXP_PRIEST], 0.07, ATTN_NORM,SND_CHANGE_VOL, PITCH_NORM);

    new arrPlayers[32], iNumPlayers;
    get_players(arrPlayers, iNumPlayers, "a" );

    new iTargetID;
    new iTeam = get_user_team( idOwner );

    for(new i = 0; i < iNumPlayers; i++)
    {
        iTargetID = arrPlayers[i];

        if(is_user_alive(iTargetID))
        {
            new Float:ptOriginTarget[3], Float:fDistance;
            pev(iTargetID, pev_origin, ptOriginTarget);
            fDistance = get_distance_f(ptOrigin, ptOriginTarget);

            if(fDistance <= fBallExpRadius && iTeam != get_user_team(iTargetID))
            {
                clRacePriest::stShakeScreenPriest(iTargetID);

                WC3_Damage(iTargetID,idOwner,iWordDeathDmg,CSW_WORDDEATH, -1 );

                clRacePriest::stScreenFadePriest(iTargetID, 3, {255, 0, 0}, 120);

            }
        }

 
    }

    remove_entity(entBallFire);
}

stock clRacePriest::stScreenFadePriest(idUser, Timer, Colors[3], Alpha)
{
    message_begin(MSG_ONE_UNRELIABLE,gmsgScreenFade,_, idUser);
    write_short((1<<12) * Timer);
    write_short(1<<12);
    write_short(0);
    write_byte(Colors[0]);
    write_byte(Colors[1]);
    write_byte(Colors[2]);
    write_byte(Alpha);
    message_end();
}
stock clRacePriest::stShakeScreenPriest(idUser)
{
    message_begin(MSG_ONE_UNRELIABLE,gmsgScreenShake,{0,0,0}, idUser);
    write_short(1<<14);
    write_short(1<<13);
    write_short(1<<13);
    message_end();
}
Код:
//-----------------Базовые функции------------------------------------BEGIN {
//Инициализация переменных
public fInitTalisman()//добавлена в war3ft.inl (public WC3_Init())
{
    fTimeSpawnTalismanGlobal = get_pcvar_float( CVAR_wc3_gl_time_spawn_talisman );

}

//Обнуление данных когда игрок подключается на сервер
public fPlayerInitTalisman(idUser) //добавлена в war3ft.inl ( WC3_PlayerInit(idUser) )
{
    arrTalismanActive[idUser] = TALISMAN_ITEM_NONE;
    arrTalismanChange[idUser] = TALISMAN_ITEM_NONE;
    arrTalismanNum[idUser] = 0;

    arrPlayerInitTalisman[idUser] = false;    //Загрузка всех талисманов когда игрок зашел на сервер и появилось меню выбора рас (грузится один раз)
    arrTalismanNecklaceNum[idUser] = 0;     // Массив игроков для количества зарядов иммунитета от ульты (Ожерелье)
    arrTalismanHelmNum[idUser] = 0;            // Массив игроков для количества зарядов  (Шлем)
}

//Присвоение данных при респе игрока
public fPostSpawnTalisman(idUser)//добавлена в war3ft.inl ( WC3_PostSpawn(idUser) )
{
    arrTalismanNecklaceNum[idUser] = TALISMAN_ITEM_NECKLACE_NUM;
    arrTalismanHelmNum[idUser] = TALISMAN_ITEM_HELM_NUM;
}

//Когда игрок умирает
public fTalismanUserDied(idUser)//добавлена в war3ft.inl ( public WC3_Death( idVictim, iKiller, iWeaponID, iHeadshot ) )
{
    if(arrTalismanNecklaceNum[idUser] > 0)
        arrTalismanNecklaceNum[idUser] = 0;

    if(arrTalismanHelmNum[idUser] > 0)
        arrTalismanHelmNum[idUser] = 0;
}

//Удаление зарядов
public fTalismanRemoveCharge(idUser, iItem)//добавлена в items.inl ( ITEM_RemoveCharge( idUser, iItem ) )
{
    switch(iItem)
    {
        case ITEM_NECKLACE:
        {
            //Ожерелье
            if (arrTalismanNecklaceNum[idUser] > 0 && ITEM_Has( idUser, ITEM_NECKLACE ) == ITEM_NONE)
            {
                arrTalismanNecklaceNum[idUser] -= CHARGE_DISPOSE;

                if (arrTalismanNecklaceNum[idUser] <= 0 )
                    arrTalismanNecklaceNum[idUser] = 0;
            }
        }

        case ITEM_HELM:
        {
            //Шлем
            if (arrTalismanHelmNum[idUser] > 0 && ITEM_Has( idUser, ITEM_HELM ) == ITEM_NONE)
            {
                arrTalismanHelmNum[idUser] -= CHARGE_DISPOSE;

                if (arrTalismanHelmNum[idUser] <= 0 )
                    arrTalismanHelmNum[idUser] = 0;
            }
        }
    }
}


//Выводит кто подобрал талисман и какой для всех игроков кроме подобравшего
public fPrintChatTalismanFound(idUserPickUp,szItemName[])
{
    new szPlayerTouchName[32]
    get_user_name(idUserPickUp, szPlayerTouchName, charsmax(szPlayerTouchName));
    formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_PICKUP",szPlayerTouchName,szItemName);

    new arrPlayers[32], iNumPlayers;
    get_players( arrPlayers, iNumPlayers );
    for (new i = 0; i < iNumPlayers; i++ )
    {
        new idPlayer = arrPlayers[i];
 
        if(idPlayer == idUserPickUp)
            continue;

    ChatColor(idPlayer,"%s%s",fTagWar3ft(),szMessage);
    }

    //Лог кто подобрал и какой талисман
    fTalismanPlayerPickUpLog(idUserPickUp,szItemName);
}

//Считывание всех талисманов игроков из базы данных на выбор рас
public fTalismanInit(idUser)
{
    arrTalismanActive[idUser] = TALISMAN_ITEM_NONE;
    arrTalismanChange[idUser] = TALISMAN_ITEM_NONE;
    arrTalismanNum[idUser] = 0;

    if(MAX_MODE_TALISMAN == 1)
    {
        for(new i = 0; i < MAX_TALISMANS; i++)
            arrListTalisman[idUser][i] = TALISMAN_ITEM_NONE;

        //Считываем из базы данных все талисманы игрока
        DB_GetAllTalisman(idUser);
    }
    else
    {
        //Присвоение всех талисманов игроку
        for(new i = 0; i < MAX_TALISMANS; i++)
            arrListTalisman[idUser][i] = LIST_TALISMANS[i];
    }
}

//Считывание файла респаунов талисмана для конкретной карты
fReadMapSpawnsTalisman()//добавлена в war3ft.inl (public WC3_Init())
{
    new szMap[32], szConfig[32],  szMapFile[256];

    get_mapname(szMap, charsmax(szMap));
    get_configsdir(szConfig, charsmax(szConfig));
    format(szMapFile, charsmax(szMapFile), "%s\war3ft\talisman\%s.talisman_spawns.cfg",szConfig, szMap);

    iTotalSpawnsTalisman = 0;

    if (file_exists(szMapFile))
    {
        new szDataFile[124];
        new    iLength;
        new iLine = 0;
        new szPos[4][8];
     
        while(iTotalSpawnsTalisman < MAX_SPAWNS_TALISMAN && (iLine = read_file(szMapFile , iLine , szDataFile ,charsmax(szDataFile), iLength) ) != 0 )
        {
            if (strlen(szDataFile) < 2) continue;

            parse(szDataFile, szPos[1], 7, szPos[2], 7, szPos[3], 7);
     
            //Координаты
            arrSpawnOrigin[iTotalSpawnsTalisman][0] = str_to_num(szPos[1]);
            arrSpawnOrigin[iTotalSpawnsTalisman][1] = str_to_num(szPos[2]);
            arrSpawnOrigin[iTotalSpawnsTalisman][2] = str_to_num(szPos[3]);
             
            iTotalSpawnsTalisman++;
        }
    }

    log_amx("Total Spawns Talisman: %d | Map: %s",iTotalSpawnsTalisman,szMap);
}

//Отсчет времени каждую секунду
public taskCounterLoopTalisman()//добавлена в ultimates.cpp ( public _ULT_Delay() )
{
    if(MAX_MODE_TALISMAN != 1)
        return;

    if(iTotalSpawnsTalisman <= 0)//Если нет респаунов для талисмана
        return;

    //Если талисман не подобрали
    if(bIsPickUpTalisman == true)
        return;

    new iNumPlayers = get_playersnum();
    if (iNumPlayers < get_pcvar_num( CVAR_wc3_pl_talisman_respawn ) )
        return;

//    fTimeSpawnTalismanGlobal += TIME_TASK_SPAWN_TALISMAN;
    fTimeSpawnTalismanGlobal += 1.0;
    set_pcvar_float(CVAR_wc3_gl_time_spawn_talisman,fTimeSpawnTalismanGlobal);

    //client_print(0,print_chat,"TimeSoawnTalismanGlobal: %f",fTimeSpawnTalismanGlobal);

    if(fTimeSpawnTalismanGlobal >= TIME_SPAWN_TALISMAN)
    {
        fTimeSpawnTalismanGlobal = 0.0;
        set_pcvar_float(CVAR_wc3_gl_time_spawn_talisman,fTimeSpawnTalismanGlobal);

        fCreateTalisman();
    }
}

//Создание модели талисмана
public fCreateTalisman()
{
    if(MAX_MODE_TALISMAN != 1)
        return -1;

    entTalisman = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));

    if(!pev_valid(entTalisman))
        return -1;

    new iSelectPoint = random_num(0,iTotalSpawnsTalisman-1);

    new Float:origin[3];
    //arrSpawnOrigin[iSelectPoint][2] -= 15;
    IVecFVec(arrSpawnOrigin[iSelectPoint],origin);//перевод целого вектора в float

    set_pev(entTalisman, pev_classname, szClassNameTalisman);
    set_pev(entTalisman, pev_nextthink, get_gametime() + 5.0);
    set_pev(entTalisman, pev_solid, SOLID_TRIGGER);
//    set_pev(entTalisman, pev_solid, SOLID_SLIDEBOX);
    set_pev(entTalisman, pev_movetype, MOVETYPE_FLY);
//    set_pev(entTalisman,pev_movetype,MOVETYPE_NOCLIP);
    set_pev(entTalisman, pev_sequence, 1);
//    set_pev(entTalisman, pev_flags, pev(entTalisman, pev_flags) & FL_ONGROUND);
    set_pev(entTalisman, pev_frame, 0);
    //set_pev(entTalisman, pev_gravity, 0.5);
    //set_pev(entTalisman, pev_friction, 0.0);
    set_pev(entTalisman,pev_velocity,Float:{0.0,0.0,0.0});
    engfunc(EngFunc_SetModel, entTalisman, arrStrModels[MDL_FUN_SUPPLYBOX]);

    origin[2] -= 25;
    set_pev(entTalisman, pev_origin, origin);

    emit_sound(entTalisman, CHAN_VOICE, arrStrSounds[SOUND_REINCARNATION], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

    //Запись логов
    fTalismanLog(arrSpawnOrigin[iSelectPoint][0],arrSpawnOrigin[iSelectPoint][1],arrSpawnOrigin[iSelectPoint][2]);

    //Сообщение о респауне нового талисмана
    new szShowMsgTalisman[256];
    format(szShowMsgTalisman, charsmax(szShowMsgTalisman), "%L",LANG_PLAYER,"WC3_MSG_RESPAWN_TALISMAN");
    set_dhudmessage(119, 136, 153, -1.0, -1.0, 2, 1.0, 2.0, 0.01, 0.01, -1);
    show_dhudmessage(0, szShowMsgTalisman);

    cssbChatColor(0,"%s%s",fTagWar3ft(),szShowMsgTalisman);

    bIsPickUpTalisman = true;

    return -1;
}
//Вращение талисмана
//register_think("war3ft_talisman", "Talisman_Think");
public Talisman_Think(const entTalismanThink)//добавлена в cssbWar3ftMod.sma
{
    if(!pev_valid(entTalismanThink))
        return;

    static Float:floatvector[3];
    floatvector[0] = 0.0;
    floatvector[1] = 25.0;
    floatvector[2] = 0.0;

    set_pev(entTalismanThink,pev_avelocity,floatvector);//Задает скорость вращения вокруг своей оси
    set_pev(entTalismanThink, pev_nextthink, get_gametime() + 5.0);
}
//Когда игрок прикасается к талисману
public touchPlayerTalisman(idEntityTouched, idUserTouch)//добавлена в loot.inl (public player_Touch(idEntityTouched, idUserTouch))
{

    if (!pev_valid(idEntityTouched) || !is_user_alive(idUserTouch))
        return FMRES_IGNORED;

    new classname[32];
    pev(idEntityTouched, pev_classname, classname, sizeof classname - 1);

    if (equali(classname, "war3ft_talisman"))
    {
        //Достигнут максимум найденных талисманов 25
        if(arrTalismanNum[idUserTouch] >= MAX_TALISMANS)
        {
            formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_MAX_TALISMANS",MAX_TALISMANS);
            fShowSyncMessageRandomColor(idUserTouch,szMessage,0,0.05, 0.45);

            arrTalismanNum[idUserTouch] = MAX_TALISMANS;

            return FMRES_IGNORED;
        }
 
        //Генерация выбора талика
        new iSelect = random_num(0,MAX_TALISMANS-1);

        if(!bIsPlayerPresenceTalisman(idUserTouch,LIST_TALISMANS[iSelect]))//Если нет в наличии талисмана
        {
            if (is_valid_ent(idEntityTouched))
                engfunc(EngFunc_RemoveEntity, idEntityTouched);

            entTalisman = 0;
            bIsPickUpTalisman = false;

            arrListTalisman[idUserTouch][iSelect] = LIST_TALISMANS[iSelect];

            new szItemName[32];
            LANG_GetItemName(LIST_TALISMANS[iSelect], idUserTouch, szItemName, 31, true );

            formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_FOUND",szItemName);
            cssbChatColor(idUserTouch,"%s%s",fTagWar3ft(),szMessage);

            fPrintChatTalismanFound(idUserTouch,szItemName);

            arrTalismanNum[idUserTouch]++;

            //Отображаем меню с талисманами при подборе
            fShowMenuTalismans(idUserTouch);
        }
        else //Если есть такой талисман
        {    
            new iNewTalisman = TALISMAN_ITEM_NONE;
            //Поиск талисмана которого нет у игрока
            for(new i = 0; i < MAX_TALISMANS; i++)
            {
                if(arrListTalisman[idUserTouch][i] == TALISMAN_ITEM_NONE)
                {
                    iNewTalisman = LIST_TALISMANS[i];
                    arrListTalisman[idUserTouch][i] = iNewTalisman;
                    break;
                }
            }

            if(iNewTalisman != TALISMAN_ITEM_NONE)
            {
                if (is_valid_ent(idEntityTouched))
                    engfunc(EngFunc_RemoveEntity, idEntityTouched);

                entTalisman = 0;
                bIsPickUpTalisman = false;

                new szItemName[32];
                LANG_GetItemName(iNewTalisman, idUserTouch, szItemName, 31, true );

                formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_FOUND",szItemName);
                cssbChatColor(idUserTouch,"%s%s",fTagWar3ft(),szMessage);

                fPrintChatTalismanFound(idUserTouch,szItemName);

                arrTalismanNum[idUserTouch]++;

                //Отображаем меню с талисманами при подборе
                fShowMenuTalismans(idUserTouch);
            }

        }

    }

    return FMRES_IGNORED;
}

//Проверка на наличие талисмана у игрока
bool:bIsPlayerPresenceTalisman(idUser,iTalismanValue)
{
    for(new i = 0; i < MAX_TALISMANS; i++)
    {
        if(arrListTalisman[idUser][i] == iTalismanValue)
            return true;
    }

    return false;
}

// Функция проверяющая доступ к меню талисманов
public fVipTalisman()
{
    new szFlags[24];
    get_pcvar_string(CVAR_wc3_talisman_flag, szFlags, 23 );

    return ( read_flags( szFlags ) );
}

//Проверка на существование талисмана
bool:bIsTalisman(iTalismanValue)
{
    for(new i = 0; i < MAX_TALISMANS; i++)
    {
        if(LIST_TALISMANS[i] == iTalismanValue)
            return true;
    }

    return false;
}
//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Базовые функции-----------------------------------------------END }


//-----------------Функции меню-----------------------BEGIN {
//Вызов отображения меню
fShowMenuTalismans(idUser)
{

    if(MAX_MODE_TALISMAN == 1 && arrTalismanNum[idUser] == 0)
    {
        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_NO");
        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);
        return;
    }

    if(MAX_MODE_TALISMAN == 3)
    {
        if(!(get_user_flags(idUser) & fVipTalisman()))
        {
            formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_VIP");
            cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);
            return;
        }
    }

    new iNumPlayers = get_playersnum();
    if (iNumPlayers < get_pcvar_num( CVAR_wc3_pl_talisman_activate ) )
    {
        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_MAX_PL_ACTIVATE",get_pcvar_num( CVAR_wc3_pl_talisman_activate ));
        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);
        return;
    }

    //Присвоение всех талисманов игроку если у игрока максимальное количество талисманов
    if(arrTalismanNum[idUser] >= MAX_TALISMANS)
    {
        for(new i = 0; i < MAX_TALISMANS; i++)
            arrListTalisman[idUser][i] = LIST_TALISMANS[i];
    }

    new idMenu,szBuffer[64],szMenuData[256],szTalismanData[256];

    //Название главного меню
    formatex(szMenuData, charsmax(szMenuData), "\y%L", LANG_PLAYER, "MENU_TALISMAN_MENU_NAME");
    idMenu = menu_create(szMenuData, "_Callback_MENU_Talisman");

    // Добавление пунктов в меню
    for(new i = 0; i < MAX_TALISMANS; i++)
    {
        if(arrListTalisman[idUser][i] == TALISMAN_ITEM_NONE)
            continue;

        new szItemName[32];
        LANG_GetItemName(arrListTalisman[idUser][i], idUser, szItemName, 31, true );
 
        formatex(szTalismanData, charsmax(szTalismanData), "%L '\y%s'",LANG_PLAYER,"WC3_KEY_TALISMAN", szItemName);
        formatex(szBuffer, charsmax(szBuffer), "%d", arrListTalisman[idUser][i]);

        menu_additem(idMenu,szTalismanData, szBuffer,0,-1);
    }

    // Если нет предметов в меню
    if (menu_items(idMenu) <= 0)
    {
        menu_destroy(idMenu);
        return;
    }
     
    //Пункты меню (назад - следующий - выход)
    formatex(szMenuData, charsmax(szMenuData), "\d%L", LANG_PLAYER, "WC3_MENU_BACK");
    menu_setprop(idMenu, MPROP_BACKNAME, szMenuData);
    formatex(szMenuData, charsmax(szMenuData), "\d%L", LANG_PLAYER, "WC3_MENU_NEXT");
    menu_setprop(idMenu, MPROP_NEXTNAME, szMenuData);
    formatex(szMenuData, charsmax(szMenuData), "\d%L", LANG_PLAYER, "WC3_MENU_EXIT");
    menu_setprop(idMenu, MPROP_EXITNAME, szMenuData);

    menu_display(idUser, idMenu);

}


//Функция выбора пунктов в меню выбора
public _Callback_MENU_Talisman(idUser, idMenu, idItem)
{
    if ( !WC3_Check() )
        return PLUGIN_HANDLED;

    // Меню будет закрыто
    if (idItem == MENU_EXIT)
    {
        menu_destroy(idMenu);
        return PLUGIN_HANDLED;
    }

    static _access, szInfoMenu[8], callback;
    menu_item_getinfo(idMenu, idItem, _access, szInfoMenu, sizeof(szInfoMenu) - 1, _, _, callback);

    new iNumberTalisman = str_to_num(szInfoMenu);
//    client_print(0,print_chat,"iNumberTalisman: %d |idItem: %d",iNumberTalisman,idItem);

    //Заблокирован ли талисман на карте
    new szItemName[32];
    if(isDisabledItemOnMap(idUser,iNumberTalisman,szItemName) == true)
    {
        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_DISABLED_ON_MAP",szItemName);
        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);

        menu_destroy(idMenu);
        return PLUGIN_HANDLED
    }

    //Заблокирован ли предмет для Расы
    if(isDisabledItemRace(idUser,iNumberTalisman,szItemName) == true)
    {
        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_ITEM_BLOCK",szItemName);
        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);

        menu_destroy(idMenu);
        return PLUGIN_HANDLED;
    }



    //Если заблокировано или активно shopmenu 4
    if(get_pcvar_num(CVAR_wc3_shopmenu4) > 0)
    {
        if( get_pcvar_num(CVAR_wc3_shopmenu4_vip ) > 0 &&
           !(get_user_flags(idUser) & fVipShop4()) &&
            iNumberTalisman >= 27)
        {
            formatex(szMessage, charsmax(szMessage), "%L - !t%L!",LANG_PLAYER,"MOTD_TITLE_SHOPMENU4",LANG_PLAYER,"CLIENT_PRINT_OFF");
            cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);

            menu_destroy(idMenu);
            return PLUGIN_HANDLED;
        }    
    }
    else
    {
        if(iNumberTalisman >= 27)
        {
            formatex(szMessage, charsmax(szMessage), "%L - !t%L!",LANG_PLAYER,"MOTD_TITLE_SHOPMENU4",LANG_PLAYER,"CLIENT_PRINT_OFF");
            cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);

            menu_destroy(idMenu);
            return PLUGIN_HANDLED;
        }
    }


    //Если есть талисман
    if(arrTalismanActive[idUser] != TALISMAN_ITEM_NONE)
    {
        arrTalismanChange[idUser] = iNumberTalisman;
 
        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_CHANGE",szItemName);
        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);
    }
    else
    {
        //Присваиваем активный талисман
        arrTalismanActive[idUser] = iNumberTalisman;
 
        fActivateTalismanPassive(idUser, iNumberTalisman);

        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_TALISMAN_ACTIVATE",szItemName);
        cssbChatColor(idUser,"%s%s",fTagWar3ft(),szMessage);

        WC3_ShowBar(idUser);
    }

    menu_destroy(idMenu);

    return PLUGIN_HANDLED;
}

//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Функции меню-----------------------END }


//-----------------Функции баз данных MYSQL и SQLITE------------------------------------BEGIN {
//Считывание всех талисманов из базы данных (базовая функция)
public DB_GetAllTalisman( idUser )//добавлена в war3ft.inl (WC3_PlayerInit( idUser ))
{
    //Включено сохранение или нет
    if (!idUser || MAX_MODE_TALISMAN != 1)
        return;

    // Get the Talisman
    switch( g_DBType )
    {
        case DB_MYSQLX:    MYSQLX_GetAllTalisman(idUser);
        case DB_SQLITE:    SQLITE_GetAllTalisman(idUser);
    }

    return;
}

//Считывание из базы данных MYSQL всех талисманов
MYSQLX_GetAllTalisman(idUser)
{
    if ( !MYSQLX_Connection_Available() )
        return;

    new iUniqueID = DB_GetUniqueID( idUser );

    if ( iUniqueID <= 0 )
    {
        WC3_Log( true, "[ERROR] Unable to retreive user's Unique ID" );
        return;
    }

    //Запрос количества талиманов для игрока
    new szQueryNumTalisman[256];
    format(szQueryNumTalisman, charsmax(szQueryNumTalisman), "SELECT `talisman_num` FROM `cssb_num_talisman` WHERE (`player_id` = '%d' );", iUniqueID );
    new Handle:hQueryNumTalisman = SQL_PrepareQuery(g_DBConn, szQueryNumTalisman );

    if ( !SQL_Execute( hQueryNumTalisman ) )
    {
        MYSQLX_Error(hQueryNumTalisman, szQueryNumTalisman, 100 );
        return;
    }

    new iNumTalismansUser = 0;
    // Цикл считывания из поля 'talisman_num'
    while ( SQL_MoreResults( hQueryNumTalisman ) )
    {
        iNumTalismansUser = SQL_ReadResult( hQueryNumTalisman, 0 );

        SQL_NextRow( hQueryNumTalisman );
    }
    //log_amx("iNumTalismansUser: %d",SQL_MoreResults( hQueryNumTalisman ) );

    //Если у игрока талисамнов максимальное количество не нужно считывать из базы чтобы снизить нагрузку
    if(iNumTalismansUser >= MAX_TALISMANS)
    {
        arrTalismanNum[idUser] = iNumTalismansUser;
        return;
    }

    SQL_FreeHandle( hQueryNumTalisman );

    //Запрос всех талисманов для игрока
    new szQuery[256];
    format(szQuery, 255, "SELECT `talisman_id` FROM `cssb_player_talisman` WHERE (`player_id` = '%d' );", iUniqueID );
    new Handle:query = SQL_PrepareQuery( g_DBConn, szQuery );

    if ( !SQL_Execute( query ) )
    {
        MYSQLX_Error( query, szQuery, 6 );
        return;
    }

    // Обнуляем все талисманы
    for ( new i = 0; i < MAX_TALISMANS; i++ )
        arrListTalisman[idUser][i] = TALISMAN_ITEM_NONE;

    new iTalismanID,iCounter = 0;

    // Цикл считывания из поля 'talisman_id'
    while ( SQL_MoreResults( query ) )
    {
        iTalismanID    = SQL_ReadResult( query, 0 );
 
        if ( iCounter < MAX_TALISMANS )
        {
            for(new i = 0; i < MAX_TALISMANS; i++)
            {
                if(LIST_TALISMANS[i] == iTalismanID)
                {
                    arrListTalisman[idUser][i] = LIST_TALISMANS[i];

                    arrTalismanNum[idUser]++;
                    break;
                }
            }
        }

        SQL_NextRow( query );
        iCounter++;
    }

    SQL_FreeHandle( query );

//    client_print(0,print_chat,"TalismanID MYSQLX_GetAllTalisman");

    return;
}

fTalisman_MYSQLX_Save( idUser,iUniqueID )//добавлена в db_sqlite.inl (MYSQLX_Save( idUser ))
{
//    client_print(0,print_chat,"TalismanID MYSQLX_Save:");

    //Удаление записи по ID игрока
    new szQueryDeleteTalisman[256];
    format(szQueryDeleteTalisman, charsmax(szQueryDeleteTalisman), "DELETE FROM `cssb_num_talisman` WHERE (`player_id` = '%d' );",iUniqueID);
    new Handle:hQueryDeleteTalisman = SQL_PrepareQuery(g_DBConn, szQueryDeleteTalisman );

    if ( !SQL_Execute( hQueryDeleteTalisman ) )
    {
        MYSQLX_Error(hQueryDeleteTalisman, szQueryDeleteTalisman, 104 );
        return;
    }
    //SQL_FreeHandle( hQueryDeleteTalisman );

    //Сохранение количества талиманов игрока
    new szQueryNumTalisman[256];
    format(szQueryNumTalisman, charsmax(szQueryNumTalisman), "REPLACE INTO `cssb_num_talisman` ( `player_id` , `talisman_num`) VALUES ( '%d', '%d' );", iUniqueID, arrTalismanNum[idUser]);
    new Handle:hQueryNumTalisman = SQL_PrepareQuery(g_DBConn, szQueryNumTalisman );

    if ( !SQL_Execute( hQueryNumTalisman ) )
    {
        MYSQLX_Error(hQueryNumTalisman, szQueryNumTalisman, 102 );
        return;
    }
//    SQL_FreeHandle( hQueryNumTalisman );

    //Если у игрока талисманов максимальное количество не нужно записывать в базу все талисманы чтобы снизить нагрузку
    if(arrTalismanNum[idUser] >= MAX_TALISMANS)
        return;

    //Сохранение всех талисманов
    for ( new iTalismanID = 0; iTalismanID < MAX_TALISMANS; iTalismanID++ )
    {
        if(arrListTalisman[idUser][iTalismanID] == TALISMAN_ITEM_NONE)
            continue;

        new iTalismanValue = arrListTalisman[idUser][iTalismanID];

        new szQuery[512];
        format( szQuery, 511, "REPLACE INTO `cssb_player_talisman` ( `player_id` , `talisman_id`) VALUES ( '%d', '%d' );", iUniqueID, iTalismanValue);
        new Handle:query = SQL_PrepareQuery( g_DBConn, szQuery );

        if ( !SQL_Execute( query ) )
        {
            MYSQLX_Error( query, szQuery, 5 );
            return;
        }
    }

}

fTalisman_MYSQLX_Save_T( idUser,iUniqueID )//добавлена в db_sqlite.inl (MYSQLX_Save_T( idUser ))
{
//    client_print(0,print_chat,"TalismanID MYSQLX_Save_T:");

    //Удаление записи по ID игрока
    new szQueryDeleteTalisman[256];
    format(szQueryDeleteTalisman, charsmax(szQueryDeleteTalisman), "DELETE FROM `cssb_num_talisman` WHERE (`player_id` = '%d' );",iUniqueID);
    SQL_ThreadQuery(g_DBTuple,"_MYSQLX_Save_T", szQueryDeleteTalisman );

    //Сохранение количества талиманов игрока
    new szQueryNumTalisman[256];
    format(szQueryNumTalisman, charsmax(szQueryNumTalisman), "REPLACE INTO `cssb_num_talisman` ( `player_id` , `talisman_num`) VALUES ( '%d', '%d' );", iUniqueID, arrTalismanNum[idUser]);
    SQL_ThreadQuery(g_DBTuple,"_MYSQLX_Save_T", szQueryNumTalisman );

    //Если у игрока талисманов максимальное количество не нужно записывать в базу все талисманы, чтобы снизить нагрузку
    if(arrTalismanNum[idUser] >= MAX_TALISMANS)
        return;

    //Сохранение всех талисманов
    for ( new iTalismanID = 0; iTalismanID < MAX_TALISMANS; iTalismanID++ )
    {
        if(arrListTalisman[idUser][iTalismanID] == TALISMAN_ITEM_NONE)
            continue;

        new iTalismanValue = arrListTalisman[idUser][iTalismanID];

        new szQuery[512];
        format( szQuery, 511, "REPLACE INTO `cssb_player_talisman` ( `player_id` , `talisman_id`) VALUES ( '%d', '%d' );", iUniqueID, iTalismanValue);
        SQL_ThreadQuery( g_DBTuple, "_MYSQLX_Save_T", szQuery );
    }
}


//Считывание из базы данных SQLITE всех талисманов
SQLITE_GetAllTalisman(idUser)
{
    if ( !SQLITE_Connection_Available() )
        return;

    new iUniqueID = DB_GetUniqueID( idUser );

    if ( iUniqueID <= 0 )
    {
        WC3_Log( true, "[ERROR] Unable to retreive user's Unique ID" );
        return;
    }

    //Запрос количества талисманов для игрока
    new szQueryNumTalisman[256];
    format(szQueryNumTalisman, charsmax(szQueryNumTalisman), "SELECT `talisman_num` FROM `cssb_num_talisman` WHERE (`player_id` = '%d' );", iUniqueID );
    new Handle:hQueryNumTalisman = SQL_PrepareQuery(g_DBConn, szQueryNumTalisman );

    if ( !SQL_Execute( hQueryNumTalisman ) )
    {
        SQLITE_Error(hQueryNumTalisman, szQueryNumTalisman, 100 );
        return;
    }

    new iNumTalismansUser = 0;
    // Цикл считывания из поля 'talisman_num'
    while ( SQL_MoreResults( hQueryNumTalisman ) )
    {
        iNumTalismansUser = SQL_ReadResult( hQueryNumTalisman, 0 );

        SQL_NextRow( hQueryNumTalisman );
    }

    SQL_FreeHandle( hQueryNumTalisman );

    //Если у игрока талисманов максимальное количество не нужно считывать из базы чтобы снизить нагрузку
    if(iNumTalismansUser == MAX_TALISMANS)
    {
        arrTalismanNum[idUser] = iNumTalismansUser;
        return;
    }

    //Запрос всех талисманов для игрока
    new szQuery[256];
    format(szQuery, charsmax(szQuery), "SELECT `talisman_id` FROM `cssb_player_talisman` WHERE (`player_id` = '%d' );", iUniqueID );
    new Handle:query = SQL_PrepareQuery( g_DBConn, szQuery );

    if ( !SQL_Execute( query ) )
    {
        SQLITE_Error( query, szQuery, 101 );
        return;
    }

    // Обнуляем все талисманы
    for ( new i = 0; i < MAX_TALISMANS; i++ )
        arrListTalisman[idUser][i] = TALISMAN_ITEM_NONE;

    new iTalismanID,iCounter = 0;

    // Цикл считывания из поля 'talisman_id'
    while ( SQL_MoreResults( query ) )
    {
        iTalismanID    = SQL_ReadResult( query, 0 );
 
        if ( iCounter < MAX_TALISMANS )
        {
            for(new i = 0; i < MAX_TALISMANS; i++)
            {
                if(LIST_TALISMANS[i] == iTalismanID)
                {
                    arrListTalisman[idUser][i] = LIST_TALISMANS[i];

                    arrTalismanNum[idUser]++;
                    break;
                }
            }
        }

        SQL_NextRow( query );
        iCounter++;
    }

    SQL_FreeHandle( query );

//    client_print(0,print_chat,"TalismanID SQLITE_GetAllTalisman");

    return;
}

fTalisman_SQLITE_Save( idUser,iUniqueID )//добавлена в db_sqlite.inl (SQLITE_Save( idUser ))
{
//    client_print(0,print_chat,"TalismanID SQLITE_Save:");
//    log_amx("TalismanID fTalisman_SQLITE_Save");

    //Удаление записи по ID игрока
    new szQueryDeleteTalisman[256];
    format(szQueryDeleteTalisman, charsmax(szQueryDeleteTalisman), "DELETE FROM `cssb_num_talisman` WHERE (`player_id` = '%d' );",iUniqueID);
    new Handle:hQueryDeleteTalisman = SQL_PrepareQuery(g_DBConn, szQueryDeleteTalisman );

    if ( !SQL_Execute( hQueryDeleteTalisman ) )
    {
        SQLITE_Error(hQueryDeleteTalisman, szQueryDeleteTalisman, 104 );
        return;
    }
    //SQL_FreeHandle( hQueryDeleteTalisman );

    //Сохранение количества талисманов игрока
    new szQueryNumTalisman[256];
    format(szQueryNumTalisman, charsmax(szQueryNumTalisman), "REPLACE INTO `cssb_num_talisman` ( `player_id` , `talisman_num`) VALUES ( '%d', '%d' );", iUniqueID, arrTalismanNum[idUser]);
    new Handle:hQueryNumTalisman = SQL_PrepareQuery(g_DBConn, szQueryNumTalisman );

    if ( !SQL_Execute( hQueryNumTalisman ) )
    {
        SQLITE_Error(hQueryNumTalisman, szQueryNumTalisman, 102 );
        return;
    }
//    SQL_FreeHandle( hQueryNumTalisman );

    //Если у игрока талисманов максимальное количество не нужно записывать в базу все талисманы чтобы снизить нагрузку
    if(arrTalismanNum[idUser] >= MAX_TALISMANS)
        return;

    //Сохранение всех талисманов
    for ( new iTalismanID = 0; iTalismanID < MAX_TALISMANS; iTalismanID++ )
    {
        if(arrListTalisman[idUser][iTalismanID] == TALISMAN_ITEM_NONE)
            continue;

        new iTalismanValue = arrListTalisman[idUser][iTalismanID];

        new szQuery[512];
        format( szQuery, charsmax(szQuery), "REPLACE INTO `cssb_player_talisman` ( `player_id` , `talisman_id`) VALUES ( '%d', '%d' );", iUniqueID, iTalismanValue);
        new Handle:query = SQL_PrepareQuery( g_DBConn, szQuery );

        if ( !SQL_Execute( query ) )
        {
            SQLITE_Error( query, szQuery, 103 );
            return;
        }
    //    SQL_FreeHandle( query );
    }
}

fTalisman_SQLITE_Save_T(idUser,iUniqueID )//добавлена в db_sqlite.inl (SQLITE_Save_T( idUser ))
{
//    client_print(0,print_chat,"TalismanID SQLITE_Save_T:");
//    log_amx("TalismanID SQLITE_Save_T");

    //Удаление записи по ID игрока
    new szQueryDeleteTalisman[256];
    format(szQueryDeleteTalisman, charsmax(szQueryDeleteTalisman), "DELETE FROM `cssb_num_talisman` WHERE (`player_id` = '%d' );",iUniqueID);
    SQL_ThreadQuery(g_DBTuple,"_SQLITE_Save_T", szQueryDeleteTalisman );

    //Сохранение количества талисманов игрока
    new szQueryNumTalisman[256];
    format(szQueryNumTalisman, charsmax(szQueryNumTalisman), "REPLACE INTO `cssb_num_talisman` ( `player_id` , `talisman_num`) VALUES ( '%d', '%d' );", iUniqueID, arrTalismanNum[idUser]);
    SQL_ThreadQuery(g_DBTuple,"_SQLITE_Save_T", szQueryNumTalisman );

    //Если у игрока талисманов максимальное количество не нужно записывать в базу все талисманы, чтобы снизить нагрузку
    if(arrTalismanNum[idUser] >= MAX_TALISMANS)
        return;

    //Сохранение всех талисманов
    for ( new iTalismanID = 0; iTalismanID < MAX_TALISMANS; iTalismanID++ )
    {
        if(arrListTalisman[idUser][iTalismanID] == TALISMAN_ITEM_NONE)
            continue;

        new iTalismanValue = arrListTalisman[idUser][iTalismanID];

        new szQuery[512];
        format(szQuery,charsmax(szQuery), "REPLACE INTO `cssb_player_talisman` ( `player_id` , `talisman_id`) VALUES ( '%d', '%d' );", iUniqueID, iTalismanValue);
        SQL_ThreadQuery( g_DBTuple, "_SQLITE_Save_T", szQuery );
    }
}

//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Функции баз данных MYSQL и SQLITE-------------------------------------END }


//-----------------Функции талисмана как пассивного навыка------------------------------------BEGIN {

public fActivateTalismanPassive(idUser, idTalismanActive)//добавлена [items.inl - ITEM_GiveAllBonuses( idUser )]
{

    switch(idTalismanActive)
    {
        case TALISMAN_ITEM_BOOTS:    // Boots of Speed
        {
            SHARED_SetSpeed( idUser );
        }
        case TALISMAN_ITEM_CLOAK:    // Cloak of Shadows
        {
            SHARED_INVIS_Set(idUser);
        }
        case TALISMAN_ITEM_HEALTH:    // Periapt of Health
        {
            new iMaxHealth = clHP:getRaceMaxHealth(idUser);
            new iCurrentHealth =  clHP:getUserHealth(idUser);
            new iBonusHp = get_pcvar_num(CVAR_wc3_health);
     
            if((iCurrentHealth + iBonusHp) > iMaxHealth)
                clHP:setUserHealth(idUser,iMaxHealth);
            else
                clHP:setUserHealth(idUser,iCurrentHealth + iBonusHp);

        }
        case TALISMAN_ITEM_SOCK:    // Sock of the Feather
        {
            SHARED_SetGravity(idUser);
        }
        case TALISMAN_ITEM_GLOVES:    // Flaming Gloves of Warmth
        {
            ITEM_Gloves( idUser );
        }
        case TALISMAN_ITEM_RING:    // Ring of Regeneration
        {
            if ( !task_exists( TASK_ITEM_RING + idUser ) )
            {
                _ITEM_Ring( idUser );
            }
        }
        case TALISMAN_ITEM_CHAMELEON:    // Chameleon
        {
            SHARED_ChangeSkin( idUser, SKIN_SWITCH );
        }
        case TALISMAN_ITEM_ESP:        // ESP
        {
            fEnableItemESP(idUser);
        }
        case TALISMAN_ITEM_ICE_BLOCK:    //Ледяная глыба [shopmenu4.inl - sm4_ITEM_IceBlock_Begin(idUser)]
        {
            ITEM_IceBlock( idUser );
        }
        case TALISMAN_ITEM_THIEF:    //Похититель денег [shopmenu4.inl - ITEM_Thief_Begin(idUser)]
        {
            ITEM_Thief( idUser );
        }
    }

}

stock fWorkTalismanPassive(idUser, idTalismanActive)
{
    switch(idTalismanActive)
    {
        case TALISMAN_ITEM_ANKH:    // Ankh of Reincarnation [shared.inl - public SHARED_CS_Reincarnation( idUser )]
        {
            return TALISMAN_ITEM_ANKH;
        }
        case TALISMAN_ITEM_BOOTS:    // Boots of Speed [shared.inl - public SHARED_SetSpeed( idUser )]
        {
            return TALISMAN_ITEM_BOOTS;
        }
        case TALISMAN_ITEM_CLAWS:    // Claws of Attack [items.inl - ITEM_Offensive( idAttacker, idVictim, iWeapon, iDamage, iHitPlace )]
        {
            return TALISMAN_ITEM_CLAWS;
        }
        case TALISMAN_ITEM_CLOAK:    // Cloak of Shadows [shared.inl - public SHARED_INVIS_Set( idUser )]
        {
            return TALISMAN_ITEM_CLOAK;
        }
        case TALISMAN_ITEM_MASK:    // Mask of Death [items.inl - ITEM_Offensive( idAttacker, idVictim, iWeapon, iDamage, iHitPlace )]
        {
            return TALISMAN_ITEM_MASK;
        }
        case TALISMAN_ITEM_NECKLACE:    // Necklace of Immunity [ultimates.inl - bool:ULT_CanUserBlockUlt( idUser )]
        {
            return TALISMAN_ITEM_NECKLACE;
        }
        case TALISMAN_ITEM_FROST:    // Orb of Frost [items.inl - ITEM_Offensive( idAttacker, idVictim, iWeapon, iDamage, iHitPlace )]
        {
            return TALISMAN_ITEM_FROST;
        }
        case TALISMAN_ITEM_HEALTH:
        {
            return TALISMAN_ITEM_HEALTH;
        }
        case TALISMAN_ITEM_PROTECTANT:    // Mole Protectant [events.inl - public TRIGGER_TraceLine( Float:v1[3], Float:v2[3], noMonsters, pentToSkip )]
        {
            return TALISMAN_ITEM_PROTECTANT;
        }
        case TALISMAN_ITEM_HELM:    // Helm of Excellence [events.inl - public TRIGGER_TraceLine( Float:v1[3], Float:v2[3], noMonsters, pentToSkip )]
        {
            if(ITEM_HasItem( idUser, ITEM_HELM ) != ITEM_HELM)
                return TALISMAN_ITEM_HELM;
        }
        case TALISMAN_ITEM_AMULET:    // Amulet of the Cat [cssbWar3ftMod.sma - public client_PreThink( id )]
        {
            if(ITEM_HasItem( idUser, ITEM_AMULET ) != ITEM_AMULET)
                return TALISMAN_ITEM_AMULET;
        }
        case TALISMAN_ITEM_SOCK:    // Sock of the Feather [shared.inl - public SHARED_SetGravity( idUser )]
        {
            return TALISMAN_ITEM_SOCK;
        }
        case TALISMAN_ITEM_GLOVES:    // Flaming Gloves of Warmth [events.inl - public grenade_throw( idUser, greindex, wId )]
        {
            if(ITEM_HasItem( idUser, ITEM_GLOVES ) != ITEM_GLOVES)
                return TALISMAN_ITEM_GLOVES;
        }
        case TALISMAN_ITEM_RING:    // Ring of Regeneration + 1 [items.inl - public _ITEM_Ring( idUser )]
        {
            if(ITEM_HasItem( idUser, ITEM_RING ) != ITEM_RING)
                return TALISMAN_ITEM_RING;
        }
        case TALISMAN_ITEM_CHAMELEON:    // Chameleon [race_vip_models.inl - public fwPlayerPostThink(idUser)]
        {
            if(ITEM_HasItem( idUser, ITEM_CHAMELEON ) != ITEM_CHAMELEON)
                return TALISMAN_ITEM_CHAMELEON;
        }
        case TALISMAN_ITEM_INTELLECT:    // Intellect [XP.inl - stock XP_Give( idUser, iBonusXP )]
        {
            if(ITEM_HasItem( idUser, ITEM_INTELLECT ) != ITEM_INTELLECT)
                return TALISMAN_ITEM_INTELLECT;
        }
        case TALISMAN_ITEM_GRENADE_PROTECTION:    // Grenade Protection [events.inl - public EVENT_TakeDamage( idVictim, iWeapon, idAttacker, Float:f_Damage, damagetype )]
        {
            if(ITEM_HasItem( idUser, ITEM_GRENADE_PROTECTION ) != ITEM_GRENADE_PROTECTION)
                return TALISMAN_ITEM_GRENADE_PROTECTION;
        }
        case TALISMAN_ITEM_MIRROR_SHIELD:    // Mirror Shield [events.inl - public client_damage( idAttacker, idVictim, iDamage, iWeapon, iHitPlace, TA )]
        {
            if(ITEM_HasItem( idUser, ITEM_MIRROR_SHIELD ) != ITEM_MIRROR_SHIELD)
                return TALISMAN_ITEM_MIRROR_SHIELD;
        }
        case TALISMAN_ITEM_ESP:        // ESP
        {
            if(ITEM_HasItem( idUser, ITEM_ESP ) != ITEM_ESP)
                return TALISMAN_ITEM_ESP;
        }
        case TALISMAN_ITEM_FROST_ARMOR:        // Frost Armor [events.inl - public client_damage( idAttacker, idVictim, iDamage, iWeapon, iHitPlace, TA )]
        {
            if(ITEM_HasItem( idUser, ITEM_FROST_ARMOR ) != ITEM_FROST_ARMOR)
                return TALISMAN_ITEM_FROST_ARMOR;    
        }
        case TALISMAN_ITEM_ULTIMATE_TIMER_DIVIDER:    // Ultimate Timer Divider [ultimates.inl - public _ULT_Delay()]
        {
            if(ITEM_HasItem( idUser, ITEM_ULTIMATE_TIMER_DIVIDER ) != ITEM_ULTIMATE_TIMER_DIVIDER)
                    return TALISMAN_ITEM_ULTIMATE_TIMER_DIVIDER;
        }
        case TALISMAN_ITEM_DEVOURER_LIGHT:    //Пожиратель змей [race_shadow.inl - public _SH_DrawSerpentWard( parm[5] )]
        {
            if(ITEM_HasItem( idUser, ITEM_DEVOURER_LIGHT ) != ITEM_DEVOURER_LIGHT)
                return TALISMAN_ITEM_DEVOURER_LIGHT;
        }
        case TALISMAN_ITEM_ICE_BLOCK:    //Ледяная глыба [shopmenu4.inl - sm4_ITEM_IceBlock_Begin(idUser)]
                                                    //    [item_ice_block.inl - public fwSetModel(idEntity,szModel[]) и show_icon(idUser, status)]
        {
            if(ITEM_HasItem( idUser, ITEM_ICE_BLOCK ) != ITEM_ICE_BLOCK)
                return TALISMAN_ITEM_ICE_BLOCK;

        }
        case TALISMAN_ITEM_THIEF:    //Похититель денег [shopmenu4.inl - ITEM_Thief_Begin(idUser)]
        {
            if(ITEM_HasItem( idUser, ITEM_THIEF ) != ITEM_THIEF)
                return TALISMAN_ITEM_THIEF;
        }
        case TALISMAN_ITEM_MIRROR_ULTIMATE:        //Отражатель супер навыка [events.inl - public TRIGGER_TraceLine( Float:v1[3], Float:v2[3], noMonsters, pentToSkip )]
        {                                                               // (не добавлять)[race_crypt.inl - CL_ULT_LocustSwarm( idAttacker )]

            if (random_float(0.0, 1.0 ) <= 0.75 )
            {
                if(ITEM_HasItem( idUser, ITEM_MIRROR_ULTIMATE ) != ITEM_MIRROR_ULTIMATE)
                    return TALISMAN_ITEM_MIRROR_ULTIMATE;
            }
        }
    }

    return TALISMAN_ITEM_NONE;
}

//Какой талисман является активным у игрока
//добавлена [shared.inl - SHARED_Glow( idUser, iRed, iGreen, iBlue, iAll ),
//                          SHARED_GlowShell(idUser, iRed, iGreen, iBlue,Float:fTime,iAmountGlow = 16)]
bool:bIsActiveTalisman(idUser,idTalisman)
{
    if(arrTalismanActive[idUser] == idTalisman)
        return true;

    return false;
}


//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Функции талисмана как пассивного навыка-------------------------------------END }


//-----------------Функции отображения Sync HUD------------------------------------BEGIN {

public fShowSyncMessageRandomColor(idUser,szHUDMessage[],iMessageEffect,Float:fX,Float:fY)
{
    new rgbRed, rgbGreen, rgbBlue;

    rgbRed = random_num(0, 255);
    rgbGreen = random_num(0, 255);
    rgbBlue = random_num(0, 255);
     
    new iEffect, Float:iFadeIn, Float:iFadeOut, Float:iHoldTime;

    switch(iMessageEffect)
    {
        case 1:
        {
            iEffect = 1;
            iFadeIn = 0.2;
            iFadeOut = 0.2;
            iHoldTime = 7.0;
        }
        case 2:
        {
            iEffect = 2;
            iFadeIn = 0.05;
            iFadeOut = 0.5;
            iHoldTime = 7.0;
        }
        default:
        {
            iEffect = 0;
            iFadeIn = 0.5;
            iFadeOut = 0.5;
            iHoldTime = 7.0;
        }
    }

    set_hudmessage(rgbRed, rgbGreen, rgbBlue,fX,fY, iEffect, 0.1, iHoldTime, iFadeIn, iFadeOut, 3);
    ShowSyncHudMsg(idUser, stSyncHudCreate ,"%s", szHUDMessage);
}

//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Функции отображения Sync HUD-------------------------------------END }


//-----------------Функции администратора-------------------------------------BEGIN {
// Give the user an talisman
ADMIN_GiveTalisman( idUser, szTarget[], iItemID )//добавлена в admin.inl (public ADMIN_Handler( idUser ))
{
/*    if(!(get_user_flags(idUser) & ADMIN_FLAG))
    {
        formatex(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"YOU_HAVE_NO_ACCESS");
        client_print( idUser, print_console,szMessage);
        return;
    }*/
 
    new szItemName[64];
    LANG_GetItemName ( iItemID, idUser, szItemName, 63 );

    new iTarget = 0, bool:bTargetFound = false;

    //Дать все талисманы
    if(iItemID == 999)
    {
        while ( ( iTarget = FindTarget( iTarget, szTarget ) ) > 0 )
        {
            ADMIN_Talisman_Buy_All(iTarget);
            bTargetFound = true;
        }

        if ( !bTargetFound )
            ADMIN_NoTargetFound( idUser, szTarget, ( iTarget == -2 ) );

        return;
    }

    //Дать один талисман
    while ( ( iTarget = FindTarget( iTarget, szTarget ) ) > 0 )
    {
        ADMIN_Talisman_Buy( iTarget, iItemID );
        bTargetFound = true;
    }
    if ( !bTargetFound )
    {
        ADMIN_NoTargetFound( idUser, szTarget, ( iTarget == -2 ) );
    }
}

public ADMIN_Talisman_Buy( idUser, iTalismanValue )
{
    if(!bIsPlayerPresenceTalisman(idUser,iTalismanValue))//Если нет в наличии талисмана
    {
        for(new i = 0; i < MAX_TALISMANS; i++)
        {
            if(LIST_TALISMANS[i] == iTalismanValue)
            {
                arrListTalisman[idUser][i] = iTalismanValue;

                arrTalismanNum[idUser]++;

                fShowMenuTalismans(idUser);

                break;
            }
        }
    }
}

public ADMIN_Talisman_Buy_All( idUser )
{
    for(new i = 0; i < MAX_TALISMANS; i++)
        arrListTalisman[idUser][i] = LIST_TALISMANS[i];

    arrTalismanNum[idUser] = MAX_TALISMANS;

    fShowMenuTalismans(idUser);
}

//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Функции администратора-------------------------------------END }


//-----------------Функции логов-------------------------------------BEGIN {

//Лог появления талисмана для проверки что все работает
fTalismanLog(ptX,ptY,ptZ)
{

    new szLogFile[128];
    get_configsdir( szLogFile, charsmax(szLogFile) );
    formatex( szLogFile, charsmax(szLogFile), "%s/war3ft/logs/wc3_talisman.log", szLogFile );

    if (!file_exists( szLogFile ) )
    {
        write_file( szLogFile, "CSSB Warcraft 3 Frozen Throne Private", -1 );
        write_file( szLogFile, "Logging of respawn talismans", -1 );
        write_file( szLogFile, " ", -1 );
    }

    new szCvarNetAddress[64];
    get_cvar_string("net_address",szCvarNetAddress,charsmax(szCvarNetAddress) );

    new szCvarIP[64];
    get_cvar_string("ip",szCvarIP,charsmax(szCvarIP) );

    new szMap[32];
    get_mapname(szMap, charsmax(szMap));

    new szCurrentTime[64];
    get_time( "L %m/%d/%Y - %H:%M:%S", szCurrentTime,charsmax(szCurrentTime));

    new szLogEntry[256];
    formatex(szLogEntry, 255, "%s Spawn: ^"<%d><%d><%d>^" Map: ^"<%s>^" IP: ^"<%s><%s>^" ", szCurrentTime,ptX,ptY,ptZ,szMap,szCvarNetAddress,szCvarIP);

    write_file( szLogFile, szLogEntry, -1 );
}

//Лог кто из игроков подобрал талисман
fTalismanPlayerPickUpLog(idUserPickUp,szItemName[])
{
    new szLogFile[128];
    get_configsdir( szLogFile, charsmax(szLogFile) );
    formatex( szLogFile, charsmax(szLogFile), "%s/war3ft/logs/wc3_talisman_pickup.log", szLogFile );

    if (!file_exists( szLogFile ) )
    {
        write_file( szLogFile, "CSSB Warcraft 3 Frozen Throne Private", -1 );
        write_file( szLogFile, "Logging of pick up player talismans", -1 );
        write_file( szLogFile, " ", -1 );
    }

    new szUserIP[32], szUserAuthid[32],szUserName[32];
    get_user_ip(idUserPickUp, szUserIP, charsmax(szUserIP), 1);
    get_user_authid(idUserPickUp, szUserAuthid, charsmax(szUserAuthid));
    get_user_name(idUserPickUp, szUserName, charsmax(szUserName));

    new szMap[32];
    get_mapname(szMap, charsmax(szMap));

    new szCurrentTime[64];
    get_time( "L %m/%d/%Y - %H:%M:%S", szCurrentTime,charsmax(szCurrentTime));

    new szLogEntry[256];
    formatex(szLogEntry, 255, "%s Name: ^"<%s>^" StemID: ^"<%s>^" IP: ^"<%s>^" Map: ^"<%s>^" Talisman: ^"<%s>^" ", szCurrentTime,szUserName,szUserAuthid,szUserIP,szMap,szItemName);

    write_file( szLogFile, szLogEntry, -1 );
}

//=============================================================================
//=============================================================================
//=============================================================================
//-----------------Функции логов-------------------------------------END }
Код:
/*
*    UTIL Functions - Basically helper functions
*/

//Автоматическое (принудительное) закрытие меню игроку
UTIL_AutoHideMenu(idUser)
{
    new idMenuAutoHide, iKeysAutoHide;
    get_user_menu (idUser, idMenuAutoHide, iKeysAutoHide);

    if(idMenuAutoHide != 0 )
    {
        menu_cancel(idUser);                // force client to choose MENU_EXIT to destroy our menu
        show_menu(idUser, 0, "^n", 1 );    // show empty menu to hide our menu on player's screen
    }
}

UTIL_GetWeaponName( iWeapon, szWpnName[], len )
{
    switch ( iWeapon )
    {
        case CSW_KNIFE:            copy( szWpnName, len, "knife"        );

        case CSW_USP:           copy( szWpnName, len, "usp"            );
        case CSW_GLOCK18:       copy( szWpnName, len, "glock18"        );
        case CSW_DEAGLE:        copy( szWpnName, len, "deagle"        );
        case CSW_P228:          copy( szWpnName, len, "p228"        );
        case CSW_ELITE:         copy( szWpnName, len, "elite"        );
        case CSW_FIVESEVEN:     copy( szWpnName, len, "fiveseven"    );

        case CSW_M3:            copy( szWpnName, len, "m3"            );
        case CSW_XM1014:        copy( szWpnName, len, "xm1014"        );

        case CSW_MP5NAVY:       copy( szWpnName, len, "mp5navy"        );
        case CSW_TMP:           copy( szWpnName, len, "tmp"            );
        case CSW_P90:           copy( szWpnName, len, "p90"            );
        case CSW_MAC10:         copy( szWpnName, len, "mac10"        );
        case CSW_UMP45:         copy( szWpnName, len, "ump45"        );

        case CSW_AK47:          copy( szWpnName, len, "ak47"        );
        case CSW_SG552:         copy( szWpnName, len, "sg552"        );
        case CSW_M4A1:          copy( szWpnName, len, "m4a1"        );
        case CSW_AUG:           copy( szWpnName, len, "aug"            );
        case CSW_SCOUT:         copy( szWpnName, len, "scout"        );
        case CSW_AWP:           copy( szWpnName, len, "awp"            );
        case CSW_SG550:         copy( szWpnName, len, "sg550"        );
        case CSW_G3SG1:         copy( szWpnName, len, "g3sg1"        );

        case CSW_GALI:          copy( szWpnName, len, "galil"        );
        case CSW_FAMAS:         copy( szWpnName, len, "famas"        );

        case CSW_M249:          copy( szWpnName, len, "m249"        );

        case CSW_HEGRENADE:     copy( szWpnName, len, "grenade"        );
    }

    // These are common to both
    switch ( iWeapon )
    {
        case CSW_WORLDSPAWN:            copy( szWpnName, len, "world"                                                    );

        case CSW_LIGHTNING:                copy( szWpnName, len,"Chain Lightning");
        case CSW_SUICIDE:                copy( szWpnName, len,"Suicide Bomber");
        case CSW_IMMOLATE:                copy( szWpnName, len,"Immolate");
        case CSW_LOCUSTS:                copy( szWpnName, len,"Locust Swarm");
        case CSW_SERPENTWARD:            copy( szWpnName, len,"Serpent Ward");
        case CSW_SHADOW:                copy( szWpnName, len,"Shadow Strike");
        case CSW_THORNS:                copy( szWpnName, len,"Thorns Aura");
        case CSW_CARAPACE:                copy( szWpnName, len,"Spiked Carapace");
        case CSW_CARRION:                copy( szWpnName, len,"Carrion Beetles");
        case CSW_ORB:                    copy( szWpnName, len,"Orb of Annihilation");
        case CSW_CONCOCTION:            copy( szWpnName, len,"Unstable Concoction");
        case CSW_BANISH:                copy( szWpnName, len,"Banish");
        case CSW_BLIZZARD:                copy( szWpnName, len,"Blizzard");
        case CSW_ICE_SPLINTERS:            copy( szWpnName, len,"Ice splinters");
        case CSW_CHAM_FLAME_STRIKE:        copy( szWpnName, len,"Flame Strike");
        case CSW_DEATHCOIL:                copy( szWpnName, len,"Death Coil");
        case CSW_IMPALE:                copy( szWpnName, len,"Impale");
        case CSW_BLACKPOWER:            copy( szWpnName, len,"Black Strike");
        case CSW_POISON:                copy( szWpnName, len,"Poison");
        case CSW_RADIATION:                copy(szWpnName, len,"Radiation");
        case CSW_WORDDEATH:                copy(szWpnName, len,"Darkness word: Death");
        case CSW_BLOOD_RAGE:            copy(szWpnName, len,"Blood Rage");
        case CSW_BLOOD_RITE:            copy(szWpnName, len,"Blood Rite");
        case CSW_HEADSHOT:                copy(szWpnName, len,"Headshot");
        case CSW_SHRAPNEL:                copy(szWpnName, len,"Shrapnel");
        case CSW_GLIMPSE:                copy(szWpnName, len,"Glimpse");
        case CSW_STATIC_STORM:            copy(szWpnName, len,"Static Storm");
        case CSW_THUNDER_STRIKE:        copy(szWpnName, len,"Thunder Strike");
        case CSW_PLASMA_FIELD:            copy(szWpnName, len,"Plasma Field");
        case CSW_UNSTABLE_CURRENT:        copy(szWpnName, len,"Unstable Current");
        case CSW_FATAL_BONDS:            copy(szWpnName, len,"Fatal Bonds");
        case CSW_SHADOW_WORD:            copy(szWpnName, len,"Shadow Word");
        case CSW_FLAMING_FISTS:            copy(szWpnName, len,"Flaming Fists");
        case CSW_PERM_IMMOLATION:        copy(szWpnName, len,"Permanent Immolation");
        case CSW_CRY_HEART:                copy(szWpnName, len,"Cry from the heart");
        case CSW_REQUIEM_SOULS:            copy(szWpnName, len,"Requiem of Souls");
     

     
    }
}

// Log the death of a user
UTIL_LogDeath( idVictim, iKiller, iWeapon )
{
    new szKillerName[32], szVictimName[32];
    new szKillerTeam[32], szVictimTeam[32];
    new szKillerAuth[32], szVictimAuth[32];
    new szWeaponName[32];

    new iKillerUserID = get_user_userid( iKiller );
    new iVictimUserID = get_user_userid( idVictim );

    UTIL_GetWeaponName( iWeapon, szWeaponName, 31 );

    get_user_name(        iKiller    , szKillerName    , 31 );
    get_user_name(        idVictim    , szVictimName    , 31 );
    get_user_team(        iKiller    , szKillerTeam    , 31 );
    get_user_team(        idVictim    , szVictimTeam    , 31 );
    get_user_authid(    iKiller    , szKillerAuth    , 31 );
    get_user_authid(    idVictim    , szVictimAuth    , 31 );

    log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"", szKillerName, iKillerUserID, szKillerAuth, szKillerTeam, szVictimName, iVictimUserID, szVictimAuth, szVictimTeam, szWeaponName );
}

stock UTIL_EntInView(idUser, iEnt)
{
    new Float:vPlayerOrigin[3];
    entity_get_vector( idUser, EV_VEC_origin, vPlayerOrigin );

    new Float:vEntOrigin[3];
    entity_get_vector( iEnt, EV_VEC_origin, vEntOrigin );

    new Float:vReturn[3];

    new iHitEnt = trace_line( idUser, vPlayerOrigin, vEntOrigin, vReturn );

    if ( iHitEnt == iEnt )
    {
        return 1;
    }

    return 0;
}

UTIL_ClearHudChannel( idUser, iChannel )
{
    set_hudmessage( 0, 0, 0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, iChannel );
    show_hudmessage( idUser, "" );
}

stock UTIL_ClearDHudChannel(idUser,iClear = 8) //под вопросом (толку пока не видно)
{
    for (new iDHUD = 0; iDHUD < iClear; iDHUD++)
    {
        set_dhudmessage(0, 0, 0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, -1 );
        show_dhudmessage(idUser, "");
    }
}
 


//Когда один игрок смотрит на другого
stock UTIL_CanSeePlayer(idUser, iTargetID)
{
    if(!is_user_alive(idUser) || !is_user_connected(idUser))
      return 0;

    if(!is_user_alive(iTargetID) || !is_user_connected(iTargetID))
      return 0;

    new Float:vOrigin[3];
    entity_get_vector(iTargetID, EV_VEC_origin, vOrigin );

    return is_in_viewcone(idUser, vOrigin);
}

//Проверяет видит ли игрок другого с учетом стен
stock bool:UTIL_CanSeeToWall(entindex1, entindex2)
{
    if ((!iFakeMeta_ModuleRunning) || !entindex1 || !entindex2)
        return false;

    if (pev_valid(entindex1) && pev_valid(entindex1))
    {
        new flags = pev(entindex1, pev_flags);
        if (flags & EF_NODRAW || flags & FL_NOTARGET)
        {
            return false;
        }

        new Float:lookerOrig[3];
        new Float:targetBaseOrig[3];
        new Float:targetOrig[3];
        new Float:temp[3];

        pev(entindex1, pev_origin, lookerOrig);
        pev(entindex1, pev_view_ofs, temp);
        lookerOrig[0] += temp[0];
        lookerOrig[1] += temp[1];
        lookerOrig[2] += temp[2];

        pev(entindex2, pev_origin, targetBaseOrig);
        pev(entindex2, pev_view_ofs, temp);
        targetOrig[0] = targetBaseOrig [0] + temp[0];
        targetOrig[1] = targetBaseOrig [1] + temp[1];
        targetOrig[2] = targetBaseOrig [2] + temp[2];

        engfunc(EngFunc_TraceLine, lookerOrig, targetOrig, 0, entindex1, 0); //  checks the had of seen player
        if (get_tr2(0, TraceResult:TR_InOpen) && get_tr2(0, TraceResult:TR_InWater))
        {
            return false;
        }
        else
        {
            new Float:flFraction;
            get_tr2(0, TraceResult:TR_flFraction, flFraction);
            if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == entindex2))
            {
                return true;
            }
            else
            {
                targetOrig[0] = targetBaseOrig [0];
                targetOrig[1] = targetBaseOrig [1];
                targetOrig[2] = targetBaseOrig [2];
                engfunc(EngFunc_TraceLine, lookerOrig, targetOrig, 0, entindex1, 0); //  checks the body of seen player
                get_tr2(0, TraceResult:TR_flFraction, flFraction);
                if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == entindex2))
                {
                    return true;
                }
                else
                {
                    targetOrig[0] = targetBaseOrig [0];
                    targetOrig[1] = targetBaseOrig [1];
                    targetOrig[2] = targetBaseOrig [2] - 17.0;
                    engfunc(EngFunc_TraceLine, lookerOrig, targetOrig, 0, entindex1, 0); //  checks the legs of seen player
                    get_tr2(0, TraceResult:TR_flFraction, flFraction);
                    if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == entindex2))
                    {
                        return true;
                    }
                }
            }
        }
    }
    return false;
}

//Считывает координаты игрока как float и переводит в int
stock UTIL_GetOriginInt(idUser, ptOrigin[3])
{
    new Float:fVector[3];
    pev(idUser,pev_origin,fVector);

    ptOrigin[0] = floatround(fVector[0]);
    ptOrigin[1] = floatround(fVector[1]);
    ptOrigin[2] = floatround(fVector[2]);
}

//Входящее значение - точка с плавающей запятой т.е. Float
//Возвращаемое значение - точка с плавающей запятой т.е. Float
stock Float:uFloatPointToFloat(Float:ptAux[3])
{
    new Float:pt[3];
    pt[0] = ptAux[0];
    pt[1] = ptAux[1];
    pt[2] = ptAux[2];

    return pt;
}

//Входящее значение - точка с плавающей запятой т.е. Float
//Возвращаемое значение - точка с целыми т.е. int
stock uFloatPointToInt(Float:ptAux[3])
{
    new pt[3];
    pt[0] = floatround(ptAux[0]);
    pt[1] = floatround(ptAux[1]);
    pt[2] = floatround(ptAux[2]);

    return pt;
}

//Поворот точки (вектора) на заданный угол и радиус
//Входящее значение - точка с плавающей запятой т.е. Float
stock Float:uPointRotate(Float:fRadiusAux,Float:fAngleAux,Float:ptAux[3])
{
    new Float:pt[3];
    pt[0] = ptAux[0];
    pt[1] = ptAux[1];
    pt[2] = ptAux[2];

    pt[0] += fRadiusAux*cos(fAngleAux*M_PI/180);
    pt[1] += -fRadiusAux*sin(fAngleAux*M_PI/180);

    return pt;
}

//Поворот точки (вектора) на заданный угол и радиус
//Входящее значение - точка с плавающей запятой т.е. Float
//Рабочий механизм,поворачивает куда надо )))
stock Float:uRotate(Float:fAngleAux,Float:ptAux[3])
{
    //Работает в радианах
    new Float:ptRotated[3];
    ptRotated[2] = ptAux[2];

    ptRotated[0] = ptAux[0] * cos(fAngleAux) - ptAux[1] * sin(fAngleAux);
    ptRotated[1] = ptAux[0] * sin(fAngleAux) + ptAux[1] * cos(fAngleAux);

   return ptRotated;
}

//Удаление всех сущностей по названию класса со всей карты
stock uDeleteAllEntClassnameMap(const szClassNameEnt[])
{
    new idEntity;
    while ((idEntity = engfunc(EngFunc_FindEntityByString, idEntity, "classname",szClassNameEnt) ))
    {
        if (!pev_valid(idEntity))
            return;

        engfunc(EngFunc_RemoveEntity, idEntity);
    }
}


//Удаление всех сущностей по названию класса принадлежащие игроку
stock uDeleteAllEntClassnameUser(const szClassNameEnt[], const idUser)
{
    new idEntity;
    while ((idEntity = engfunc(EngFunc_FindEntityByString, idEntity, "classname",szClassNameEnt) ))
    {
        if (!pev_valid(idEntity))
            return;

        new idOwner = pev(idEntity, pev_owner);

        if(idUser == idOwner)
            engfunc(EngFunc_RemoveEntity, idEntity);

//        cssbChatColor(0,"uDeleteAllEntClassnameUser: %d",idEntity);
    }
}

//Поиск сущности по классу принадлежащую игроку. (возвращает первую попавшуюся)
stock isEntUserOwner(const szClassNameEnt[], const idUser)
{
    new idEntity;
    while ((idEntity = engfunc(EngFunc_FindEntityByString, idEntity, "classname",szClassNameEnt) ))
    {
        if (!pev_valid(idEntity))
            return false;

        new idOwner = pev(idEntity, pev_owner);

        if(idUser == idOwner)
            return true;

//        cssbChatColor(0,"uDeleteAllEntClassnameUser: %d",idEntity);
    }

    return false;
}

/*
Актуальность данной функции заключается в том, что если не выполнить проверку чем является точка куда перемещаем игрока,
то он может оказаться в стене, полу или в другом игроке, что не даст возможность продолжать играть.
Функция uIsHullVacant вернет результат проверки что вокруг проверяемой
точки достаточно места для того что бы туда переместить игрока.
#define HULL_POINT                      0
#define HULL_HUMAN                      1
#define HULL_LARGE                      2
#define HULL_HEAD
*/
stock bool:uIsHullVacant(const Float:origin[3], hull)
{
    new tr = 0;
    engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, tr);
    if (!get_tr2(tr, TR_StartSolid) && !get_tr2(tr, TR_AllSolid) && get_tr2(tr, TR_InOpen))
        return true;

    return false;
}

//Возвращает точку до стены от игрока
stock uGetPointTraceWall(idUser, Float:ptOriginWall[3])
{    
    new Float:ptOriginPlayer[3];
    new Float:vViewOfs[3];
    new Float:fPunchAngle[3];

    pev(idUser, pev_origin, ptOriginPlayer);                    // Координата игрока
    pev(idUser, pev_view_ofs, vViewOfs);                        // Получить смещение глаз игрока
    xs_vec_add(ptOriginPlayer, vViewOfs, ptOriginPlayer);        // Складываем смещение глаз и координаты игрока - получаем координаты его глаз
    pev(idUser, pev_v_angle, ptOriginWall);                    // Получаем угол куда смотрит игрок
    pev(idUser, pev_punchangle, fPunchAngle);                    // Это так сказать "искажение" угла взора игрока
    xs_vec_add(ptOriginWall, fPunchAngle, ptOriginWall);        // Складываем и получаем настоящий угол
    engfunc(EngFunc_MakeVectors, ptOriginWall);                // Делаем из угла единичный вектор
    global_get(glb_v_forward, ptOriginWall);                    // Получаем этот вектор
    xs_vec_mul_scalar(ptOriginWall, 4048.0, ptOriginWall);    // Умножаем его
    xs_vec_add(ptOriginWall, ptOriginPlayer, ptOriginWall);    // Прибавляем к координатам игрока, чтобы получить вектор от координат игрока, направленный по его взору

    new tr;
    engfunc(EngFunc_TraceLine,ptOriginPlayer, ptOriginWall, 0, idUser, tr);    // Трассируем линию от координат до конца вектора
    get_tr2(tr, TR_vecEndPos, ptOriginWall);                                    // Получаем конечную точку
    free_tr2(tr);
}
Код:
/ ******************************************************************
// Глобальные функции настройки вип
// ******************************************************************

//Загрузка файла настройки
public clVIP:vfLoadVipSystemFile()//добавлена в war3ft.cpp ( public WC3_Precache() )
{
    arrStrVipName = ArrayCreate(64, 1);
    arrStrVipFlag = ArrayCreate(64, 1);
//    arrStrVipDay = ArrayCreate(64, 1);
    arrStrVipKeys = ArrayCreate(1024, 1);


    new szPath[64];
    get_configsdir(szPath, charsmax(szPath));
    format(szPath, charsmax(szPath), "%s/%s", szPath, WAR3FT_VIP_SYSTEM_FILE);

    // File not present
    if (!file_exists(szPath))
    {
        new szError[100];
        formatex(szError, charsmax(szError), "Cannot load war3ft vip system file %s!", szPath);
        set_fail_state(szError);
        return;
    }

    // Set up some vars to hold parsing info
    new szLineData[1024], szKey[64], szValue[1024],iSection;

    new szName[255], szFlag[255];//, szDay[255];

    // Open customization file for reading
    new hFileIni = fopen(szPath, "rt")

    while (hFileIni && !feof(hFileIni))
    {
        // Read one line at a time
        fgets(hFileIni, szLineData, charsmax(szLineData))
 
        // Replace newlines with a null character to prevent headaches
        replace(szLineData, charsmax(szLineData), "^n", "")
 
        // Blank line or comment
        if (!szLineData[0] || szLineData[0] == ';')
            continue;
 
        // Начало новой секции
        if (szLineData[0] == '[')
        {
            iSection++
            continue;
        }
 
        switch (iSection)
        {    
            case SECTION_OPTIONS_VIP:
            {
                // Разделение строки по символу "="
                strtok(szLineData, szKey, charsmax(szKey), szValue, charsmax(szValue), '=')
         
                // Удаление пробелов
                trim(szKey);
                trim(szValue);

                if (equal(szKey, "HP_ARMOR_MIN_ROUND"))
                    iHpArmorMinRound = str_to_num(szValue);
                else if (equal(szKey, "GREANADE_ALL_ROUND"))
                    iGreanadeAllRound = str_to_num(szValue);
                else if (equal(szKey, "HEGRENADE_ROUND"))
                    iHegrenadeRound = str_to_num(szValue);
                else if (equal(szKey, "FLASHBANG_ROUND"))
                    iFlashbangRound = str_to_num(szValue);
                else if (equal(szKey, "SMOKEGRENADE_ROUND"))
                    iSmokegrenadeRound = str_to_num(szValue);
                else if (equal(szKey, "RESPAWN_ROUND"))
                    iRespawnRound = str_to_num(szValue);
                else if (equal(szKey, "SPEED_VALUE"))
                    fSpeedValueVip = str_to_float(szValue);
                else if (equal(szKey, "GRAVITY_VALUE"))
                    fGravityValueVip = str_to_float(szValue);
                else if (equal(szKey, "HP_ROUND"))
                    iHpRound = str_to_num(szValue);
                else if (equal(szKey, "HP_VALUE"))
                    iHpValue = str_to_num(szValue);
                else if (equal(szKey, "ARMOR_ROUND"))
                    iArmorRound = str_to_num(szValue);
                else if (equal(szKey, "ARMOR_VALUE"))
                    iArmorValue = str_to_num(szValue);
                else if (equal(szKey, "MONEY_ROUND"))
                    iMoneyRound = str_to_num(szValue);
                else if (equal(szKey, "MONEY_VALUE"))
                    iMoneyValue = str_to_num(szValue);
                else if (equal(szKey, "AWP_ROUND"))
                    iAwpRound = str_to_num(szValue);
                else if (equal(szKey, "AK47_ROUND"))
                    iAk47Round = str_to_num(szValue);
                else if (equal(szKey, "DEAGLE_ROUND"))
                    iDeagleRound = str_to_num(szValue);
                else if (equal(szKey, "AUG_ROUND"))
                    iAugRound = str_to_num(szValue);
                else if (equal(szKey, "SG552_ROUND"))
                    iSg552Round = str_to_num(szValue);
                else if (equal(szKey, "M4A1_ROUND"))
                    iM4a1Round = str_to_num(szValue);
                else if (equal(szKey, "M249_ROUND"))
                    iM249Round = str_to_num(szValue);
                else if (equal(szKey, "M3_ROUND"))
                    iM3Round = str_to_num(szValue);
                else if (equal(szKey, "XM1014_ROUND"))
                    iXm1014Round = str_to_num(szValue);
                else if (equal(szKey, "ALL_WEAPONS_ROUND"))
                    iAllWeaponsRound = str_to_num(szValue);
                else if (equal(szKey, "ALL_WEAPONS_BLOCK_MAP"))
                    copy(szAllWeaponsBlockMap, charsmax(szAllWeaponsBlockMap), szValue);
                else if (equal(szKey, "DHUD_MESSSAGE"))
                    iDhudMesssageVip = str_to_num(szValue);
                else if (equal(szKey, "CHAT_MESSSAGE"))
                    iChatMesssageVip = str_to_num(szValue);
         
         
            }//case

            case SECTION_USERS_VIP:
            {
                // Начало новой секции
                if (szLineData[0] == '"')
                {
                    // Разделение строки по символу "="
                    strtok(szLineData, szKey, charsmax(szKey), szValue, charsmax(szValue), '=');
             
                    // Удаление пробелов
                    trim(szKey);
                    trim(szValue);

                    ArrayPushString(arrStrVipKeys, szValue);

                    szName[0] = 0;
                    szFlag[0] = 0;
                    //szDay[0] = 0;
                 
                    //parse(szKey,szName,charsmax(szName), szFlag,charsmax(szFlag),szDay,charsmax(szDay));
                    parse(szKey,szName,charsmax(szName), szFlag,charsmax(szFlag));

                    ArrayPushString(arrStrVipName, szName);
                    ArrayPushString(arrStrVipFlag, szFlag);
                    //ArrayPushString(arrStrVipDay, szDay);

                    //log_amx("Name: '%s' | Flag: '%s' | Day: '%s'",szName,szFlag,szDay);
                    //log_amx("Keys: '%s'",szValue);

                }//if
            }//case

        }//switch

 
    }

    if (hFileIni)
        fclose(hFileIni);

}


bool:clVIP:isMap()
{
    new szValue[255];
    copy(szValue, charsmax(szValue), szAllWeaponsBlockMap);

    new szMap[64];
    new szMapName[64];
    get_mapname(szMapName, charsmax(szMapName));

    while (szValue[0] != 0 && strtok(szValue, szMap, charsmax(szMap), szValue, charsmax(szValue), ','))
    {
        trim(szMap);
        trim(szValue);
 
        new iLength;
        new szRestrictName[64];
        iLength = copyc(szRestrictName, charsmax(szRestrictName), szMap, '*' );

        if (equali(szMapName, szRestrictName, iLength))
        {
            //log_amx("Map: '%s' | szRestrictName: '%s'",szMapName,szRestrictName);
            return true;
        }
    }

    return false;
}

stock clVIP:isVipActiveIndex(const idUser)
{
    new iVipIndex = -1;

    for(new i = 0; i < ArraySize(arrStrVipName); i++)
    {
        new szUserAuthid[32],szUserName[32];
        get_user_authid(idUser, szUserAuthid, charsmax(szUserAuthid));
        get_user_name(idUser, szUserName, charsmax(szUserName));

        new szAuthData[64];
        ArrayGetString(arrStrVipName,i, szAuthData, charsmax(szAuthData));
     
        new szFlags[64];
        ArrayGetString(arrStrVipFlag,i, szFlags, charsmax(szFlags));

        //new szDay[255];
        //ArrayGetString(arrStrVipDay,i, szDay, charsmax(szDay));
     
        new bitFlagVip = read_flags(szFlags);
        if(equali(szAuthData,szUserAuthid) && (bitFlagVip & FLAG_AUTHID) )//Steam ID
        {        
            arrBoolData[idUser][PB_VIP_ACCESS] = true;
            iVipIndex = i;
            break;
        }

        if(equali(szAuthData,szUserName) && (bitFlagVip & FLAG_KICK) )//Name
        {    
            arrBoolData[idUser][PB_VIP_ACCESS] = true;
            iVipIndex = i;
            break;
        }
    }


    return iVipIndex;

}

bool:clVIP:isAccesItemVip(const idUser,const idItem)
{
    if(arrBoolData[idUser][PB_VIP_ACCESS] == true && arrIsItemVip[idUser][idItem] == true)
        return true;

    return false;
}

public clVIP:fInitItemsAccessVip(const idUser)
{
    new iVipIndex = clVIP:isVipActiveIndex(idUser);

    if(iVipIndex < 0)
        return;

    new szVipKeys[1024];
    ArrayGetString(arrStrVipKeys,iVipIndex, szVipKeys, charsmax(szVipKeys));

    new szKey[64];

    while (szVipKeys[0] != 0 && strtok(szVipKeys, szKey, charsmax(szKey), szVipKeys, charsmax(szVipKeys), ','))
    {
        trim(szKey);
         
        if (equal(szKey, "ANKH"))
        {
            arrIsItemVip[idUser][ITEM_ANKH] = true;
        }
        else if (equal(szKey, "MASK"))
        {    
            arrIsItemVip[idUser][ITEM_MASK] = true;
        }
        else if (equal(szKey, "NECKLACE"))
        {    
            arrIsItemVip[idUser][ITEM_NECKLACE] = true;
        }
        //ITEM_HEALTH - Periapt of Health
        else if (equal(szKey, "HEALTH"))
        {    
            arrIsItemVip[idUser][ITEM_HEALTH] = true;
     
            new iCurrentHealth = clHP:getUserHealth(idUser);
            new iBonusHp = get_pcvar_num(CVAR_wc3_health);
     
            clHP:setUserHealth(idUser,iCurrentHealth + iBonusHp);
        }
        else if (equal(szKey, "HELM"))
        {
            arrIsItemVip[idUser][ITEM_HELM] = true;
        }
        else if (equal(szKey, "AMULET"))
        {
            arrIsItemVip[idUser][ITEM_AMULET] = true;
        }
        else if (equal(szKey, "INTELLECT"))
        {
            arrIsItemVip[idUser][ITEM_INTELLECT] = true;
        }
        else if (equal(szKey, "GRENADE_PROTECTION"))
        {    
            arrIsItemVip[idUser][ITEM_GRENADE_PROTECTION] = true;
        }
        //ITEM_THIEF - Похититель
        else if (equal(szKey, "THIEF"))
        {    
            arrIsItemVip[idUser][ITEM_THIEF] = true;

            ITEM_Thief(idUser);
        }
 
    }

}

public clVIP:fResetItemsAccessVip(const idUser)
{

    arrIsItemVip[idUser][ITEM_ANKH]                        = false;    // Ankh of Reincarnation
    arrIsItemVip[idUser][ITEM_BOOTS]                    = false;    // Boots of Speed
    arrIsItemVip[idUser][ITEM_CLAWS]                    = false;    // Claws of Attack
    arrIsItemVip[idUser][ITEM_CLOAK]                    = false;    // Cloak of Shadows
    arrIsItemVip[idUser][ITEM_MASK]                        = false;    // Mask of Death
    arrIsItemVip[idUser][ITEM_NECKLACE]                    = false;    // Necklace of Immunity
    arrIsItemVip[idUser][ITEM_FROST]                    = false;    // Orb of Frost
    arrIsItemVip[idUser][ITEM_HEALTH]                    = false;    // Periapt of Health
    arrIsItemVip[idUser][ITEM_TOME]                        = false;    // Tome of Experience
    arrIsItemVip[idUser][ITEM_SCROLL]                    = false;    // Scroll of Respawning
    arrIsItemVip[idUser][ITEM_PROTECTANT]                = false;    // Mole Protectant
    arrIsItemVip[idUser][ITEM_HELM]                        = false;    // Helm of Excellence
    arrIsItemVip[idUser][ITEM_AMULET]                    = false;    // Amulet of the Cat
    arrIsItemVip[idUser][ITEM_SOCK]                        = false;    // Sock of the Feather
    arrIsItemVip[idUser][ITEM_GLOVES]                    = false;    // Flaming Gloves of Warmth
    arrIsItemVip[idUser][ITEM_RING]                        = false;    // Ring of Regeneration + 1
    arrIsItemVip[idUser][ITEM_CHAMELEON]                = false;    // Chameleon
    arrIsItemVip[idUser][ITEM_MOLE]                        = false;    // Mole
    arrIsItemVip[idUser][ITEM_INTELLECT]                = false;    // Intellect
    arrIsItemVip[idUser][ITEM_GRENADE_PROTECTION]        = false;    // Grenade Protection
    arrIsItemVip[idUser][ITEM_MIRROR_SHIELD]            = false;    // Mirror Shield
    arrIsItemVip[idUser][ITEM_ESP]                        = false;    // ESP
    arrIsItemVip[idUser][ITEM_FROST_ARMOR]                = false;    // Frost Armor
    arrIsItemVip[idUser][ITEM_DEATH_TOUCH]                = false;    //Death's Touch
    arrIsItemVip[idUser][ITEM_HEALTH_POTION]            = false;    // Health Potion
    arrIsItemVip[idUser][ITEM_ULTIMATE_TIMER_DIVIDER]    = false;    // Ultimate Timer Divider
    arrIsItemVip[idUser][ITEM_STEEL_SKIN]                = false;    // Steel Skin
    arrIsItemVip[idUser][ITEM_DEVOURER_LIGHT]            = false;    //
    arrIsItemVip[idUser][ITEM_ICE_BLOCK]                = false;    //
    arrIsItemVip[idUser][ITEM_THIEF]                    = false;    //
    arrIsItemVip[idUser][ITEM_MIRROR_ULTIMATE]            = false;    //
    arrIsItemVip[idUser][ITEM_DEATHCOIL]                = false;    //
    arrIsItemVip[idUser][ITEM_IMPALE]                    = false;    //
    arrIsItemVip[idUser][ITEM_SLEEP]                    = false;    //
    arrIsItemVip[idUser][ITEM_BOOK_DEAD]                = false;    //
    arrIsItemVip[idUser][ITEM_TRANQUILITY]                = false;    //
}

clVIP:fShowVipMenu(const idUser,iPage = 0)
{
    new iVipIndex = clVIP:isVipActiveIndex(idUser);

    if(iVipIndex < 0)
    {
        format(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_VIP_NO_ACCESS",iAllWeaponsRound);
        cssbChatColor(idUser,"%s%s",clVIP:fTagVip(),szMessage);

        return;
    }

    new idMenu,szMenuData[256];

    //Название главного меню
    formatex(szMenuData, charsmax(szMenuData), "%L", LANG_PLAYER, "WC3_MENU_VIP");
    idMenu = menu_create(szMenuData, "_Callback_VIP_MENU");

    new szVipKeys[1024];
    ArrayGetString(arrStrVipKeys,iVipIndex, szVipKeys, charsmax(szVipKeys));

    new szKey[64];

    while (szVipKeys[0] != 0 && strtok(szVipKeys, szKey, charsmax(szKey), szVipKeys, charsmax(szVipKeys), ','))
    {
        trim(szKey);
         
        new szLangItem[64];
        if (equal(szKey, "GREANADE_ALL"))
        {
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_1",iGreanadeAllRound - arrIsItemVipOneRound[idUser][1]);
                menu_additem(idMenu,szLangItem,"1",0,-1);
            }
        }
        else if (equal(szKey, "HEGRENADE"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_2",iHegrenadeRound - arrIsItemVipOneRound[idUser][2]);
                menu_additem(idMenu,szLangItem,"2",0,-1);
            }
        }
        else if (equal(szKey, "FLASHBANG"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_3",iFlashbangRound - arrIsItemVipOneRound[idUser][3]);
                menu_additem(idMenu,szLangItem,"3",0,-1);
            }
        }
        else if (equal(szKey, "SMOKEGRENADE"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_4",iSmokegrenadeRound - arrIsItemVipOneRound[idUser][4]);
                menu_additem(idMenu,szLangItem,"4",0,-1);
            }
        }
        else if (equal(szKey, "RESPAWN"))
        {    
            formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_5",iRespawnRound - arrIsItemVipOneRound[idUser][5]);
            menu_additem(idMenu,szLangItem,"5",0,-1);
        }
        else if (equal(szKey, "SPEED"))
        {
            new szOnOff[64];
            if(arrBoolData[idUser][PB_VIP_SPEED] == true)
                formatex(szOnOff, charsmax(szOnOff), "%L", LANG_PLAYER, "WC3_MENU_VIP_OFF");
            else
                formatex(szOnOff, charsmax(szOnOff), "%L", LANG_PLAYER, "WC3_MENU_VIP_ON");

            formatex(szLangItem, charsmax(szLangItem), "%L %s", LANG_PLAYER, "WC3_MENU_VIP_6",fSpeedValueVip,szOnOff);
            menu_additem(idMenu,szLangItem,"6",0,-1);
        }
        else if (equal(szKey, "GRAVITY"))
        {
            new szOnOff[64];
            if(arrBoolData[idUser][PB_VIP_GRAVITY] == true)
                formatex(szOnOff, charsmax(szOnOff), "%L", LANG_PLAYER, "WC3_MENU_VIP_OFF");
            else
                formatex(szOnOff, charsmax(szOnOff), "%L", LANG_PLAYER, "WC3_MENU_VIP_ON");

            formatex(szLangItem, charsmax(szLangItem), "%L %s", LANG_PLAYER, "WC3_MENU_VIP_7",fGravityValueVip * 1000,szOnOff);
            menu_additem(idMenu,szLangItem,"7",0,-1);
        }
        else if (equal(szKey, "HP"))
        {    
            formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_8",iHpValue,iHpRound - arrIsItemVipOneRound[idUser][8]);
            menu_additem(idMenu,szLangItem,"8",0,-1);
        }
        else if (equal(szKey, "ARMOR"))
        {    
            formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_9",iArmorValue,iArmorRound - arrIsItemVipOneRound[idUser][9]);
            menu_additem(idMenu,szLangItem,"9",0,-1);
        }
        else if (equal(szKey, "MONEY"))
        {    
            formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_10",iMoneyValue,iMoneyRound - arrIsItemVipOneRound[idUser][10]);
            menu_additem(idMenu,szLangItem,"10",0,-1);
        }
        else if (equal(szKey, "AWP"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_11",iAwpRound - arrIsItemVipOneRound[idUser][11]);
                menu_additem(idMenu,szLangItem,"11",0,-1);
            }
        }
        else if (equal(szKey, "AK47"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_12",iAk47Round - arrIsItemVipOneRound[idUser][12]);
                menu_additem(idMenu,szLangItem,"12",0,-1);
            }
        }
        else if (equal(szKey, "DEAGLE"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_13",iDeagleRound - arrIsItemVipOneRound[idUser][13]);
                menu_additem(idMenu,szLangItem,"13",0,-1);
            }
        }
        else if (equal(szKey, "AUG"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_14",iAugRound - arrIsItemVipOneRound[idUser][14]);
                menu_additem(idMenu,szLangItem,"14",0,-1);
            }
        }
        else if (equal(szKey, "SG552"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_15",iSg552Round - arrIsItemVipOneRound[idUser][15]);
                menu_additem(idMenu,szLangItem,"15",0,-1);
            }
        }
        else if (equal(szKey, "M4A1"))
        {
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_16",iM4a1Round - arrIsItemVipOneRound[idUser][16]);
                menu_additem(idMenu,szLangItem,"16",0,-1);
            }
        }
        else if (equal(szKey, "M249"))
        {
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_17",iM249Round - arrIsItemVipOneRound[idUser][17]);
                menu_additem(idMenu,szLangItem,"17",0,-1);
            }
        }
        else if (equal(szKey, "M3"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_18",iM3Round - arrIsItemVipOneRound[idUser][18]);
                menu_additem(idMenu,szLangItem,"18",0,-1);
            }
        }
        else if (equal(szKey, "XM1014"))
        {    
            if(clVIP:isMap() == false)
            {
                formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_19",iXm1014Round - arrIsItemVipOneRound[idUser][19]);
                menu_additem(idMenu,szLangItem,"19",0,-1);
            }
        }
        else if (equal(szKey, "HP_ARMOR_MIN"))
        {    
            new iMinHealth = clHP:getRaceMinHealth(idUser);
            new iMaxArmor = clAr:getRaceMaxArmor(idUser);

            formatex(szLangItem, charsmax(szLangItem), "%L", LANG_PLAYER, "WC3_MENU_VIP_20",iMinHealth,iMaxArmor,iHpArmorMinRound - arrIsItemVipOneRound[idUser][20]);
            menu_additem(idMenu,szLangItem,"20",0,-1);
        }
    }

    // Если нет предметов в меню
    if (menu_items(idMenu) <= 0)
    {
        menu_destroy(idMenu);
        return;
    }    

    //Пункты меню (назад - следующий - выход)
    formatex(szMenuData, charsmax(szMenuData), "\w%L", LANG_PLAYER, "WC3_MENU_BACK");
    menu_setprop(idMenu, MPROP_BACKNAME, szMenuData);
    formatex(szMenuData, charsmax(szMenuData), "\w%L", LANG_PLAYER, "WC3_MENU_NEXT");
    menu_setprop(idMenu, MPROP_NEXTNAME, szMenuData);
    formatex(szMenuData, charsmax(szMenuData), "\r%L", LANG_PLAYER, "WC3_MENU_EXIT");
    menu_setprop(idMenu, MPROP_EXITNAME, szMenuData);

    menu_display(idUser, idMenu, iPage);

}


//Отображение сообщения DHOD при взятии предмета випом
stock clVIP:fShowMessageDhud(const idUser,const iTypeItem)
{
    if(iDhudMesssageVip <= 0)
        return;

    UTIL_ClearDHudChannel(idUser);
    UTIL_ClearHudChannel(idUser,HUD_XP);
    WC3_ShowBar(idUser);

    new iRed = random_num(0,255);
    new iGreen = random_num(0,255);
    new iBlue = random_num(0,255);

    new szShowMessage[256];

    new szUserName[32];
    get_user_name(idUser, szUserName, charsmax(szUserName));

    switch(iTypeItem)
    {
        case enHP_ARMOR_MIN:
        {
            new iMinHealth = clHP:getRaceMinHealth(idUser);
            new iMaxArmor = clAr:getRaceMaxArmor(idUser);

            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L^n(%d | %d)",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_20",iMinHealth,iMaxArmor);
        }
        case enGREANADE_ALL:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_1");
         
        }
        case enHEGRENADE:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_2");
        }
        case enFLASHBANG:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_3");
        }
        case enSMOKEGRENADE:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_4");
        }
        case enRESPAWN:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_5");
        }
        case enSPEED:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L^n%.1f",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_6",fSpeedValueVip);
        }
        case enGRAVITY:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L^n%.1f",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_7",fGravityValueVip * 1000);
        }
        case enHP:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L^n%d",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_8",iHpValue);
        }
        case enARMOR:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L^n%d",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_9",iArmorValue);
        }
        case enMONEY:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L^n%d",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_10",iMoneyValue);
        }
        case enAWP:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_11");
        }
        case enAK47:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_12");
        }
        case enDEAGLE:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_13");
        }
        case enAUG:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_14");
        }
        case enSG552:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_15");
        }
        case enM4A1:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_16");
        }
        case enM249:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_17");
        }
        case enM3:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_18");
        }
        case enXM1014:
        {
            format(szShowMessage, charsmax(szShowMessage), "%s^n+ %L",szUserName,LANG_PLAYER,"WC3_CHAT_VIP_19");
        }
 
    }//switch

    set_dhudmessage(iRed,iGreen,iBlue,0.83,0.5,2,0.0,2.0,0.02,0.02, -1);

    if(iDhudMesssageVip == 1)
        show_dhudmessage(idUser, szShowMessage);
    else if(iDhudMesssageVip == 2)
        show_dhudmessage(0, szShowMessage);

}

//Отображение сообщения в чат при взятии предмета випом
stock clVIP:fShowMessageChat(const idUser,const iTypeItem)
{
    if(iChatMesssageVip <= 0)
        return;

    new szShowMessage[256];

    new szUserName[32];
    get_user_name(idUser, szUserName, charsmax(szUserName));

    switch(iTypeItem)
    {
        case enHP_ARMOR_MIN:
        {
            new iMinHealth = clHP:getRaceMinHealth(idUser);
            new iMaxArmor = clAr:getRaceMaxArmor(idUser);

            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^" !y(!t%d !y| !t%d!y)",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_20",iMinHealth,iMaxArmor);
        }
        case enGREANADE_ALL:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_1");
         
        }
        case enHEGRENADE:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_2");
        }
        case enFLASHBANG:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_3");
        }
        case enSMOKEGRENADE:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_4");
        }
        case enRESPAWN:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_5");
        }
        case enSPEED:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^" !t%.1f",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_6",fSpeedValueVip);
        }
        case enGRAVITY:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^" !t%.1f",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_7",fGravityValueVip * 1000);
        }
        case enHP:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^" !t%d",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_8",iHpValue);
        }
        case enARMOR:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^" !t%d",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_9",iArmorValue);
        }
        case enMONEY:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^" !t%d",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_10",iMoneyValue);
        }
        case enAWP:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_11");
        }
        case enAK47:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_12");
        }
        case enDEAGLE:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_13");
        }
        case enAUG:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_14");
        }
        case enSG552:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_15");
        }
        case enM4A1:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_16");
        }
        case enM249:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_17");
        }
        case enM3:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_18");
        }
        case enXM1014:
        {
            format(szShowMessage, charsmax(szShowMessage), "!t%s %L !g^"%L^"",szUserName,LANG_PLAYER,"WC3_APPLY",LANG_PLAYER,"WC3_CHAT_VIP_19");
        }
 
    }//switch

    if(iChatMesssageVip == 1)
        cssbChatColor(idUser,"%s%s",clVIP:fTagVip(),szShowMessage);
    else if(iChatMesssageVip == 2)
        cssbChatColor(0,"%s%s",clVIP:fTagVip(),szShowMessage);

}


stock clVIP:fTagVip()
{
    new szTag[64];
    formatex(szTag, sizeof(szTag) - 1, "%L%L%L ",LANG_PLAYER,"WC3_BRACKET_LEFT_VIP",LANG_PLAYER,"WC3_PREFIX_VIP",LANG_PLAYER,"WC3_BRACKET_RIGHT_VIP");
    return szTag;
}

public _Callback_VIP_MENU(idUser, idMenu, idItem)
{
    if ( !WC3_Check() )
        return PLUGIN_HANDLED;




    // Возврат в главное меню
    if (idItem == MENU_EXIT)
    {
        menu_destroy(idMenu);
        return PLUGIN_HANDLED;
    }

    static _access, szInfoMenu[8], callback;
    menu_item_getinfo(idMenu, idItem, _access, szInfoMenu, sizeof(szInfoMenu) - 1, _, _, callback);

    new iNumberItem = str_to_num(szInfoMenu);

    switch (iNumberItem)
    {
        case 1://GREANADE_ALL
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][1], iGreanadeAllRound))
                return PLUGIN_HANDLED;

            //HE Grenade
            give_item(idUser, "weapon_hegrenade" );

            //Concussion Grenades (i.e. Flashbang)
            give_item(idUser, "weapon_flashbang" );
            give_item(idUser, "weapon_flashbang" );
               
            //Smoke grenades
            give_item(idUser, "weapon_smokegrenade" );

            arrIsItemVipOneRound[idUser][1]++;

            clVIP:fShowMessageDhud(idUser,enGREANADE_ALL);
            clVIP:fShowMessageChat(idUser,enGREANADE_ALL);
                 
        }
        case 2://HEGRENADE
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][2], iHegrenadeRound))
                return PLUGIN_HANDLED;

            //HE Grenade
            give_item(idUser, "weapon_hegrenade");

            arrIsItemVipOneRound[idUser][2]++;

            clVIP:fShowMessageDhud(idUser,enHEGRENADE);
            clVIP:fShowMessageChat(idUser,enHEGRENADE);
         
        }
        case 3://FLASHBANG
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][3], iFlashbangRound))
                return PLUGIN_HANDLED;

            //Concussion Grenades (i.e. Flashbang)
            give_item(idUser, "weapon_flashbang" );
            give_item(idUser, "weapon_flashbang" );

            arrIsItemVipOneRound[idUser][3]++;

            clVIP:fShowMessageDhud(idUser,enFLASHBANG);
            clVIP:fShowMessageChat(idUser,enFLASHBANG);

        }
        case 4://SMOKEGRENADE
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][4], iSmokegrenadeRound))
                return PLUGIN_HANDLED;

            //Smoke grenades
            give_item(idUser, "weapon_smokegrenade" );

            arrIsItemVipOneRound[idUser][4]++;

            clVIP:fShowMessageDhud(idUser,enSMOKEGRENADE);
            clVIP:fShowMessageChat(idUser,enSMOKEGRENADE);

        }
        case 5://RESPAWN
        {    
            if(!clGl::isUserNoTeam(idUser))
            {
                menu_destroy(idMenu);
                return PLUGIN_HANDLED;
            }

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][5], iRespawnRound))
                return PLUGIN_HANDLED;


            new iRespEntity;

            new iTeam = get_user_team(idUser);
            if (iTeam == TEAM_T )
                iRespEntity = CanTeleportOnBaseT();
            if (iTeam == TEAM_CT )
                iRespEntity = CanTeleportOnBaseCT();

            if(pev_valid(iRespEntity))
            {
                clVIP:fTeleportRespawn(idUser, iRespEntity);
         
                WC3_PostSpawn(idUser);

                arrIsItemVipOneRound[idUser][5]++;

                clVIP:fShowMessageDhud(idUser,enRESPAWN);
                clVIP:fShowMessageChat(idUser,enRESPAWN);
            }
     
        }
        case 6://SPEED
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;
     
            arrBoolData[idUser][PB_VIP_SPEED] = ( ( arrBoolData[idUser][PB_VIP_SPEED] == false ) ? true : false );

            SHARED_SetSpeed(idUser);

            arrIsItemVipOneRound[idUser][6]++;

            if(arrBoolData[idUser][PB_VIP_SPEED] == true)
            {
                clVIP:fShowMessageDhud(idUser,enSPEED);
                clVIP:fShowMessageChat(idUser,enSPEED);
            }

        }
        case 7://GRAVITY
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            arrBoolData[idUser][PB_VIP_GRAVITY] = ( ( arrBoolData[idUser][PB_VIP_GRAVITY] == false ) ? true : false );

            SHARED_SetGravity(idUser);

            arrIsItemVipOneRound[idUser][7]++;

            if(arrBoolData[idUser][PB_VIP_GRAVITY] == true)
            {
                clVIP:fShowMessageDhud(idUser,enGRAVITY);
                clVIP:fShowMessageChat(idUser,enGRAVITY);
            }

        }
        case 8://HP
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][8], iHpRound))
                return PLUGIN_HANDLED;

            new iMaxHealth = clHP:getRaceMaxHealth(idUser);
            new iCurrentHealth =  clHP:getUserHealth(idUser);
            new iBonusHp = iHpValue;

            if (iCurrentHealth < iMaxHealth)
            {
                if( (iCurrentHealth + iBonusHp) > iMaxHealth )
                    clHP:setUserHealth(idUser,iMaxHealth);
                else
                    clHP:setUserHealth(idUser,iCurrentHealth + iBonusHp);
            }

            arrIsItemVipOneRound[idUser][8]++;

            clVIP:fShowMessageDhud(idUser,enHP);
            clVIP:fShowMessageChat(idUser,enHP);
     
        }
        case 9://ARMOR
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][9], iArmorRound))
                return PLUGIN_HANDLED;

            new iMaxArmor = clAr:getRaceMaxArmor(idUser);
            new CsArmorType:tArmor;
            new iCurrentArmor =  clAr:getUserArmor(idUser,tArmor);
            new iBonusArmor = iArmorValue;

            if((iCurrentArmor + iBonusArmor) > iMaxArmor)
                clAr:setUserArmor(idUser,iMaxArmor);
            else
                clAr:setUserArmor(idUser,iCurrentArmor + iBonusArmor);

            arrIsItemVipOneRound[idUser][9]++;

            clVIP:fShowMessageDhud(idUser,enARMOR);
            clVIP:fShowMessageChat(idUser,enARMOR);
        }
        case 10://MONEY
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][10], iMoneyRound))
                return PLUGIN_HANDLED;

            new iMoneyUserCurrent = SHARED_GetUserMoney(idUser);
            new iBonusMoney = iMoneyValue;
            SHARED_SetUserMoney(idUser, iMoneyUserCurrent + iBonusMoney, 1 );

            arrIsItemVipOneRound[idUser][10]++;

            clVIP:fShowMessageDhud(idUser,enMONEY);
            clVIP:fShowMessageChat(idUser,enMONEY);

        }
        case 11://AWP
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][11], iAwpRound))
                return PLUGIN_HANDLED;

            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_awp" );
            give_item(idUser,"ammo_338magnum");
            give_item(idUser,"ammo_338magnum");
            give_item(idUser,"ammo_338magnum");

            arrIsItemVipOneRound[idUser][11]++;

            clVIP:fShowMessageDhud(idUser,enAWP);
            clVIP:fShowMessageChat(idUser,enAWP);

        }
        case 12://AK47
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][12], iAk47Round))
                return PLUGIN_HANDLED;

            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_ak47");
            give_item(idUser, "ammo_762nato");
            give_item(idUser, "ammo_762nato");
            give_item(idUser, "ammo_762nato");
     
            arrIsItemVipOneRound[idUser][12]++;

            clVIP:fShowMessageDhud(idUser,enAK47);
            clVIP:fShowMessageChat(idUser,enAK47);

        }
        case 13://DEAGLE
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][13], iDeagleRound))
                return PLUGIN_HANDLED;
     
            clVIP:fStripWpnSecondary(idUser);

            give_item(idUser, "weapon_deagle");
            give_item(idUser, "ammo_50ae");
            give_item(idUser, "ammo_50ae");
            give_item(idUser, "ammo_50ae");
            give_item(idUser, "ammo_50ae");
            give_item(idUser, "ammo_50ae");

            arrIsItemVipOneRound[idUser][13]++;

            clVIP:fShowMessageDhud(idUser,enDEAGLE);
            clVIP:fShowMessageChat(idUser,enDEAGLE);

        }
        case 14://AUG
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][14], iAugRound))
                return PLUGIN_HANDLED;

            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_aug");
            give_item(idUser, "ammo_556nato");
            give_item(idUser, "ammo_556nato");
            give_item(idUser, "ammo_556nato");

            arrIsItemVipOneRound[idUser][14]++;

            clVIP:fShowMessageDhud(idUser,enAUG);
            clVIP:fShowMessageChat(idUser,enAUG);

        }
        case 15://SG552
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][15], iSg552Round))
                return PLUGIN_HANDLED;

            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_sg552");
            give_item(idUser, "ammo_556nato");
            give_item(idUser, "ammo_556nato");
            give_item(idUser, "ammo_556nato");

            arrIsItemVipOneRound[idUser][15]++;

            clVIP:fShowMessageDhud(idUser,enSG552);
            clVIP:fShowMessageChat(idUser,enSG552);

        }
        case 16://M4A1
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][16], iM4a1Round))
                return PLUGIN_HANDLED;
     
            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_m4a1");
            give_item(idUser, "ammo_556nato");
            give_item(idUser, "ammo_556nato");
            give_item(idUser, "ammo_556nato");

            arrIsItemVipOneRound[idUser][16]++;

            clVIP:fShowMessageDhud(idUser,enM4A1);
            clVIP:fShowMessageChat(idUser,enM4A1);

        }
        case 17://M249
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][17], iM249Round))
                return PLUGIN_HANDLED;
     
            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_m249");
            give_item(idUser, "ammo_556natobox");
            give_item(idUser, "ammo_556natobox");
            give_item(idUser, "ammo_556natobox");
            give_item(idUser, "ammo_556natobox");
            give_item(idUser, "ammo_556natobox");
            give_item(idUser, "ammo_556natobox");
            give_item(idUser, "ammo_556natobox");

            arrIsItemVipOneRound[idUser][17]++;

            clVIP:fShowMessageDhud(idUser,enM249);
            clVIP:fShowMessageChat(idUser,enM249);

        }
        case 18://M3
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][18], iM3Round))
                return PLUGIN_HANDLED;

            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_m3");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");

            arrIsItemVipOneRound[idUser][18]++;

            clVIP:fShowMessageDhud(idUser,enM3);
            clVIP:fShowMessageChat(idUser,enM3);

        }
        case 19://XM1014
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isActiveAllWpnRound(idUser,idMenu,idItem))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][19], iXm1014Round))
                return PLUGIN_HANDLED;

            clVIP:fStripWpnPrimary(idUser);

            give_item(idUser, "weapon_xm1014");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");
            give_item(idUser, "ammo_buckshot");

            arrIsItemVipOneRound[idUser][19]++;

            clVIP:fShowMessageDhud(idUser,enXM1014);
            clVIP:fShowMessageChat(idUser,enXM1014);

        }
        case 20://HP_ARMOR_MIN
        {
            if(!clVIP:fMenuDestroyVip(idUser,idMenu))
                return PLUGIN_HANDLED;

            if(!clVIP:isCountRoundVip(idUser,idMenu,idItem,arrIsItemVipOneRound[idUser][20], iHpArmorMinRound))
                return PLUGIN_HANDLED;

            new iMinHealth = clHP:getRaceMinHealth(idUser);
            clHP:setUserHealth(idUser,iMinHealth);
     
            new iMaxArmor = clAr:getRaceMaxArmor(idUser);
            clAr:setUserArmor(idUser,iMaxArmor);
         
            arrIsItemVipOneRound[idUser][20]++;

            clVIP:fShowMessageDhud(idUser,enHP_ARMOR_MIN);
            clVIP:fShowMessageChat(idUser,enHP_ARMOR_MIN);
        }
     
    }

    menu_destroy(idMenu);

    clVIP:fShowVipMenu(idUser,floatround(float(idItem / 7)));
 
    return PLUGIN_HANDLED;
}

public clVIP:fTeleportRespawn(const idUser, const resp_ent)
{
    new Float: ptOriginPlayer[3], Float: angles[3];

    if(!pev_valid(resp_ent))
        return;

    pev(resp_ent, pev_origin, ptOriginPlayer);
    pev(resp_ent, pev_angles, angles);
 
    Create_TE_BEAMTORUS(ptOriginPlayer, 250, arrIdSprites[SPR_ROGUE_RING], 0, 9, 5,   15,    3,    255, 255, 255,    255,  0, 0);

    new iTeam = get_user_team(idUser);

    if (iTeam == TEAM_T )
    {
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
        write_byte(TE_DLIGHT);
        engfunc(EngFunc_WriteCoord, ptOriginPlayer[0]);
        engfunc(EngFunc_WriteCoord, ptOriginPlayer[1]);
        engfunc(EngFunc_WriteCoord, ptOriginPlayer[2]);
        write_byte(50) ;
        write_byte(238); // red
        write_byte(19); // green
        write_byte(45); // blue
        write_byte(255);
        write_byte(3);
        write_byte(1);
        message_end();
    }
         
    if (iTeam == TEAM_CT )
    {
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
        write_byte(TE_DLIGHT);
        engfunc(EngFunc_WriteCoord, ptOriginPlayer[0]);
        engfunc(EngFunc_WriteCoord, ptOriginPlayer[1]);
        engfunc(EngFunc_WriteCoord, ptOriginPlayer[2]);
        write_byte(50) ;
        write_byte(19); // red
        write_byte(89); // green
        write_byte(238); // blue
        write_byte(255);
        write_byte(3);
        write_byte(1);
        message_end();
    }

    emit_sound(idUser, CHAN_WEAPON, arrStrSounds[SOUND_VENGEANCE], 1.0, ATTN_NORM, 0, PITCH_NORM);

    ExecuteHamB(Ham_CS_RoundRespawn,idUser);

    set_pev(idUser, pev_velocity, Float:{0.0, 0.0, 0.0});
    set_pev(idUser, pev_basevelocity, Float:{0.0, 0.0, 0.0});

    set_pev(idUser, pev_origin, ptOriginPlayer);
    set_pev(idUser, pev_angles, angles);
    set_pev(idUser, pev_fixangle, true);


}

bool:clVIP:isActiveAllWpnRound(const idUser,const idMenu,const idItem)
{
    if(iRoundCount < iAllWeaponsRound)
    {
        format(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_VIP_ACTIVE_WPN",iAllWeaponsRound);
        cssbChatColor(idUser,"%s%s",clVIP:fTagVip(),szMessage);

        menu_destroy(idMenu);

        clVIP:fShowVipMenu(idUser,floatround(float(idItem / 7)));
 
        return false;
    }

    return true;

}

bool:clVIP:isCountRoundVip(const idUser,const idMenu,const idItem,const iCountRoundItemVip, const iValueRoundItemVip)
{
    if(iCountRoundItemVip >= iValueRoundItemVip)
    {
        format(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_VIP_COUNT_ROUND",iValueRoundItemVip);
        cssbChatColor(idUser,"%s%s",clVIP:fTagVip(),szMessage);

        menu_destroy(idMenu);

        clVIP:fShowVipMenu(idUser,floatround(float(idItem / 7)));
 
        return false;
    }

    return true;

}


//Закрытие меню если выбран пункт который не должен срабатывать если игрок жив
bool:clVIP:fMenuDestroyVip(const idUser,const idMenu)
{
    if (!WC3_Check())
        return false;

    if(!is_user_alive(idUser) || !is_user_connected(idUser))
    {
        format(szMessage, charsmax(szMessage), "%L",LANG_PLAYER,"CLIENT_PRINT_VIP_NO_ALIVE");
        cssbChatColor(idUser,"%s%s",clVIP:fTagVip(),szMessage);

        menu_destroy(idMenu);
        return false;
    }

    return true;
}

//Удаление всех автоматов
public clVIP:fStripWpnPrimary(const idUser)
{
    //Benneli M3 Super90
    ham_strip_weapon(idUser,"weapon_m3");

    //Benneli XM1014
    ham_strip_weapon(idUser,"weapon_xm1014");

    //H&K MP5-Navy
    ham_strip_weapon(idUser,"weapon_mp5navy");

    //Steyr Tactical
    ham_strip_weapon(idUser,"weapon_tmp");

    //FN P90
    ham_strip_weapon(idUser,"weapon_p90");

    //Ingram MAC-10
    ham_strip_weapon(idUser,"weapon_mac10");

    //IDF Defender
    ham_strip_weapon(idUser,"weapon_galil");

    //Clarion 5.56
    ham_strip_weapon(idUser,"weapon_famas");

    //H&K UMP
    ham_strip_weapon(idUser,"weapon_ump45");

    //AK-47
    ham_strip_weapon(idUser,"weapon_ak47");

     //Colt M4A1 Carbine
    ham_strip_weapon(idUser,"weapon_m4a1");

    //Steyr AUG
    ham_strip_weapon(idUser,"weapon_aug");

    //Sig SG-552 Commando
    ham_strip_weapon(idUser,"weapon_sg552");

    //Steyr Scout
    ham_strip_weapon(idUser,"weapon_scout");

    //AI Arctic Warfare/Magnum
    ham_strip_weapon(idUser,"weapon_awp");

    //H&K G3/SG-1
    ham_strip_weapon(idUser,"weapon_g3sg1");

    //Sig SG-550 Sniper
    ham_strip_weapon(idUser,"weapon_sig550");

    //FN M249 Para
    ham_strip_weapon(idUser,"weapon_m249");

}

//Удаление всех пистолетов
public clVIP:fStripWpnSecondary(const idUser)
{
    //H&K USP .45 Tactical
    ham_strip_weapon(idUser,"weapon_usp");

    //Glock 18 Select Fire
    ham_strip_weapon(idUser,"weapon_glock18");

    //Desert Eagle .50 AE
    ham_strip_weapon(idUser,"weapon_deagle");

    //SIG P228
    ham_strip_weapon(idUser,"weapon_p228");

    //Dual Beretta 96G
    ham_strip_weapon(idUser,"weapon_elite");

    //FN Five-Seven
    ham_strip_weapon(idUser,"weapon_fiveseven");

}

//Сброс всех счетчиков на ограничение взятия предмета
public clVIP:fLimitItemVipOneRound(const idUser)
{
 
    arrIsItemVipOneRound[idUser][0] = 0;
    arrIsItemVipOneRound[idUser][1] = 0;
    arrIsItemVipOneRound[idUser][2] = 0;
    arrIsItemVipOneRound[idUser][3] = 0;
    arrIsItemVipOneRound[idUser][4] = 0;
    arrIsItemVipOneRound[idUser][5] = 0;
    arrIsItemVipOneRound[idUser][6] = 0;
    arrIsItemVipOneRound[idUser][7] = 0;
    arrIsItemVipOneRound[idUser][8] = 0;
    arrIsItemVipOneRound[idUser][9] = 0;
    arrIsItemVipOneRound[idUser][10] = 0;
    arrIsItemVipOneRound[idUser][11] = 0;
    arrIsItemVipOneRound[idUser][12] = 0;
    arrIsItemVipOneRound[idUser][13] = 0;
    arrIsItemVipOneRound[idUser][14] = 0;
    arrIsItemVipOneRound[idUser][15] = 0;
    arrIsItemVipOneRound[idUser][16] = 0;
    arrIsItemVipOneRound[idUser][17] = 0;
    arrIsItemVipOneRound[idUser][18] = 0;
    arrIsItemVipOneRound[idUser][19] = 0;
    arrIsItemVipOneRound[idUser][20] = 0;

}

Заранее благодарен!
 
Последнее редактирование:
Сообщения
264
Реакции
14
Nordic Warrior Не лучше ли сделать это таким образом?
Код:
#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_plugin("[ReAPI] Parachute", "1.1", "ReHLDS Team");
    RegisterHookChain(RG_PM_AirMove, "PM_AirMove", false);
}

public PM_AirMove(const playerIndex)
{
    if ((get_entvar(playerIndex, var_button) & IN_USE) && (get_entvar(playerIndex, var_waterlevel) == 0))
    {
        new Float:flVelocity[3];
        get_entvar(playerIndex, var_velocity, flVelocity);

        if (flVelocity[2] < 0.0)
        {
           flVelocity[2] = min(flVelocity[2] + 40.0, -100.0);
            set_entvar(playerIndex, var_sequence, ACT_WALK);
            set_entvar(playerIndex, var_gaitsequence, ACT_IDLE);
            set_pmove(pm_velocity, flVelocity);
        }
    }
}
 
Последнее редактирование:
Сообщения
657
Реакции
562
Предупреждения
8
Помог
9 раз(а)
pmadisson75, не лучше. Тк никакой разницы нет
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу