1. Slowpoked Пользователь

    Регистрация:
    08.11.15
    Сообщения:
    241
    Симпатии:
    45
    Пол:
    Мужской
    Никогда бы не подумал, что создам тему в поиске плагинов.
    Ищу оружейку, которая идеи совместно с CS:DM модом ( но не именно ее, а АЛЬТЕРНАТИВУ ). Либо, что нибудь похожее по ...

    Этот не предлагать: CSDM Style Gun Menu - AlliedModders
     
  2. mforce Пользователь

    Регистрация:
    24.08.15
    Сообщения:
    145
    Симпатии:
    93
    Пол:
    Мужской
    Here is mine.

    PHP:
    1. #include <amxmodx>
    2. #include <cstrike>
    3. #include <fun>
    4. #include <fakemeta>
    5. #include <hamsandwich>
    6.  
    7. new const PLUGIN[] = "Extended Weapon Menu";
    8. new const VERSION[] = "1.0";
    9. new const AUTHOR[] = "mforce";
    10.  
    11.  
    12. new const PREFIX[] = "EWM";
    13.  
    14. enum _:weapinfo {name[32], weap_name[32], bpammo};
    15. enum _:PCVARS {AwpMinPlayers, MaxAwps, BlockMaps, PistolMenu, MaxHeg, MaxFlash, MaxSmoke}
    16. enum _:TEAMS {TE, CT};
    17. new g_Cvars[PCVARS], bool:g_AllowAWP, g_Awps[TEAMS], bool:g_Used[33];
    18.  
    19. new const weapons[][weapinfo] = {
    20.     {"M4A1", "weapon_m4a1", 90},
    21.     {"AK47", "weapon_ak47", 90},
    22.     {"AWP", "weapon_awp", 30},
    23.     {"M249", "weapon_m249", 200},
    24.     {"AUG", "weapon_aug", 90},
    25.     {"FAMAS", "weapon_famas", 90},
    26.     {"GALIL", "weapon_galil", 90},
    27.     {"MP5NAVY", "weapon_mp5navy", 120},
    28.     {"XM1014", "weapon_xm1014", 32},
    29.     {"M3", "weapon_m3", 32},
    30.     {"SCOUT", "weapon_scout", 90},
    31.     {"P90", "weapon_p90", 100},
    32.     {"TMP", "weapon_tmp", 120},
    33.     {"UMP45", "weapon_ump45", 100},
    34.     {"MAC10", "weapon_mac10", 100}
    35. };
    36.  
    37. new const pistols[][weapinfo] = {
    38.     {"GLOCK18", "weapon_glock18", 120},
    39.     {"USP", "weapon_usp", 100},
    40.     {"DEAGLE", "weapon_deagle", 35},
    41.     {"FIVESEVEN", "weapon_fiveseven", 100},
    42.     {"P228", "weapon_p228", 52},
    43.     {"ELITE", "weapon_elite", 120}
    44. };
    45.  
    46. public plugin_init() {
    47.     register_plugin(PLUGIN, VERSION, AUTHOR);
    48.     g_Cvars[AwpMinPlayers] = register_cvar("ewm_awpminplayers", "4")
    49.     g_Cvars[MaxAwps] = register_cvar("ewm_maxawp", "3")
    50.     g_Cvars[BlockMaps] = register_cvar("ewm_blockmaps", "0")
    51.     g_Cvars[PistolMenu] = register_cvar("ewm_pistolmenu", "0")
    52.     g_Cvars[MaxHeg] = register_cvar("ewm_maxheg", "1")
    53.     g_Cvars[MaxFlash] = register_cvar("ewm_maxflash", "2")
    54.     g_Cvars[MaxSmoke] = register_cvar("ewm_maxsmoke", "1")
    55.     RegisterHam(Ham_Spawn, "player", "spawn_event", 1);
    56.     register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0");
    57.     register_clcmd("say /fegyo", "weapmenu");
    58.     register_clcmd("say /fegyomenu", "weapmenu");
    59.     register_clcmd("say /fegyver", "weapmenu");
    60.     register_clcmd("say /fegyvermenu", "weapmenu");
    61.     register_clcmd("say /weap", "weapmenu");
    62.     register_clcmd("say /weapon", "weapmenu");
    63.     register_clcmd("say /weaponmenu", "weapmenu");
    64.     register_clcmd("say /gun", "weapmenu");
    65.     register_clcmd("say /guns", "weapmenu");
    66.     register_message(get_user_msgid("Money"), "MessageMoney");
    67.     register_message(get_user_msgid("HideWeapon"), "MessageHideWeapon");
    68.     register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon");
    69. }
    70.  
    71. public plugin_cfg() {
    72.     if(get_pcvar_num(g_Cvars[BlockMaps]) == 1) read_blockedmaps();
    73. }
    74.  
    75. read_blockedmaps() {
    76.     new sBuffer[256], sFile[64], sData[32], pFile;
    77.     new mapname[32]; get_mapname(mapname, charsmax(mapname));
    78.     get_localinfo("amxx_configsdir", sFile, charsmax(sFile));
    79.     format(sFile, charsmax(sFile), "%s/ewm_blockmaps.ini", sFile);
    80.     pFile = fopen(sFile, "rt");
    81.     if(pFile) {      
    82.         while(!feof(pFile)) {
    83.             fgets(pFile, sBuffer, charsmax(sBuffer));
    84.             trim(sBuffer);
    85.             if(sBuffer[0] == ';') continue;
    86.             parse(sBuffer, sData, charsmax(sData));
    87.  
    88.             if(containi(mapname, sData) != -1) {
    89.                 fclose(pFile);
    90.                 pause("od");
    91.             }
    92.         }
    93.         fclose(pFile);
    94.     }
    95.     else fprintf(pFile, ";awp_^n;fy_");
    96. }
    97.  
    98. public Event_NewRound() {
    99.     arrayset(g_Used, false, sizeof(g_Used));
    100.     arrayset(g_Awps, 0, sizeof(g_Awps));
    101.     new minplayers = get_pcvar_num(g_Cvars[AwpMinPlayers]);
    102.     g_AllowAWP = (GetPlayers(1) >= minplayers && GetPlayers(2) >= minplayers) ? true : false;
    103. }
    104. public spawn_event(id) weapmenu(id);
    105.  
    106. public weapmenu(id) {
    107.     if (!is_user_alive(id) || g_Used[id]) return;
    108.    
    109.     switch(cs_get_user_team(id)) {
    110.         case CS_TEAM_T: {
    111.             if(user_has_weapon(id, CSW_C4)) {
    112.                 strip_user_weapons(id)
    113.                 give_item(id, "weapon_c4")
    114.                 cs_set_user_plant(id,1,1)
    115.             }
    116.             else {
    117.                 strip_user_weapons(id)
    118.             }
    119.         }
    120.         case CS_TEAM_CT: {
    121.             strip_user_weapons(id);
    122.             cs_set_user_defuse(id, 1);
    123.         }
    124.     }
    125.     give_item(id, "weapon_knife");
    126.  
    127.     new s_MenuName[128]; formatex(s_MenuName, charsmax(s_MenuName), "\y[%s] \w%s^nby \r%s", PREFIX, PLUGIN, AUTHOR);
    128.     new menu = menu_create(s_MenuName, "weapmenu_h");
    129.     for(new i; i<sizeof(weapons);i++) {
    130.         menu_additem(menu, weapons[i][name], "", 0)
    131.     }
    132.     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    133.     menu_setprop(menu, MPROP_BACKNAME, "Vissza");
    134.     menu_setprop(menu, MPROP_NEXTNAME, "Következő");
    135.     menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
    136.     menu_display(id, menu, 0);
    137. }
    138.  
    139. public weapmenu_h(id, menu, item) {
    140.     if(item == MENU_EXIT) {
    141.         menu_destroy(menu);
    142.         return PLUGIN_HANDLED;
    143.     }
    144.  
    145.     new maxwp = get_pcvar_num(g_Cvars[MaxAwps]);
    146.     new bool:awp_check = (equal(weapons[item][weap_name], "weapon_awp")) ? true : false;
    147.     if(awp_check && g_AllowAWP && maxwp) {
    148.         switch(cs_get_user_team(id)) {
    149.             case CS_TEAM_T: {
    150.                 if(g_Awps[TE] < maxwp) g_Awps[TE]++;
    151.                 else {
    152.                     ChatColor(id, "^4[%s]^1 Nincs lehetőség több ^3AWP^1 vásárlására a csapatodban", PREFIX)
    153.                     weapmenu(id);
    154.                     return PLUGIN_HANDLED;
    155.                 }
    156.             }
    157.             case CS_TEAM_CT: {
    158.                 if(g_Awps[CT] < maxwp) g_Awps[CT]++;
    159.                 else {
    160.                     ChatColor(id, "^4[%s]^1 Nincs lehetőség több ^3AWP^1 vásárlására a csapatodban", PREFIX)
    161.                     weapmenu(id);
    162.                     return PLUGIN_HANDLED;
    163.                 }
    164.             }
    165.         }
    166.     }
    167.     else if(awp_check) {
    168.         new awpmin = get_pcvar_num(g_Cvars[AwpMinPlayers]);
    169.         ChatColor(id, "^4[%s]^1 Nincs lehetőség ^3AWP^1 vásárlására, mert a játékosok száma kevesebb, mint %iv%i.", PREFIX, awpmin, awpmin)
    170.         weapmenu(id);
    171.         return PLUGIN_HANDLED;
    172.     }
    173.    
    174.     if(get_pcvar_num(g_Cvars[PistolMenu]) == 1) {
    175.         pistolmenu(id);
    176.     }
    177.     else {
    178.         give_item(id, "weapon_deagle");
    179.         cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    180.     }
    181.     give_item(id, weapons[item][weap_name]);
    182.     cs_set_user_bpammo(id, get_weaponid(weapons[item][weap_name]), weapons[item][bpammo]);
    183.     cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
    184.     give_grenades(id);
    185.     ChatColor(id, "^4[%s]^1 A(z)^3 %s ^1csomagot választottad.", PREFIX, weapons[item][name]);
    186.     g_Used[id] = true;
    187.    
    188.     menu_destroy(menu);
    189.     return PLUGIN_HANDLED;
    190. }
    191.  
    192. public pistolmenu(id) {
    193.     new s_MenuName[128]; formatex(s_MenuName, charsmax(s_MenuName), "\y[%s] \w%s^nby \r%s", PREFIX, PLUGIN, AUTHOR);
    194.     new menu = menu_create(s_MenuName, "pistolmenu_h");
    195.     for(new i; i<sizeof(pistols);i++) {
    196.         menu_additem(menu, pistols[i][name], "", 0)
    197.     }
    198.     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    199.     menu_setprop(menu, MPROP_BACKNAME, "Vissza");
    200.     menu_setprop(menu, MPROP_NEXTNAME, "Következő");
    201.     menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
    202.     menu_display(id, menu, 0);
    203. }
    204.  
    205. public pistolmenu_h(id, menu, item) {
    206.     if(item == MENU_EXIT) {
    207.         menu_destroy(menu);
    208.         return PLUGIN_HANDLED;
    209.     }
    210.    
    211.     give_item(id, pistols[item][weap_name]);
    212.     cs_set_user_bpammo(id, get_weaponid(pistols[item][weap_name]), pistols[item][bpammo]);
    213.    
    214.     menu_destroy(menu);
    215.     return PLUGIN_HANDLED;
    216. }
    217.  
    218. give_grenades(id) {
    219.     new maxheg = get_pcvar_num(g_Cvars[MaxHeg]);
    220.     if(maxheg) {
    221.         give_item(id, "weapon_hegrenade");
    222.         cs_set_user_bpammo(id, CSW_HEGRENADE, maxheg);
    223.     }
    224.    
    225.     new maxflash = get_pcvar_num(g_Cvars[MaxFlash]);
    226.     if(maxflash) {
    227.         give_item(id, "weapon_flashbang" );
    228.         cs_set_user_bpammo(id, CSW_FLASHBANG, maxflash);
    229.     }
    230.    
    231.     new maxsmoke = get_pcvar_num(g_Cvars[MaxSmoke]);
    232.     if(maxsmoke) {
    233.         give_item(id, "weapon_smokegrenade" );
    234.         cs_set_user_bpammo(id, CSW_SMOKEGRENADE, maxsmoke);
    235.     }
    236. }
    237.  
    238. GetPlayers(team) {
    239.     new players[32], num;
    240.     get_players(players, num, "ce", team == 1 ? "TERRORIST":"CT")
    241.  
    242.     return num;
    243. }
    244.  
    245. public MessageMoney(msgid, dest, id) {
    246.     set_pdata_int(id, 115, 0);
    247.     set_msg_arg_int(1, ARG_LONG, 0);
    248.     set_msg_arg_int(2, ARG_BYTE, 0);
    249. }
    250.  
    251. public MessageHideWeapon(msgid, dest, id) {
    252.     set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | (1<<5));
    253. }
    254.  
    255. public Message_StatusIcon(iMsgId, iMsgDest, id) {
    256.     static szIcon[8];
    257.     get_msg_arg_string(2, szIcon, charsmax(szIcon));
    258.     if(equal(szIcon, "buyzone")) {
    259.         if(get_msg_arg_int(1)) {
    260.             set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
    261.             return PLUGIN_HANDLED;
    262.         }
    263.     }
    264.     return PLUGIN_CONTINUE;
    265. }
    266.  
    267. stock ChatColor(const id, const szMessage[], any:...) {
    268.     static pnum, players[32], szMsg[190], IdMsg;
    269.     vformat(szMsg, charsmax(szMsg), szMessage, 3);
    270.    
    271.     if(!IdMsg) IdMsg = get_user_msgid("SayText");
    272.    
    273.     if(id) {
    274.         if(!is_user_connected(id)) return;
    275.         players[0] = id;
    276.         pnum = 1;
    277.     }
    278.     else get_players(players, pnum, "c");
    279.    
    280.     for(new i; i < pnum; i++) {
    281.         message_begin(MSG_ONE, IdMsg, .player = players[i]);
    282.         write_byte(players[i]);
    283.         write_string(szMsg);
    284.         message_end();
    285.     }
    286. }
     
    gudaus нравится это.
  3. mforce Пользователь

    Регистрация:
    24.08.15
    Сообщения:
    145
    Симпатии:
    93
    Пол:
    Мужской
    Mini bugfix for who use awp limit cvars in 0 = Disabled

    PHP:
    1. #include <amxmodx>
    2. #include <cstrike>
    3. #include <fun>
    4. #include <fakemeta>
    5. #include <hamsandwich>
    6.  
    7. new const PLUGIN[] = "Extended Weapon Menu";
    8. new const VERSION[] = "1.0";
    9. new const AUTHOR[] = "mforce";
    10.  
    11.  
    12. new const PREFIX[] = "EWM";
    13.  
    14. enum _:weapinfo {name[32], weap_name[32], bpammo};
    15. enum _:PCVARS {AwpMinPlayers, MaxAwps, BlockMaps, PistolMenu, MaxHeg, MaxFlash, MaxSmoke}
    16. enum _:TEAMS {TE, CT};
    17. new g_Cvars[PCVARS], bool:g_AllowAWP, g_Awps[TEAMS], bool:g_Used[33];
    18.  
    19. new const weapons[][weapinfo] = {
    20.     {"M4A1", "weapon_m4a1", 90},
    21.     {"AK47", "weapon_ak47", 90},
    22.     {"AWP", "weapon_awp", 30},
    23.     {"M249", "weapon_m249", 200},
    24.     {"AUG", "weapon_aug", 90},
    25.     {"FAMAS", "weapon_famas", 90},
    26.     {"GALIL", "weapon_galil", 90},
    27.     {"MP5NAVY", "weapon_mp5navy", 120},
    28.     {"XM1014", "weapon_xm1014", 32},
    29.     {"M3", "weapon_m3", 32},
    30.     {"SCOUT", "weapon_scout", 90},
    31.     {"P90", "weapon_p90", 100},
    32.     {"TMP", "weapon_tmp", 120},
    33.     {"UMP45", "weapon_ump45", 100},
    34.     {"MAC10", "weapon_mac10", 100}
    35. };
    36.  
    37. new const pistols[][weapinfo] = {
    38.     {"GLOCK18", "weapon_glock18", 120},
    39.     {"USP", "weapon_usp", 100},
    40.     {"DEAGLE", "weapon_deagle", 35},
    41.     {"FIVESEVEN", "weapon_fiveseven", 100},
    42.     {"P228", "weapon_p228", 52},
    43.     {"ELITE", "weapon_elite", 120}
    44. };
    45.  
    46. public plugin_init() {
    47.     register_plugin(PLUGIN, VERSION, AUTHOR);
    48.     g_Cvars[AwpMinPlayers] = register_cvar("ewm_awpminplayers", "4")
    49.     g_Cvars[MaxAwps] = register_cvar("ewm_maxawp", "3")
    50.     g_Cvars[BlockMaps] = register_cvar("ewm_blockmaps", "0")
    51.     g_Cvars[PistolMenu] = register_cvar("ewm_pistolmenu", "0")
    52.     g_Cvars[MaxHeg] = register_cvar("ewm_maxheg", "1")
    53.     g_Cvars[MaxFlash] = register_cvar("ewm_maxflash", "2")
    54.     g_Cvars[MaxSmoke] = register_cvar("ewm_maxsmoke", "1")
    55.     RegisterHam(Ham_Spawn, "player", "spawn_event", 1);
    56.     register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0");
    57.     register_clcmd("say /fegyo", "weapmenu");
    58.     register_clcmd("say /fegyomenu", "weapmenu");
    59.     register_clcmd("say /fegyver", "weapmenu");
    60.     register_clcmd("say /fegyvermenu", "weapmenu");
    61.     register_clcmd("say /weap", "weapmenu");
    62.     register_clcmd("say /weapon", "weapmenu");
    63.     register_clcmd("say /weaponmenu", "weapmenu");
    64.     register_clcmd("say /gun", "weapmenu");
    65.     register_clcmd("say /guns", "weapmenu");
    66.     register_message(get_user_msgid("Money"), "MessageMoney");
    67.     register_message(get_user_msgid("HideWeapon"), "MessageHideWeapon");
    68.     register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon");
    69. }
    70.  
    71. public plugin_cfg() {
    72.     if(get_pcvar_num(g_Cvars[BlockMaps]) == 1) read_blockedmaps();
    73. }
    74.  
    75. read_blockedmaps() {
    76.     new sBuffer[256], sFile[64], sData[32], pFile;
    77.     new mapname[32]; get_mapname(mapname, charsmax(mapname));
    78.     get_localinfo("amxx_configsdir", sFile, charsmax(sFile));
    79.     format(sFile, charsmax(sFile), "%s/ewm_blockmaps.ini", sFile);
    80.     pFile = fopen(sFile, "rt");
    81.     if(pFile) {      
    82.         while(!feof(pFile)) {
    83.             fgets(pFile, sBuffer, charsmax(sBuffer));
    84.             trim(sBuffer);
    85.             if(sBuffer[0] == ';') continue;
    86.             parse(sBuffer, sData, charsmax(sData));
    87.  
    88.             if(containi(mapname, sData) != -1) {
    89.                 fclose(pFile);
    90.                 pause("od");
    91.             }
    92.         }
    93.         fclose(pFile);
    94.     }
    95.     else fprintf(pFile, ";awp_^n;fy_");
    96. }
    97.  
    98. public Event_NewRound() {
    99.     arrayset(g_Used, false, sizeof(g_Used));
    100.     arrayset(g_Awps, 0, sizeof(g_Awps));
    101.     new minplayers = get_pcvar_num(g_Cvars[AwpMinPlayers]);
    102.     g_AllowAWP = (GetPlayers(1) >= minplayers && GetPlayers(2) >= minplayers) ? true : false;
    103. }
    104. public spawn_event(id) weapmenu(id);
    105.  
    106. public weapmenu(id) {
    107.     if (!is_user_alive(id) || g_Used[id]) return;
    108.    
    109.     switch(cs_get_user_team(id)) {
    110.         case CS_TEAM_T: {
    111.             if(user_has_weapon(id, CSW_C4)) {
    112.                 strip_user_weapons(id)
    113.                 give_item(id, "weapon_c4")
    114.                 cs_set_user_plant(id,1,1)
    115.             }
    116.             else {
    117.                 strip_user_weapons(id)
    118.             }
    119.         }
    120.         case CS_TEAM_CT: {
    121.             strip_user_weapons(id);
    122.             cs_set_user_defuse(id, 1);
    123.         }
    124.     }
    125.     give_item(id, "weapon_knife");
    126.  
    127.     new s_MenuName[128]; formatex(s_MenuName, charsmax(s_MenuName), "\y[%s] \w%s^nby \r%s", PREFIX, PLUGIN, AUTHOR);
    128.     new menu = menu_create(s_MenuName, "weapmenu_h");
    129.     for(new i; i<sizeof(weapons);i++) {
    130.         menu_additem(menu, weapons[i][name], "", 0)
    131.     }
    132.     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    133.     menu_setprop(menu, MPROP_BACKNAME, "Vissza");
    134.     menu_setprop(menu, MPROP_NEXTNAME, "Következő");
    135.     menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
    136.     menu_display(id, menu, 0);
    137. }
    138.  
    139. public weapmenu_h(id, menu, item) {
    140.     if(item == MENU_EXIT) {
    141.         menu_destroy(menu);
    142.         return PLUGIN_HANDLED;
    143.     }
    144.  
    145.     new maxwp = get_pcvar_num(g_Cvars[MaxAwps]);
    146.     if(equal(weapons[item][weap_name], "weapon_awp")) {
    147.         if(!g_AllowAWP) {
    148.             new minplay = get_pcvar_num(g_Cvars[AwpMinPlayers])
    149.             ChatColor(id, "^4[%s]^1 Nincs lehetőség ^3AWP^1 vásárlására, mert nincs %iv%i.", PREFIX, minplay, minplay)
    150.             weapmenu(id);
    151.             return PLUGIN_HANDLED;
    152.         }
    153.         else if(maxwp) {
    154.             switch(cs_get_user_team(id)) {
    155.                 case CS_TEAM_T: {
    156.                     if(g_Awps[TE] < maxwp) g_Awps[TE]++;
    157.                     else {
    158.                         ChatColor(id, "^4[%s]^1 Nincs lehetőség több ^3AWP^1 vásárlására a csapatodban", PREFIX)
    159.                         weapmenu(id);
    160.                         return PLUGIN_HANDLED;
    161.                     }
    162.                 }
    163.                 case CS_TEAM_CT: {
    164.                     if(g_Awps[CT] < maxwp) g_Awps[CT]++;
    165.                     else {
    166.                         ChatColor(id, "^4[%s]^1 Nincs lehetőség több ^3AWP^1 vásárlására a csapatodban", PREFIX)
    167.                         weapmenu(id);
    168.                         return PLUGIN_HANDLED;
    169.                     }
    170.                 }
    171.             }
    172.         }
    173.     }
    174.    
    175.     if(get_pcvar_num(g_Cvars[PistolMenu]) == 1) {
    176.         pistolmenu(id);
    177.     }
    178.     else {
    179.         give_item(id, "weapon_deagle");
    180.         cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    181.     }
    182.     give_item(id, weapons[item][weap_name]);
    183.     cs_set_user_bpammo(id, get_weaponid(weapons[item][weap_name]), weapons[item][bpammo]);
    184.     cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
    185.     give_grenades(id);
    186.     ChatColor(id, "^4[%s]^1 A(z)^3 %s ^1csomagot választottad.", PREFIX, weapons[item][name]);
    187.     g_Used[id] = true;
    188.    
    189.     menu_destroy(menu);
    190.     return PLUGIN_HANDLED;
    191. }
    192.  
    193. public pistolmenu(id) {
    194.     new s_MenuName[128]; formatex(s_MenuName, charsmax(s_MenuName), "\y[%s] \w%s^nby \r%s", PREFIX, PLUGIN, AUTHOR);
    195.     new menu = menu_create(s_MenuName, "pistolmenu_h");
    196.     for(new i; i<sizeof(pistols);i++) {
    197.         menu_additem(menu, pistols[i][name], "", 0)
    198.     }
    199.     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    200.     menu_setprop(menu, MPROP_BACKNAME, "Vissza");
    201.     menu_setprop(menu, MPROP_NEXTNAME, "Következő");
    202.     menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
    203.     menu_display(id, menu, 0);
    204. }
    205.  
    206. public pistolmenu_h(id, menu, item) {
    207.     if(item == MENU_EXIT) {
    208.         menu_destroy(menu);
    209.         return PLUGIN_HANDLED;
    210.     }
    211.    
    212.     give_item(id, pistols[item][weap_name]);
    213.     cs_set_user_bpammo(id, get_weaponid(pistols[item][weap_name]), pistols[item][bpammo]);
    214.    
    215.     menu_destroy(menu);
    216.     return PLUGIN_HANDLED;
    217. }
    218.  
    219. give_grenades(id) {
    220.     new maxheg = get_pcvar_num(g_Cvars[MaxHeg]);
    221.     if(maxheg) {
    222.         give_item(id, "weapon_hegrenade");
    223.         cs_set_user_bpammo(id, CSW_HEGRENADE, maxheg);
    224.     }
    225.    
    226.     new maxflash = get_pcvar_num(g_Cvars[MaxFlash]);
    227.     if(maxflash) {
    228.         give_item(id, "weapon_flashbang" );
    229.         cs_set_user_bpammo(id, CSW_FLASHBANG, maxflash);
    230.     }
    231.    
    232.     new maxsmoke = get_pcvar_num(g_Cvars[MaxSmoke]);
    233.     if(maxsmoke) {
    234.         give_item(id, "weapon_smokegrenade" );
    235.         cs_set_user_bpammo(id, CSW_SMOKEGRENADE, maxsmoke);
    236.     }
    237. }
    238.  
    239. GetPlayers(team) {
    240.     new players[32], num;
    241.     get_players(players, num, "ce", team == 1 ? "TERRORIST":"CT")
    242.  
    243.     return num;
    244. }
    245.  
    246. public MessageMoney(msgid, dest, id) {
    247.     set_pdata_int(id, 115, 0);
    248.     set_msg_arg_int(1, ARG_LONG, 0);
    249.     set_msg_arg_int(2, ARG_BYTE, 0);
    250. }
    251.  
    252. public MessageHideWeapon(msgid, dest, id) {
    253.     set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | (1<<5));
    254. }
    255.  
    256. public Message_StatusIcon(iMsgId, iMsgDest, id) {
    257.     static szIcon[8];
    258.     get_msg_arg_string(2, szIcon, charsmax(szIcon));
    259.     if(equal(szIcon, "buyzone")) {
    260.         if(get_msg_arg_int(1)) {
    261.             set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
    262.             return PLUGIN_HANDLED;
    263.         }
    264.     }
    265.     return PLUGIN_CONTINUE;
    266. }
    267.  
    268. stock ChatColor(const id, const szMessage[], any:...) {
    269.     static pnum, players[32], szMsg[190], IdMsg;
    270.     vformat(szMsg, charsmax(szMsg), szMessage, 3);
    271.    
    272.     if(!IdMsg) IdMsg = get_user_msgid("SayText");
    273.    
    274.     if(id) {
    275.         if(!is_user_connected(id)) return;
    276.         players[0] = id;
    277.         pnum = 1;
    278.     }
    279.     else get_players(players, pnum, "c");
    280.    
    281.     for(new i; i < pnum; i++) {
    282.         message_begin(MSG_ONE, IdMsg, .player = players[i]);
    283.         write_byte(players[i]);
    284.         write_string(szMsg);
    285.         message_end();
    286.     }
    287. }
     
    x00peR и neygomon нравится это.