Page 1 of 1

isejus is buy zone meniu blokuojamas

Posted: 2019 May 14 21:55
by laimiukas3
Sveiki, gal kas galite padeti susitvarkyti meniu kad isejus zaidejui is buy zonos blokuotu ta meniu (ISJUNGIA)

kazkip turbut su sitais tai daroma

Code: Select all

register_event("StatusIcon", "Event_StatusIcon_Show_buyzone", "be", "1=1", "2=buyzone");register_event("StatusIcon", "StatusIcon_buyzone_OFF", "be", "1=0", "2=buyzone");register_event( "StatusIcon", "CloseOpenedMenu", "b", "1=0", "2=buyzone" )
vip meniu sma

Code: Select all

#include <amxmodx>#include <reapi>#include <vip_system> #define ADMIN_LOADER #pragma semicolon 1new const MenuKey = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<9); enum _:cvars {    AUTO_MENU,    GIVE_ITEMS,    WEAPONSRND,    AWPM249RND,    SHOP,    SHOP_RND}; new iPistol[MAX_CLIENTS+1], bool:g_bUsePistol, bool:g_bUseWeapon[MAX_CLIENTS+1]; static sItems[10];new pCvar[cvars], pCvarCfg[cvars];new g_iRound; public plugin_init() {    register_plugin("[ReVIP] Menu", VIP_SYSTEM_VERSION, "pUzzlik");    register_dictionary("vip_system.txt");     //    auto open vip menu 1 - on, 0 - off    pCvar[AUTO_MENU] = register_cvar("open_menu_spawn", "0");    /*        flags items        a - armor        d - defuse        f - flashbang        h - hegranade        p - pistol        s - smoke    */    pCvar[GIVE_ITEMS] = register_cvar("give_items", "adfhps");    //    which is available with a round primary weapons    pCvar[WEAPONSRND] = register_cvar("primary_weapons_rnd", "2");    //    which is available with a round primary weapons    pCvar[AWPM249RND] = register_cvar("heavy_weapons_rnd", "4");    //    if you want to use a custom shop, (1 - enable)    pCvar[SHOP] = register_cvar("use_custom_shop", "1");    //    with round displayed shop menu    pCvar[SHOP_RND] = register_cvar("custom_shop_block_rnd", "2");     register_clcmd("vipmenu", "ShowMenu");    register_clcmd("say /vipmenu", "ShowMenu");    register_clcmd("say_team /vipmenu", "ShowMenu");     register_clcmd("say", "hook_say");    register_clcmd("say_team", "hook_say");     register_menucmd(register_menuid("Vip Menu"), MenuKey, "MenuHandler");} public plugin_cfg() {    get_pcvar_string(pCvar[GIVE_ITEMS],sItems,charsmax(sItems)); trim(sItems);    pCvarCfg[WEAPONSRND] = get_pcvar_num(pCvar[WEAPONSRND]);    pCvarCfg[AWPM249RND] = get_pcvar_num(pCvar[AWPM249RND]);    pCvarCfg[AUTO_MENU] = get_pcvar_num(pCvar[AUTO_MENU]);    pCvarCfg[SHOP] = get_pcvar_num(pCvar[SHOP]);    pCvarCfg[SHOP_RND] = get_pcvar_num(pCvar[SHOP_RND]);} public vip_core_restart_round(round) {    arrayset(g_bUseWeapon, false, sizeof(g_bUseWeapon));    g_iRound = round;} public vip_core_player_spawn(const id) {    if(core_is_bonus_spawn(id)) {        for(new i, str_len = strlen(sItems); i < str_len ; i++) {            switch(sItems[i]){                case 'a': rg_set_user_armor(id, 100, ARMOR_VESTHELM);                case 'd': {                    new TeamName:team = get_member(id, m_iTeam);                    if(team == TEAM_CT) rg_give_defusekit (id, true);                }                case 'f': {                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                }                case 'h': rg_give_item(id, "weapon_hegrenade", GT_APPEND);                case 'p': {                    switch(iPistol[id]) {                        case 0: { rg_give_item(id, "weapon_deagle", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_DEAGLE, 35); }                        case 1: { rg_give_item(id, "weapon_usp", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_USP, 100); }                        case 2: { rg_give_item(id, "weapon_glock18", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_GLOCK18, 120); }                    }                    g_bUsePistol = true;                }                case 's': rg_give_item(id, "weapon_smokegrenade", GT_APPEND);            }        }         if(pCvarCfg[AUTO_MENU] && g_iRound >= pCvarCfg[WEAPONSRND]) ShowMenu(id);    }} public hook_say(id) {    static szMsg[32]; read_args(szMsg, charsmax(szMsg)); remove_quotes(szMsg);    static const szChoosedWP[][] = { "/ak47", "/m4a1", "/famas", "/awp", "/b51" };     for(new a; a < sizeof szChoosedWP; a++) {        if(!strcmp(szMsg, szChoosedWP[a])) {            if(!core_is_allow_use(id)) break;            return MenuHandler(id, a);        }    }    return PLUGIN_CONTINUE;} public ShowMenu(id) {    if(!core_is_allow_use(id)) return PLUGIN_HANDLED;     new szMenu[512], key; key = MENU_KEY_0;    new iLen, szName[16]; get_entvar(id, var_netname, szName, charsmax(szName));       iLen = formatex(szMenu, charsmax(szMenu), "\r%L \w[\d%L\w]^n\w%L^n", LANG_SERVER, "MENU_NAME", LANG_SERVER, "NAME_SERVER", LANG_SERVER, "WELCOME", szName);     #if defined ADMIN_LOADER        new exp = admin_expired(id);        if(exp > 0) {            new sys = get_systime();            if((exp - sys) / 86400 > 0)    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\ywill expired: \w%d d.!^n^n", (exp - sys) / 86400);        } else if(exp == 0) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n^n", LANG_SERVER, "VIP_EXPIRED_PRMANENT");    #else        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n");    #endif     new szUseWpn[2]; formatex(szUseWpn, charsmax(szUseWpn), "%s", g_bUseWeapon[id] ? "d" : "w");     if(g_iRound < pCvarCfg[WEAPONSRND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \d%L \r%L^n\r2. \d%L \r%L^n\r3. \d%L \r%L^n", LANG_SERVER, "AK47", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "M4A1", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "FAMAS", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND]);    else {        key |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \%s%L^n\r2. \%s%L^n\r3. \%s%L^n", szUseWpn, LANG_SERVER, "AK47", szUseWpn, LANG_SERVER, "M4A1", szUseWpn, LANG_SERVER, "FAMAS");    }     if(g_iRound < pCvarCfg[AWPM249RND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \d%L \r%L^n\r5. \d%L \r%L^n^n", LANG_SERVER, "AWP", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND], LANG_SERVER, "GALIL", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND]);    else {        key |= MENU_KEY_4|MENU_KEY_5;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \%s%L^n\r5. \%s%L^n^n", szUseWpn, LANG_SERVER, "AWP", szUseWpn, LANG_SERVER, "GALIL");    }     if(g_bUsePistol) {        key |= MENU_KEY_6;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6. %L \r[\w%s\r]^n", LANG_SERVER, "PISTOL", iPistol[id] == 0 ? "Deagle" : iPistol[id] == 1 ? "USP" : "Glock");    }    formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r0. %L", LANG_SERVER, "EXIT");     set_member(id, m_iMenu, Menu_OFF);    return show_menu(id, key, szMenu, -1, "Vip Menu");} public MenuHandler(id, key) {    if(key <= 4) {        /***    Защита от дурака    ***/        if(g_iRound < pCvarCfg[WEAPONSRND]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "PISTOLS_ROUND");        /***    End        ***/        if(g_bUseWeapon[id]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "ALREDY_WEAPON_RND");        g_bUseWeapon[id] = true;               static const szChoosedBP[] = { 90, 90, 90, 30, 90 };        static const szChoosedWP[][] = { "weapon_ak47", "weapon_m4a1", "weapon_famas", "weapon_awp", "weapon_galil" };               return rg_give_items(id, szChoosedWP[key], szChoosedBP[key]);    }    else if (key == 5) GivePistol(id);    return PLUGIN_HANDLED;} public GivePistol(id) {    iPistol[id] >= 2 ? (iPistol[id] = 0) : iPistol[id]++;    ShowMenu(id);    return PLUGIN_HANDLED;} stock rg_give_items(id, currWeaponName[], ammoAmount) {    rg_drop_items_by_slot(id, PRIMARY_WEAPON_SLOT);     rg_give_item(id, currWeaponName, GT_APPEND);    rg_set_user_bpammo(id, rg_get_weapon_info(currWeaponName, WI_ID), ammoAmount);     engclient_cmd(id, currWeaponName);    return PLUGIN_HANDLED;}

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 May 24 08:39
by Molvas
galima ikelti koda, kad tiesiog po keliu sec užsidarytu ir tiek, tarkim po 5sec.

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 May 24 11:50
by laimiukas3
Molvas wrote:galima ikelti koda, kad tiesiog po keliu sec užsidarytu ir tiek, tarkim po 5sec.
zianu kad galima bet as to nenoriu. noriu buten taip kaip parasiau :2D:

Code: Select all

#include <amxmodx>#include <cstrike>#include <amxmisc>#include <reapi>#include <vip_system>  #pragma semicolon 1enum _:cvars { FLAG_DEF, FLAG, VIPMENU, BLOCKBONUS };new pCvar[cvars], g_Flags[cvars], g_iMenuRnd, g_iBonusRnd; enum _:fwd { FWD_SPAWN, FWD_RESTART };new g_fwdFunction[fwd];new g_iRound; new HookChain:HookSpawn; public plugin_natives() {    register_library(VIP_SYSTEM_VERSION);    register_native("get_flag_access_def", "native_flag_access_def", 1);    register_native("get_flag_access", "native_flag_access", 1);    register_native("get_round_num", "native_round_num", 1);    register_native("get_block_maps", "native_block_maps", 1);    register_native("core_is_bonus_spawn", "native_bonus_spawn", 1);    register_native("core_is_allow_use", "native_allow_use", 1);} public native_flag_access_def(id){    if(is_user_connected(id) && get_user_flags(id) & g_Flags[FLAG_DEF]) return true;    return false;} public native_flag_access(id){    if(is_user_connected(id) && get_user_flags(id) & g_Flags[FLAG]) return true;    return false;} public native_round_num()    return g_iRound;    public native_block_maps() {    new szDisabledFile[64];    get_configsdir(szDisabledFile, charsmax(szDisabledFile));    formatex(szDisabledFile, charsmax(szDisabledFile), "%s/vip_disabled_maps.cfg", szDisabledFile);     if(file_exists(szDisabledFile)) {        new iLineNum, szData[64], iTextLen;        new szMapName[64]; rh_get_mapname(szMapName, charsmax(szMapName));         while(read_file(szDisabledFile, iLineNum, szData, charsmax(szData), iTextLen)) {            if(containi(szMapName, szData) != -1) return true;            iLineNum++;        }    }    return false;}    public native_bonus_spawn(id) {    if(!is_user_alive(id)) return false;    if(get_block_maps()) return false;    if(!get_flag_access_def(id)) return false;    return true;}    public native_allow_use(id) {    if(!is_user_alive(id)) {        client_print_color(id, -2, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "VIP_ALIVE");        return false;    }    if(get_block_maps()) {        client_print_color(id, -2, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "BLOCK_MAPS");        return false;    }    if(!get_flag_access_def(id)) {        client_print_color(id, -2, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "ONLY_VIP");        return false;    }    if(g_iMenuRnd > g_iRound) {        client_print_color(id, -2, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "WARMUP_ROUND");        return false;    }    if(!cs_get_user_buyzone(id)) {        client_print_color(id, -2, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "BUY_ZONE");        return false;    }    return true;} public plugin_init() {    register_plugin("[ReVIP] System Core", VIP_SYSTEM_VERSION, "pUzzlik");    register_dictionary("vip_system.txt");     //  flag access def. t    pCvar[FLAG_DEF] = register_cvar("access_flag_vip", "t");    //  flag access (def. g)    pCvar[FLAG] = register_cvar("other_access_flag", "m");    //  with round displayed vip menu    pCvar[VIPMENU] = register_cvar("display_menu_rnd", "2");    //  with round enable forward spawn player    pCvar[BLOCKBONUS] = register_cvar("spawn_player_block", "2");     g_fwdFunction[FWD_RESTART] = CreateMultiForward("vip_core_restart_round", ET_IGNORE, FP_CELL);    g_fwdFunction[FWD_SPAWN] = CreateMultiForward("vip_core_player_spawn", ET_IGNORE, FP_CELL);     RegisterHookChain(RG_RoundEnd, "RoundEnd", true);    RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound_Pre");    DisableHookChain(HookSpawn = RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn", true));        new szFileCfg[64];    get_configsdir(szFileCfg, charsmax(szFileCfg));    formatex(szFileCfg, charsmax(szFileCfg), "%s/vip_system.cfg", szFileCfg);    if(file_exists(szFileCfg)) server_cmd("exec %s", szFileCfg);} public plugin_cfg() {    new sFlagDef[10]; get_pcvar_string(pCvar[FLAG_DEF], sFlagDef, charsmax(sFlagDef));    new sFlag[10]; get_pcvar_string(pCvar[FLAG], sFlag, charsmax(sFlag));    g_Flags[FLAG_DEF] = read_flags(sFlagDef);    g_Flags[FLAG] = read_flags(sFlag);    g_iMenuRnd = get_pcvar_num(pCvar[VIPMENU]);    g_iBonusRnd = get_pcvar_num(pCvar[BLOCKBONUS]);} public RoundEnd(WinStatus:status, ScenarioEventEndRound:event) {    if(event == ROUND_GAME_COMMENCE || event == ROUND_GAME_RESTART) {        g_iRound = 0;        DisableHookChain(HookSpawn);    }} public CSGameRules_RestartRound_Pre() {    g_iRound++;     new Result;    ExecuteForward(g_fwdFunction[FWD_RESTART], Result, g_iRound);    if(g_iRound == g_iBonusRnd) EnableHookChain(HookSpawn);} public CBasePlayer_Spawn(const id) {    new Result;    ExecuteForward(g_fwdFunction[FWD_SPAWN], Result, id);}
nelabai supranyu kodel nekompiliuoja :facepalms:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// re_vip_core.sma
//
// C:\Users\Lina\Desktop\scripting\scripting\re_vip_core.sma(80) : error 017: un
defined symbol "cs_get_user_buyzone"
//
// 1 Error.
// Could not locate output file C:\Users\Lina\Desktop\scripting\scripting\compil
ed\re_vip_core.amx (compile failed).
//
// Compilation Time: 0,47 sec
// ----------------------------------------

Press enter to exit ...

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 May 25 20:29
by Molvas
nesupranta cs_get_user_buyzone kas per dalykas

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 May 26 07:17
by laimiukas3
Molvas wrote:nesupranta cs_get_user_buyzone kas per dalykas
tai va ir nesuprantu cstrike includa pridejas jugi

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 Jun 01 00:19
by likux35
laimiukas3 wrote:Sveiki, gal kas galite padeti susitvarkyti meniu kad isejus zaidejui is buy zonos blokuotu ta meniu (ISJUNGIA)

kazkip turbut su sitais tai daroma

Code: Select all

register_event("StatusIcon", "Event_StatusIcon_Show_buyzone", "be", "1=1", "2=buyzone");register_event("StatusIcon", "StatusIcon_buyzone_OFF", "be", "1=0", "2=buyzone");register_event( "StatusIcon", "CloseOpenedMenu", "b", "1=0", "2=buyzone" )
vip meniu sma

Code: Select all

#include <amxmodx>#include <reapi>#include <vip_system> #define ADMIN_LOADER #pragma semicolon 1new const MenuKey = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<9); enum _:cvars {    AUTO_MENU,    GIVE_ITEMS,    WEAPONSRND,    AWPM249RND,    SHOP,    SHOP_RND}; new iPistol[MAX_CLIENTS+1], bool:g_bUsePistol, bool:g_bUseWeapon[MAX_CLIENTS+1]; static sItems[10];new pCvar[cvars], pCvarCfg[cvars];new g_iRound; public plugin_init() {    register_plugin("[ReVIP] Menu", VIP_SYSTEM_VERSION, "pUzzlik");    register_dictionary("vip_system.txt");     //    auto open vip menu 1 - on, 0 - off    pCvar[AUTO_MENU] = register_cvar("open_menu_spawn", "0");    /*        flags items        a - armor        d - defuse        f - flashbang        h - hegranade        p - pistol        s - smoke    */    pCvar[GIVE_ITEMS] = register_cvar("give_items", "adfhps");    //    which is available with a round primary weapons    pCvar[WEAPONSRND] = register_cvar("primary_weapons_rnd", "2");    //    which is available with a round primary weapons    pCvar[AWPM249RND] = register_cvar("heavy_weapons_rnd", "4");    //    if you want to use a custom shop, (1 - enable)    pCvar[SHOP] = register_cvar("use_custom_shop", "1");    //    with round displayed shop menu    pCvar[SHOP_RND] = register_cvar("custom_shop_block_rnd", "2");     register_clcmd("vipmenu", "ShowMenu");    register_clcmd("say /vipmenu", "ShowMenu");    register_clcmd("say_team /vipmenu", "ShowMenu");     register_clcmd("say", "hook_say");    register_clcmd("say_team", "hook_say");     register_menucmd(register_menuid("Vip Menu"), MenuKey, "MenuHandler");} public plugin_cfg() {    get_pcvar_string(pCvar[GIVE_ITEMS],sItems,charsmax(sItems)); trim(sItems);    pCvarCfg[WEAPONSRND] = get_pcvar_num(pCvar[WEAPONSRND]);    pCvarCfg[AWPM249RND] = get_pcvar_num(pCvar[AWPM249RND]);    pCvarCfg[AUTO_MENU] = get_pcvar_num(pCvar[AUTO_MENU]);    pCvarCfg[SHOP] = get_pcvar_num(pCvar[SHOP]);    pCvarCfg[SHOP_RND] = get_pcvar_num(pCvar[SHOP_RND]);} public vip_core_restart_round(round) {    arrayset(g_bUseWeapon, false, sizeof(g_bUseWeapon));    g_iRound = round;} public vip_core_player_spawn(const id) {    if(core_is_bonus_spawn(id)) {        for(new i, str_len = strlen(sItems); i < str_len ; i++) {            switch(sItems[i]){                case 'a': rg_set_user_armor(id, 100, ARMOR_VESTHELM);                case 'd': {                    new TeamName:team = get_member(id, m_iTeam);                    if(team == TEAM_CT) rg_give_defusekit (id, true);                }                case 'f': {                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                }                case 'h': rg_give_item(id, "weapon_hegrenade", GT_APPEND);                case 'p': {                    switch(iPistol[id]) {                        case 0: { rg_give_item(id, "weapon_deagle", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_DEAGLE, 35); }                        case 1: { rg_give_item(id, "weapon_usp", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_USP, 100); }                        case 2: { rg_give_item(id, "weapon_glock18", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_GLOCK18, 120); }                    }                    g_bUsePistol = true;                }                case 's': rg_give_item(id, "weapon_smokegrenade", GT_APPEND);            }        }         if(pCvarCfg[AUTO_MENU] && g_iRound >= pCvarCfg[WEAPONSRND]) ShowMenu(id);    }} public hook_say(id) {    static szMsg[32]; read_args(szMsg, charsmax(szMsg)); remove_quotes(szMsg);    static const szChoosedWP[][] = { "/ak47", "/m4a1", "/famas", "/awp", "/b51" };     for(new a; a < sizeof szChoosedWP; a++) {        if(!strcmp(szMsg, szChoosedWP[a])) {            if(!core_is_allow_use(id)) break;            return MenuHandler(id, a);        }    }    return PLUGIN_CONTINUE;} public ShowMenu(id) {    if(!core_is_allow_use(id)) return PLUGIN_HANDLED;     new szMenu[512], key; key = MENU_KEY_0;    new iLen, szName[16]; get_entvar(id, var_netname, szName, charsmax(szName));       iLen = formatex(szMenu, charsmax(szMenu), "\r%L \w[\d%L\w]^n\w%L^n", LANG_SERVER, "MENU_NAME", LANG_SERVER, "NAME_SERVER", LANG_SERVER, "WELCOME", szName);     #if defined ADMIN_LOADER        new exp = admin_expired(id);        if(exp > 0) {            new sys = get_systime();            if((exp - sys) / 86400 > 0)    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\ywill expired: \w%d d.!^n^n", (exp - sys) / 86400);        } else if(exp == 0) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n^n", LANG_SERVER, "VIP_EXPIRED_PRMANENT");    #else        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n");    #endif     new szUseWpn[2]; formatex(szUseWpn, charsmax(szUseWpn), "%s", g_bUseWeapon[id] ? "d" : "w");     if(g_iRound < pCvarCfg[WEAPONSRND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \d%L \r%L^n\r2. \d%L \r%L^n\r3. \d%L \r%L^n", LANG_SERVER, "AK47", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "M4A1", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "FAMAS", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND]);    else {        key |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \%s%L^n\r2. \%s%L^n\r3. \%s%L^n", szUseWpn, LANG_SERVER, "AK47", szUseWpn, LANG_SERVER, "M4A1", szUseWpn, LANG_SERVER, "FAMAS");    }     if(g_iRound < pCvarCfg[AWPM249RND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \d%L \r%L^n\r5. \d%L \r%L^n^n", LANG_SERVER, "AWP", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND], LANG_SERVER, "GALIL", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND]);    else {        key |= MENU_KEY_4|MENU_KEY_5;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \%s%L^n\r5. \%s%L^n^n", szUseWpn, LANG_SERVER, "AWP", szUseWpn, LANG_SERVER, "GALIL");    }     if(g_bUsePistol) {        key |= MENU_KEY_6;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6. %L \r[\w%s\r]^n", LANG_SERVER, "PISTOL", iPistol[id] == 0 ? "Deagle" : iPistol[id] == 1 ? "USP" : "Glock");    }    formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r0. %L", LANG_SERVER, "EXIT");     set_member(id, m_iMenu, Menu_OFF);    return show_menu(id, key, szMenu, -1, "Vip Menu");} public MenuHandler(id, key) {    if(key <= 4) {        /***    Защита от дурака    ***/        if(g_iRound < pCvarCfg[WEAPONSRND]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "PISTOLS_ROUND");        /***    End        ***/        if(g_bUseWeapon[id]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "ALREDY_WEAPON_RND");        g_bUseWeapon[id] = true;               static const szChoosedBP[] = { 90, 90, 90, 30, 90 };        static const szChoosedWP[][] = { "weapon_ak47", "weapon_m4a1", "weapon_famas", "weapon_awp", "weapon_galil" };               return rg_give_items(id, szChoosedWP[key], szChoosedBP[key]);    }    else if (key == 5) GivePistol(id);    return PLUGIN_HANDLED;} public GivePistol(id) {    iPistol[id] >= 2 ? (iPistol[id] = 0) : iPistol[id]++;    ShowMenu(id);    return PLUGIN_HANDLED;} stock rg_give_items(id, currWeaponName[], ammoAmount) {    rg_drop_items_by_slot(id, PRIMARY_WEAPON_SLOT);     rg_give_item(id, currWeaponName, GT_APPEND);    rg_set_user_bpammo(id, rg_get_weapon_info(currWeaponName, WI_ID), ammoAmount);     engclient_cmd(id, currWeaponName);    return PLUGIN_HANDLED;}
Iš mobiliojo rašau, tai šiek tiek sunkiau. Jeigu netiks, ryt pažiūrėsiu per PC. Man kažkada yra panaši situacija atsitikus dėl eiliškumo:

Problema :

Code: Select all

 #include <amxmodx>#include <cstrike>#include <amxmisc> 
Sprendimas
--->

Code: Select all

 #include <amxmodx>#include <amxmisc>#include <cstrike> 

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 Jun 01 10:40
by laimiukas3
jo sukompilevo negalvojau kad dar eiliskumas yra kazkoks
bet neveikia vistiek del to buy zone meniu uzdarimo

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 Jun 01 18:06
by likux35
laimiukas3 wrote:jo sukompilevo negalvojau kad dar eiliskumas yra kazkoks
bet neveikia vistiek del to buy zone meniu uzdarimo
Peržiūrėjau source ir matau, kad ten ant natives bandyta kažką raizgaliot, bet visiškai tas nebūtina, tai labai ir nesigilinau. :D
Į vip_system.txt data/lang file prisidek tik : BUY_ZONE_MENU_OFF

Code: Select all

BUY_ZONE_MENU_OFF = Atsiprasome, pirkimo zonoje VIP menu neveikia.
P.s netestavau, jeigu neveiks, pranešk :D

SMA VIP apačioje :

Code: Select all

#include <amxmodx>#include <cstrike>#include <reapi>#include <vip_system> #define ADMIN_LOADER #pragma semicolon 1new const MenuKey = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<9); enum _:cvars {    AUTO_MENU,    GIVE_ITEMS,    WEAPONSRND,    AWPM249RND,    SHOP,    SHOP_RND}; new iPistol[MAX_CLIENTS+1], bool:g_bUsePistol, bool:g_bUseWeapon[MAX_CLIENTS+1]; static sItems[10];new pCvar[cvars], pCvarCfg[cvars];new g_iRound; public plugin_init() {    register_plugin("[ReVIP] Menu", VIP_SYSTEM_VERSION, "pUzzlik");    register_dictionary("vip_system.txt");     //    auto open vip menu 1 - on, 0 - off    pCvar[AUTO_MENU] = register_cvar("open_menu_spawn", "0");    /*        flags items        a - armor        d - defuse        f - flashbang        h - hegranade        p - pistol        s - smoke    */    pCvar[GIVE_ITEMS] = register_cvar("give_items", "adfhps");    //    which is available with a round primary weapons    pCvar[WEAPONSRND] = register_cvar("primary_weapons_rnd", "2");    //    which is available with a round primary weapons    pCvar[AWPM249RND] = register_cvar("heavy_weapons_rnd", "4");    //    if you want to use a custom shop, (1 - enable)    pCvar[SHOP] = register_cvar("use_custom_shop", "1");    //    with round displayed shop menu    pCvar[SHOP_RND] = register_cvar("custom_shop_block_rnd", "2");     register_clcmd("vipmenu", "ShowMenu");    register_clcmd("say /vipmenu", "ShowMenu");    register_clcmd("say_team /vipmenu", "ShowMenu");     register_clcmd("say", "hook_say");    register_clcmd("say_team", "hook_say");     register_menucmd(register_menuid("Vip Menu"), MenuKey, "MenuHandler");} public plugin_cfg() {    get_pcvar_string(pCvar[GIVE_ITEMS],sItems,charsmax(sItems)); trim(sItems);    pCvarCfg[WEAPONSRND] = get_pcvar_num(pCvar[WEAPONSRND]);    pCvarCfg[AWPM249RND] = get_pcvar_num(pCvar[AWPM249RND]);    pCvarCfg[AUTO_MENU] = get_pcvar_num(pCvar[AUTO_MENU]);    pCvarCfg[SHOP] = get_pcvar_num(pCvar[SHOP]);    pCvarCfg[SHOP_RND] = get_pcvar_num(pCvar[SHOP_RND]);} public vip_core_restart_round(round) {    arrayset(g_bUseWeapon, false, sizeof(g_bUseWeapon));    g_iRound = round;} public vip_core_player_spawn(const id) {    if(core_is_bonus_spawn(id)) {        for(new i, str_len = strlen(sItems); i < str_len ; i++) {            switch(sItems[i]){                case 'a': rg_set_user_armor(id, 100, ARMOR_VESTHELM);                case 'd': {                    new TeamName:team = get_member(id, m_iTeam);                    if(team == TEAM_CT) rg_give_defusekit (id, true);                }                case 'f': {                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                }                case 'h': rg_give_item(id, "weapon_hegrenade", GT_APPEND);                case 'p': {                    switch(iPistol[id]) {                        case 0: { rg_give_item(id, "weapon_deagle", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_DEAGLE, 35); }                        case 1: { rg_give_item(id, "weapon_usp", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_USP, 100); }                        case 2: { rg_give_item(id, "weapon_glock18", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_GLOCK18, 120); }                    }                    g_bUsePistol = true;                }                case 's': rg_give_item(id, "weapon_smokegrenade", GT_APPEND);            }        }         if(pCvarCfg[AUTO_MENU] && g_iRound >= pCvarCfg[WEAPONSRND]) ShowMenu(id);    }} public hook_say(id) {    static szMsg[32]; read_args(szMsg, charsmax(szMsg)); remove_quotes(szMsg);    static const szChoosedWP[][] = { "/ak47", "/m4a1", "/famas", "/awp", "/b51" };     for(new a; a < sizeof szChoosedWP; a++) {        if(!strcmp(szMsg, szChoosedWP[a])) {            if(!core_is_allow_use(id)) break;            return MenuHandler(id, a);        }    }    return PLUGIN_CONTINUE;} public ShowMenu(id) {     if(!(cs_get_user_buyzone(id)))     {        print_colorchat(id, "!g[!tVIP!g] !y%L", LANG_PLAYER, "BUY_ZONE_MENU_OFF");        return PLUGIN_HANDLED;    }     new szMenu[512], key; key = MENU_KEY_0;    new iLen, szName[16]; get_entvar(id, var_netname, szName, charsmax(szName));       iLen = formatex(szMenu, charsmax(szMenu), "\r%L \w[\d%L\w]^n\w%L^n", LANG_SERVER, "MENU_NAME", LANG_SERVER, "NAME_SERVER", LANG_SERVER, "WELCOME", szName);     #if defined ADMIN_LOADER        new exp = admin_expired(id);        if(exp > 0) {            new sys = get_systime();            if((exp - sys) / 86400 > 0)    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\ywill expired: \w%d d.!^n^n", (exp - sys) / 86400);        } else if(exp == 0) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n^n", LANG_SERVER, "VIP_EXPIRED_PRMANENT");    #else        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n");    #endif     new szUseWpn[2]; formatex(szUseWpn, charsmax(szUseWpn), "%s", g_bUseWeapon[id] ? "d" : "w");     if(g_iRound < pCvarCfg[WEAPONSRND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \d%L \r%L^n\r2. \d%L \r%L^n\r3. \d%L \r%L^n", LANG_SERVER, "AK47", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "M4A1", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "FAMAS", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND]);    else {        key |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \%s%L^n\r2. \%s%L^n\r3. \%s%L^n", szUseWpn, LANG_SERVER, "AK47", szUseWpn, LANG_SERVER, "M4A1", szUseWpn, LANG_SERVER, "FAMAS");    }     if(g_iRound < pCvarCfg[AWPM249RND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \d%L \r%L^n\r5. \d%L \r%L^n^n", LANG_SERVER, "AWP", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND], LANG_SERVER, "GALIL", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND]);    else {        key |= MENU_KEY_4|MENU_KEY_5;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \%s%L^n\r5. \%s%L^n^n", szUseWpn, LANG_SERVER, "AWP", szUseWpn, LANG_SERVER, "GALIL");    }     if(g_bUsePistol) {        key |= MENU_KEY_6;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6. %L \r[\w%s\r]^n", LANG_SERVER, "PISTOL", iPistol[id] == 0 ? "Deagle" : iPistol[id] == 1 ? "USP" : "Glock");    }    formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r0. %L", LANG_SERVER, "EXIT");     set_member(id, m_iMenu, Menu_OFF);    return show_menu(id, key, szMenu, -1, "Vip Menu");} public MenuHandler(id, key) {    if(key <= 4) {        /***    Защита от дурака    ***/        if(g_iRound < pCvarCfg[WEAPONSRND]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "PISTOLS_ROUND");        /***    End        ***/        if(g_bUseWeapon[id]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "ALREDY_WEAPON_RND");        g_bUseWeapon[id] = true;               static const szChoosedBP[] = { 90, 90, 90, 30, 90 };        static const szChoosedWP[][] = { "weapon_ak47", "weapon_m4a1", "weapon_famas", "weapon_awp", "weapon_galil" };               return rg_give_items(id, szChoosedWP[key], szChoosedBP[key]);    }    else if (key == 5) GivePistol(id);    return PLUGIN_HANDLED;} public GivePistol(id) {    iPistol[id] >= 2 ? (iPistol[id] = 0) : iPistol[id]++;    ShowMenu(id);    return PLUGIN_HANDLED;} /*========================*//*=========STOCKS=========*//*========================*/ stock print_colorchat(const id, const input[], any:...){    new count = 1, players[32];    static msg[191];    vformat(msg,190,input,3);    replace_all(msg,190,"!g","^4");// green txt    replace_all(msg,190,"!y","^1");// orange txt    replace_all(msg,190,"!t","^3");// team txt    replace_all(msg,190,"!w","^0");// team txt    if (id) players[0] = id; else get_players(players,count,"ch");    for (new i=0;i<count;i++)        if (is_user_connected(players[i]))        {            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);            write_byte(players[i]);            write_string(msg);            message_end();        }} stock rg_give_items(id, currWeaponName[], ammoAmount) {    rg_drop_items_by_slot(id, PRIMARY_WEAPON_SLOT);     rg_give_item(id, currWeaponName, GT_APPEND);    rg_set_user_bpammo(id, rg_get_weapon_info(currWeaponName, WI_ID), ammoAmount);     engclient_cmd(id, currWeaponName);    return PLUGIN_HANDLED;} 

Re: isejus is buy zone meniu blokuojamas

Posted: 2019 Jun 03 21:22
by laimiukas3
am nelabai veikia

am atsiprasau mano klaida as ne taip uzvadines buvau amxx delto ir neveike :D

truputi dar pakeiciau viskas veikia dekui + karma

ir gal kam prireiks

Code: Select all

#include <amxmodx>#include <cstrike>#include <reapi>#include <vip_system> #define ADMIN_LOADER#define BUYZONE_USE  #pragma semicolon 1new const MenuKey = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<9); enum _:cvars {    AUTO_MENU,    GIVE_ITEMS,    WEAPONSRND,    AWPM249RND,    SHOP,    SHOP_RND}; new iPistol[MAX_CLIENTS+1], bool:g_bUsePistol, bool:g_bUseWeapon[MAX_CLIENTS+1]; static sItems[10];new pCvar[cvars], pCvarCfg[cvars];new g_iRound; public plugin_init() {    register_plugin("[ReVIP] Menu", VIP_SYSTEM_VERSION, "pUzzlik");    register_dictionary("vip_system.txt");     //    auto open vip menu 1 - on, 0 - off    pCvar[AUTO_MENU] = register_cvar("open_menu_spawn", "0");    /*        flags items        a - armor        d - defuse        f - flashbang        h - hegranade        p - pistol        s - smoke    */    pCvar[GIVE_ITEMS] = register_cvar("give_items", "adfhps");    //    which is available with a round primary weapons    pCvar[WEAPONSRND] = register_cvar("primary_weapons_rnd", "2");    //    which is available with a round primary weapons    pCvar[AWPM249RND] = register_cvar("heavy_weapons_rnd", "4");    //    if you want to use a custom shop, (1 - enable)    pCvar[SHOP] = register_cvar("use_custom_shop", "1");    //    with round displayed shop menu    pCvar[SHOP_RND] = register_cvar("custom_shop_block_rnd", "2");     register_clcmd("vipmenu", "ShowMenu");    register_clcmd("say /vipmenu", "ShowMenu");    register_clcmd("say_team /vipmenu", "ShowMenu");     register_clcmd("say", "hook_say");    register_clcmd("say_team", "hook_say");     register_menucmd(register_menuid("Vip Menu"), MenuKey, "MenuHandler");} public plugin_cfg() {    get_pcvar_string(pCvar[GIVE_ITEMS],sItems,charsmax(sItems)); trim(sItems);    pCvarCfg[WEAPONSRND] = get_pcvar_num(pCvar[WEAPONSRND]);    pCvarCfg[AWPM249RND] = get_pcvar_num(pCvar[AWPM249RND]);    pCvarCfg[AUTO_MENU] = get_pcvar_num(pCvar[AUTO_MENU]);    pCvarCfg[SHOP] = get_pcvar_num(pCvar[SHOP]);    pCvarCfg[SHOP_RND] = get_pcvar_num(pCvar[SHOP_RND]);} public vip_core_restart_round(round) {    arrayset(g_bUseWeapon, false, sizeof(g_bUseWeapon));    g_iRound = round;} public vip_core_player_spawn(const id) {    if(core_is_bonus_spawn(id)) {        for(new i, str_len = strlen(sItems); i < str_len ; i++) {            switch(sItems[i]){                case 'a': rg_set_user_armor(id, 100, ARMOR_VESTHELM);                case 'd': {                    new TeamName:team = get_member(id, m_iTeam);                    if(team == TEAM_CT) rg_give_defusekit (id, true);                }                case 'f': {                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                    rg_give_item(id, "weapon_flashbang", GT_APPEND);                }                case 'h': rg_give_item(id, "weapon_hegrenade", GT_APPEND);                case 'p': {                    switch(iPistol[id]) {                        case 0: { rg_give_item(id, "weapon_deagle", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_DEAGLE, 35); }                        case 1: { rg_give_item(id, "weapon_usp", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_USP, 100); }                        case 2: { rg_give_item(id, "weapon_glock18", GT_REPLACE); rg_set_user_bpammo(id, WEAPON_GLOCK18, 120); }                    }                    g_bUsePistol = true;                }                case 's': rg_give_item(id, "weapon_smokegrenade", GT_APPEND);            }        }         if(pCvarCfg[AUTO_MENU] && g_iRound >= pCvarCfg[WEAPONSRND]) ShowMenu(id);    }} public hook_say(id) {    static szMsg[32]; read_args(szMsg, charsmax(szMsg)); remove_quotes(szMsg);    static const szChoosedWP[][] = { "/ak47", "/m4a1", "/famas", "/awp", "/b51" };     for(new a; a < sizeof szChoosedWP; a++) {        if(!strcmp(szMsg, szChoosedWP[a])) {            if(!core_is_allow_use(id)) break;            return MenuHandler(id, a);        }    }    return PLUGIN_CONTINUE;} public ShowMenu(id) {    #if defined BUYZONE_USE    if(!cs_get_user_buyzone(id)) return PLUGIN_HANDLED;    #endif    if(!core_is_allow_use(id)) return PLUGIN_HANDLED;     new szMenu[512], key; key = MENU_KEY_0;    new iLen, szName[16]; get_entvar(id, var_netname, szName, charsmax(szName));       iLen = formatex(szMenu, charsmax(szMenu), "\r%L \w[\d%L\w]^n\w%L^n", LANG_SERVER, "MENU_NAME", LANG_SERVER, "NAME_SERVER", LANG_SERVER, "WELCOME", szName);     #if defined ADMIN_LOADER        new exp = admin_expired(id);        if(exp > 0) {            new sys = get_systime();            if((exp - sys) / 86400 > 0)    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\ywill expired: \w%d d.!^n^n", (exp - sys) / 86400);        } else if(exp == 0) iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n^n", LANG_SERVER, "VIP_EXPIRED_PRMANENT");    #else        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n");    #endif     new szUseWpn[2]; formatex(szUseWpn, charsmax(szUseWpn), "%s", g_bUseWeapon[id] ? "d" : "w");     if(g_iRound < pCvarCfg[WEAPONSRND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \d%L \r%L^n\r2. \d%L \r%L^n\r3. \d%L \r%L^n", LANG_SERVER, "AK47", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "M4A1", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND], LANG_SERVER, "FAMAS", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[WEAPONSRND]);    else {        key |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \%s%L^n\r2. \%s%L^n\r3. \%s%L^n", szUseWpn, LANG_SERVER, "AK47", szUseWpn, LANG_SERVER, "M4A1", szUseWpn, LANG_SERVER, "FAMAS");    }     if(g_iRound < pCvarCfg[AWPM249RND])        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \d%L \r%L^n\r5. \d%L \r%L^n^n", LANG_SERVER, "AWP", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND], LANG_SERVER, "GALIL", LANG_SERVER, "ROUND", g_iRound, pCvarCfg[AWPM249RND]);    else {        key |= MENU_KEY_4|MENU_KEY_5;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r4. \%s%L^n\r5. \%s%L^n^n", szUseWpn, LANG_SERVER, "AWP", szUseWpn, LANG_SERVER, "GALIL");    }     if(g_bUsePistol) {        key |= MENU_KEY_6;        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6. %L \r[\w%s\r]^n", LANG_SERVER, "PISTOL", iPistol[id] == 0 ? "Deagle" : iPistol[id] == 1 ? "USP" : "Glock");    }    formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r0. %L", LANG_SERVER, "EXIT");     set_member(id, m_iMenu, Menu_OFF);    return show_menu(id, key, szMenu, -1, "Vip Menu");} public MenuHandler(id, key) {    #if defined BUYZONE_USE    if(!cs_get_user_buyzone(id)) return PLUGIN_HANDLED;    #endif    if(key <= 4) {        /***    Защита от дурака    ***/        if(g_iRound < pCvarCfg[WEAPONSRND]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "PISTOLS_ROUND");        /***    End        ***/        if(g_bUseWeapon[id]) return client_print_color(id, 0, "%L %L", LANG_SERVER, "CHAT_TAG", LANG_SERVER, "ALREDY_WEAPON_RND");        g_bUseWeapon[id] = true;               static const szChoosedBP[] = { 90, 90, 90, 30, 90 };        static const szChoosedWP[][] = { "weapon_ak47", "weapon_m4a1", "weapon_famas", "weapon_awp", "weapon_galil" };               return rg_give_items(id, szChoosedWP[key], szChoosedBP[key]);    }    else if (key == 5) GivePistol(id);    return PLUGIN_HANDLED;} public GivePistol(id) {    iPistol[id] >= 2 ? (iPistol[id] = 0) : iPistol[id]++;    ShowMenu(id);    return PLUGIN_HANDLED;} stock rg_give_items(id, currWeaponName[], ammoAmount) {    rg_drop_items_by_slot(id, PRIMARY_WEAPON_SLOT);     rg_give_item(id, currWeaponName, GT_APPEND);    rg_set_user_bpammo(id, rg_get_weapon_info(currWeaponName, WI_ID), ammoAmount);     engclient_cmd(id, currWeaponName);    return PLUGIN_HANDLED;}