Лимит на раунд |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
|
|
Лимит на раунд |
Pound
|
16.6.2017, 14:14
Сообщение
|
|
|
помоги с кодом лимит на раунд он стоит но почему то отказывается работать
zp_extra_dropgun.sma ( 4,3 килобайт )
Кол-во скачиваний: 5Код /*===============================================================================
= -------------------------------- -*- [ZP] Drop Human's Weapon -*- -------------------------------- ------------------- -*- Description -*- ------------------- (4) Drop Human's Gun (Zombie) Copyright (C) 2008-2009 by roy31317 --------------- -*- Credits -*- --------------- * AMXX Dev Team: Make all the plugins possible. * MeRcyLeZZ: for your Zombie Plague. * VEN: for Fakemeta Utilities and some useful stocks. ================================================================================ */ #include <amxmodx> #include <fakemeta> #include <zombieplague> #define PLUGIN "Drop Human's Weapon" #define VERSION "1.0" #define AUTHOR "roy31317" new const g_item_name[] = { "Drop Gun Power" }; // Item name new const g_item_cost = 10; // Item cost new const sound_drop[] = { "zombie_plague/strax.wav" } // Sound new g_itemid_dp new bool:g_has_item[33] new SayText new limit[33] const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90) const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE) public plugin_precache() { engfunc(EngFunc_PrecacheSound, sound_drop) } public e_StartRound() { arrayset(limit, 0, 33) } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) SayText = get_user_msgid("SayText") register_event("HLTV", "e_StartRound", "a", "1=0", "2=0") g_itemid_dp = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_ZOMBIE) } public zp_extra_item_selected(id, itemid) { if (itemid == g_itemid_dp) { if (!zp_has_round_started()) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + g_item_cost) client_printcolor(id, "!g[ZP] !yРаунд еще неначался !") return PLUGIN_HANDLED } if (zp_is_nemesis_round() || zp_is_survivor_round() || zp_is_plague_round()) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + g_item_cost) client_printcolor(id, "!g[ZP] !yНельзя сейчас использовать!") return PLUGIN_HANDLED } if(limit[id] >= 3) { client_printcolor(id, "!g[ZP] !yБольше 3 нельзя") return PLUGIN_HANDLED } new name[32] get_user_name(id, name, 31) client_printcolor(0, "!g[ZP] !y%s Выбросил у людей оружие", name) PlaySound(id, sound_drop) for (new i = 1; i <= 32; i++) { if (is_user_alive(i) && !zp_get_user_zombie(i) && !zp_get_user_survivor(i)) { get_item(i) } } } return PLUGIN_CONTINUE } public get_item(id) { g_has_item[id] = true PlaySound(id, sound_drop) drop_current_weapon(id) limit[id]++ } public client_connect(id) { g_has_item[id] = false return PLUGIN_CONTINUE } public client_disconnect(id) { g_has_item[id] = false return PLUGIN_CONTINUE } PlaySound(index, const sound[]) { if (equal(sound[strlen(sound)-4], ".mp3")) client_cmd(index, "mp3 play ^"sound/%s^"", sound) else client_cmd(index, "spk ^"%s^"", sound) } stock drop_current_weapon(id) { if(!g_has_item[id]) return; static weapon_id, clip, ammo weapon_id = get_user_weapon(id, clip, ammo) if (((1<<weapon_id) & PRIMARY_WEAPONS_BIT_SUM) || ((1<<weapon_id) & SECONDARY_WEAPONS_BIT_SUM)) { static weapon_name[32] get_weaponname(weapon_id, weapon_name, sizeof weapon_name - 1) engclient_cmd(id, "drop", weapon_name) } } stock client_printcolor(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 Color replace_all(msg, 190, "!y", "^1") // Default Color replace_all(msg, 190, "!t", "^3") // Team Color 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, SayText, _, players[i]) write_byte(players[i]); write_string(msg); message_end(); } } } } |
|
|
|
Pound
|
17.6.2017, 13:11
Сообщение
|
|
|
неполучилось (
|
|
|
|
Pound
|
19.6.2017, 23:33
Сообщение
|
|
|
|
|
|
|
![]() ![]() |