IDEAL VIP GOLD

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
169
Реакции
51
Помог
6 раз(а)
Ошибка
[FAKEMETA] Invalid entity
[AMXX] Displaying debug trace (plugin "ideal_vip_gold.amxx", version "3 c xepoM]")
[AMXX] Run time error 10: native error (native "pev")
[AMXX] [0] ideal_vip_gold.sma::fw_TakeDamage (line 415)
ОС
Linux
Amx Mod X
1.9.0.5271
Билд
ReHLDS version: 3.7.0.695-dev
ReGamedll
ReGameDLL version: 5.18.0.473-dev
Версия Metamod
Metamod-r v1.3.0.128
Список метамодулей
description      stat pend  file                        vers             src  load  unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.135 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 6] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 9] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[10] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[11] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[12] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386.so v5.14.0.195-dev pl6 ANY Never
[15] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl6 ANY Never
[16] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[18] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl6 ANY ANY
[19] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl6 ANY ANY
19 plugins, 19 running
Список плагинов
name                    version     author            file             status   
[ 1] New Kick Menu 1.4.2 Radius newkickmenu.amx running
[ 2] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 3] FreshBans 1.4.3b kanagava fresh_bans_1.4. running
[ 4] Admin Loader 3.5 neygomon admin_loader.am running
[ 5] WebHS 0.1 kanagava fb_web_online.a running
[ 6] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 7] AMXX reloadadmins 0.1 9 rpamm!? reloadadmins.am running
[ 8] Ultimate Chats Control 5.2(c) neygomon ucc.amxx running
[ 9] UCC Addon: VoteGAG 1.2 neygomon ucc_votegag.amx running
[ 10] Advanced MapChooser 1.4 neygomon map_chooser.amx running
[ 11] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 12] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 13] Players Menu 1.7 neugomon players_menu.am running
[ 14] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 15] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 16] Items Restrict 1.1 s1lent items_restrict. running
[ 17] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 18] c4 timer 1.1 cheap_suit c4timer.amxx running
[ 19] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 20] Say Me & Hp 1.0 Hypa_[KZ] say_me_and_hp.a running
[ 21] IDEAL VIP 3 c xepoM] 15% oT Ba/lePa ideal_vip_gold. debug
[ 22] HS_Blood 1.1 tuty hs_blood.amxx running
[ 23] Grenade Effects 1.4 F@nt0M, d3m37r4 grenade_effects running
[ 24] Welcom 1.0 4el welcome_music.a running
[ 25] DemoRecoder 1.2 neygomon demorecoder.amx running
[ 26] Menus Front-End 1.5 neugomon menufront_end.a running
[ 27] MenuGen 1.0 CrAsH MenuGen.amxx running
[ 28] Mode 2x2 2.5_reapi s1lent mode.amxx running
[ 29] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 30] WeaponMenu 1.1 neygomon wmenu.amxx running
[ 31] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 32] fb_forwards 0.1.8 Mazdan & Neugomo fb_forwards.amx running
[ 33] Log Connect 1.0 Leo_[BH] log_connect.amx running
[ 34] Admin Commands Log 1.2 w0w admin_commands_ running
[ 35] Screen_Fade 0.0.5 Vaqtincha screen_fade.amx running
[ 36] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 37] Ping Control 0.3 neygomon ping_control.am running
[ 38] Show Damage 1.0 neygomon damager.amxx running
[ 39] ResetScore & GameName 1.0 Phantom rs_and_game_nam running
[ 40] Top Awards 0.11chat Safety1st top_awards.amxx running
[ 41] Info Rank 0.2 maFFyoZZyk info_rank.amxx running
[ 42] Parachute 1.1 ReHLDS Team parachute.amxx running
[ 43] Spect Bot 1.4 Jack Daniel`s spect_bot.amxx running
[ 44] RC BaseChanger 1.0 AMXX rc_basechanger. running
[ 45] ReChecker Logging 1.0 AMXX rc_logging.amxx running
[ 46] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 47] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 48] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 49] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 50] Advert Messages 1.2.2 neygomon adverts.amxx running
[ 51] HUD_Adverts_Deads 1.3.1 pUzzlik hud_message_dea running
[ 52] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 53] Block Advert 1.4 neygomon block_advert.am running
[ 54] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 55] [ReAPI] No Team Flash 0.0.2 Vaqtincha noteamflash_lit running
[ 56] [ReAPI] Colored Flash 1.0 ReHLDS Team colored_flash.a running
[ 57] [ReAPI] Best player of 1.1.2 F@nt0M best_player_of_ running
[ 58] KiLL Assist poka_4to_b PRoSToTeM@ Kill_assist_rea running
[ 59] [DD] Quick defuse 1.1 Deadly|Darkness dd_qdefuse.amxx running
[ 60] C4 Sprites Timer 0.1.0 ConnorMcLeod c4_timer_spr.am running
[ 61] Style C4 Timer 2.0 OciXCrom crx_c4timer.amx running
[ 62] [ReAMX] SlayLosers RBS 18.10.13 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 63] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 64] Time for info 1.0 neugomon time_for_info.a running
[ 65] [ReAPI] Advanced Team 0.1.0 Vaqtincha AdvancedTeamCho running
[ 66] [ReAPI] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 67] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
[ 68] Fake Ping 1.1 MeRcyLeZZ/gyxoBk FakePing.amxx running
[ 69] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 70] Free VIP 0.1 XTCS free_vip.amxx running
[ 71] InfoConnects 1.0 PAffAEJIkA :3 infoconnects.am running
[ 72] In-Game Ads(MastaMan E 1.83 (Edit stupok in_game_ads_Mas running
[ 73] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_limit.amxx running
[ 74] Hud Info 2.1 ill/Jack Daniel` hud_info.amxx running
[ 75] Custom Player Models A 0.2.1 F@nt0M & BlackSi custom_player_m running
[ 76] Custom Player Models C 0.2.1 BlackSignature custom_player_m running
[ 77] Custom Player Models T 0.2.1 BlackSignature custom_player_m running
77 plugins, 77 running
Автор плагина
15% oT Ba/lePa
Версия плагина
3 c xepoM]
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "IDEAL VIP"
#define VERSION "3 c xepoM]"
#define AUTHOR "15% oT Ba/lePa"

#define GOLD //Золотое оружие он/офф
#define TAB_SHOW //VIP в scoreboard
#define AUTO_ARMOR //автовыдача гранат и аммуниции в начале раунда
#define AUTO_PISTOLS //авто-меню пистолетов, если не выбран в наборе
#define AUTO_WEAPMENU //випменю в начале раунда
#define vip_flag ADMIN_LEVEL_H //флаг випа или кого там надо...
#define c_round 3 //с какого раунда доступно меню
#define c_health 5 //+здоровья за 1 килл
#define c_health_head 10 //+здоровья за 1 килл в башню
#define c_health_max 100 //максимум здоровья для випа (зря бабки платил что-ли)
#define c_money 500 //+баксов за 1 килл
#define c_money_head 800 //+баксов за 1 килл в голову

#define VIP_TAG (1<<2)
#define m_LastHitGroup 75

#if defined GOLD
#define MAX_ITEM_TYPES 6
#define m_linux_entity 4
#define m_pPlayer 41
#define m_pActiveItem 373
#define DMG_VALUE 1.3 //множитель урона
#define linuxdiff 5

new const m_rgpPlayerItems[MAX_ITEM_TYPES] = {34, 35, ...}

new V_AK[] = "models/perzi/new/v_ak47.mdl"
new P_AK[] = "models/perzi/new/p_ak47.mdl"
new W_AK[] = "models/perzi/new/w_ak47.mdl"

new V_M4[] = "models/perzi/new/v_m4a1.mdl"
new P_M4[] = "models/perzi/new/p_m4a1.mdl"
new W_M4[] = "models/perzi/new/w_m4a1.mdl"

new V_AWP[] = "models/perzi/new/v_awp.mdl"
new P_AWP[] = "models/perzi/new/p_awp.mdl"
new W_AWP[] = "models/perzi/new/w_awp.mdl"
#endif

new bool:g_map_valid = false
new bool:g_vip_allow[33] = true
new bool:g_haveGold[33] = false

static g_Round, g_SecondWeap[33], g_SecondHave[33], g_buyTime, set_SecCase, i_Menu, g_maxPlayers

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib")

register_event("HLTV", "round_start", "a", "1=0", "2=0")
register_event("TextMsg", "round_restart", "a", "2=#Game_will_restart_in","2=#Game_Commencing")

RegisterHam(Ham_Killed, "player", "player_killed", 1)
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")

register_clcmd("say /vipmenu", "main_menu")
register_clcmd("say_team /vipmenu", "main_menu")
register_clcmd("vipmenu", "main_menu")

g_maxPlayers = get_maxplayers()

new szPrefixMap[][] = {"de_", "cs_", "css_","as_"}
new map[32]; get_mapname(map, charsmax(map));
for(new i; i < sizeof szPrefixMap; i++)
{
if(containi(map, szPrefixMap[i]) != -1)
g_map_valid = true

}
#if defined GOLD
RegisterHam(Ham_Item_Deploy, "weapon_ak47", "deploy_weapon", 1)
RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "deploy_weapon", 1)
RegisterHam(Ham_Item_Deploy, "weapon_awp", "deploy_weapon", 1)

register_forward(FM_SetModel, "set_model", 1)
#endif
}

#if defined GOLD
public plugin_precache()
{
precache_model (V_AK)
precache_model (P_AK)
precache_model (W_AK)

precache_model (V_M4)
precache_model (P_M4)
precache_model (W_M4)

precache_model (V_AWP)
precache_model (P_AWP)
precache_model (W_AWP)
}
#endif

public client_putinserver(id)
{
g_SecondWeap[id] = 0

new name[32]; get_user_name(id, name, 31)

if(get_user_flags(id) & ADMIN_BAN)
return client_print_color(0, 0, "^4[VIP] ^1На сервер зашел ^4Администратор ^3%s", name)

if(get_user_flags(id) & ADMIN_LEVEL_H)
return client_print_color(0, 0, "^4[VIP] ^1На сервер зашел ^4ВИП игрок ^3%s", name)

return PLUGIN_HANDLED
}

public client_disconnected(id)
{
g_SecondHave[id] = 0
g_SecondWeap[id] = 0
g_haveGold[id] = false
}

public round_start()
{
g_Round++
g_buyTime = get_systime()
}

public round_restart()
g_Round = 0

public player_spawn(Player)
{
if(!g_map_valid || !user_admin(Player))
return 1

g_vip_allow[Player] = true

if(is_user_alive(Player))
{
task_funk(Player)

#if defined AUTO_WEAPMENU
if(g_Round >= c_round)
main_menu(Player)
#endif
}

return 1
}

public task_funk(id)
{
#if defined AUTO_ARMOR
if(cs_get_user_team(id) == CS_TEAM_CT)
cs_set_user_defuse(id, 1, 255, 255, 0,_,0)
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
cs_set_user_armor(id, 100, CS_ARMOR_KEVLAR)

give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
#endif

#if defined AUTO_PISTOLS
if(g_SecondHave[id])
return 1
Give_Second_Weapon(id, g_SecondWeap[id])
#endif

return 0
}

public main_menu(id)
{
if(!user_admin(id))
return client_print_color(id, 0, "^1[^4VIP^1] ^3У вас нет доступа для открытия этого меню!")

if(!g_map_valid)
return client_print_color(id, 0, "^1[^4VIP^1] ^1На данной карте Оружейка недоступна!")

if(!is_user_alive(id))
return client_print_color(id, 0, "^1[^4VIP^1] ^3Зачем мертвому оружие?))")

if(g_Round < c_round)
return client_print_color(id, 0, "^1[^4VIP^1] ^3Оружейная комната доступна с %d-го раунда!", c_round)

if(!g_vip_allow[id] || get_systime() > (g_buyTime + 20))
return client_print_color(id, 0, "^1[^4VIP^1] ^3Вип меню недоступно! Ждите нового раунда.")

new s_Title[128], s_Pistol[32], szMenuMulti[64]
switch(g_SecondWeap[id])
{
case 0: s_Pistol = "NONE"
case 1: s_Pistol = "Deagle"
case 2: s_Pistol = "Usp"
case 3: s_Pistol = "Glock"
}

formatex(s_Title, charsmax(s_Title), "\r ВИП стоит кучу денег: ")
i_Menu = menu_create(s_Title, "main_handler", 1);

formatex(szMenuMulti, charsmax(szMenuMulti), "\y%s \d+ Гранаты + \rM4A1", s_Pistol)
menu_additem(i_Menu, szMenuMulti, "1", 0)

formatex(szMenuMulti, charsmax(szMenuMulti), "\y%s \d+ Гранаты + \rAK47", s_Pistol)
menu_additem(i_Menu, szMenuMulti, "2", 0)

formatex(szMenuMulti, charsmax(szMenuMulti), "\y%s \d+ Гранаты + \rAWP", s_Pistol)
menu_additem(i_Menu, szMenuMulti, "3", 0)

menu_addblank(i_Menu, 0)

formatex(szMenuMulti, charsmax(szMenuMulti), "\yИзменить \rпистолет \yв наборе")
menu_additem(i_Menu, szMenuMulti, "4", 0)

menu_addblank(i_Menu, 0)

#if defined GOLD
formatex(szMenuMulti, charsmax(szMenuMulti), "\yЗолотое оружие")
menu_additem(i_Menu, szMenuMulti, "5", 0)
#endif

menu_setprop(i_Menu, MPROP_EXITNAME, "Выход")

return menu_display(id, i_Menu, 0)
}

public main_handler(id, menu, item)
{
if(item == MENU_EXIT)
return menu_destroy(menu)

new s_Data[6], s_Name[60], i_Access, i_Callback
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback)

new i_Key = str_to_num(s_Data)
if(1 <= i_Key <= 5)
{
g_vip_allow[id] = false
g_haveGold[id] = false
}

switch(i_Key)
{
case 1: DropWeapons(id, 1, "weapon_m4a1", CSW_M4A1, 90)
case 2: DropWeapons(id, 1, "weapon_ak47", CSW_AK47, 90)
case 3: DropWeapons(id, 1, "weapon_awp", CSW_AWP, 30)
case 4:
{
set_SecCase = 6
sec_WpnMenu(id)
}
case 5: GoldMenu(id)
}

return menu_destroy(menu)
}

public sec_WpnMenu(id)
{
i_Menu = menu_create("\rПистолет для набора", "sec_WpnMenu_handler")

menu_additem(i_Menu, "\yDeagle", "1", 0)
menu_additem(i_Menu, "\yUsp", "2", 0)
menu_additem(i_Menu, "\yGlock", "3", 0)

menu_display(id, i_Menu, 0)
}

public sec_WpnMenu_handler(id, menu, item)
{
if(item == MENU_EXIT)
return PLUGIN_HANDLED

new s_Data[6], s_Name[60], i_Access, i_Callback
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback)

new i_Key = str_to_num(s_Data)
g_SecondWeap[id] = i_Key
g_SecondHave[id] = true

menu_destroy(menu)

return Give_Second_Weapon(id, g_SecondWeap[id])
}

#if defined GOLD
public GoldMenu(id)
{
i_Menu = menu_create("\yВау!)) Золотишечко", "GoldMenu_handler")

menu_additem(i_Menu, "\yЗолотой \wМ4А1", "1", 0)
menu_additem(i_Menu, "\yЗолотой \wАК-47", "2", 0);
menu_additem(i_Menu, "\yЗолотой \wMagnum AWP", "3", 0)
menu_addblank2(i_Menu)

menu_setprop(i_Menu, MPROP_EXITNAME, "\yВыход")
menu_display(id, i_Menu, 0)
}

public GoldMenu_handler(id, menu, item)
{
if(item == MENU_EXIT)
return menu_destroy(menu)

new cmd[3], access, callback
menu_item_getinfo(menu, item, access, cmd, 2,_,_, callback)

if(item != MENU_EXIT)
{
g_vip_allow[id] = false
g_haveGold[id] = true
}

new i_Key = str_to_num(cmd)
switch (i_Key)
{
case 1: DropWeapons(id, 1, "weapon_m4a1", CSW_M4A1, 90)
case 2: DropWeapons(id, 1, "weapon_ak47", CSW_AK47, 90)
case 3: DropWeapons(id, 1, "weapon_awp", CSW_AWP, 30)
case 4: main_menu(id)
}

return menu_destroy(menu)
}

public deploy_weapon(ent)
{
static id; id = get_pdata_cbase(ent, m_pPlayer, m_linux_entity)

static wpn; wpn = pev(ent, pev_iuser1)
if(!wpn)
return

if(!user_admin(id))
{
static weap_name[32]
get_weaponname(wpn, weap_name, charsmax(weap_name))
engclient_cmd(id, "drop", weap_name)

client_print_color(id, 0, "^1[^4VIP^1] ^3Это оружие доступно только ВИП игрокам!")
return
}

switch(wpn)
{
case CSW_AK47:
{
set_pev(id, pev_viewmodel2, V_AK)
set_pev(id, pev_weaponmodel2, P_AK)
}
case CSW_M4A1:
{
set_pev(id, pev_viewmodel2, V_M4)
set_pev(id, pev_weaponmodel2, P_M4)
}
case CSW_AWP:
{
set_pev(id, pev_viewmodel2, V_AWP)
set_pev(id, pev_weaponmodel2, P_AWP)
}
}
}

public set_model(ent, model[])
{
if(!pev_valid(ent))
return

static classname[10]; pev(ent, pev_classname, classname, charsmax(classname))
if(!equal(classname, "weaponbox"))
return

static drop
for(new i = 0 ; i < MAX_ITEM_TYPES; i++)
{
drop = get_pdata_cbase(ent, m_rgpPlayerItems[i], m_linux_entity)
if(drop < 1)
continue
break
}

if(drop < 1)
return

static wpn; wpn = pev(drop, pev_iuser1)
if(!wpn)
return

switch(wpn)
{
case CSW_AK47: engfunc(EngFunc_SetModel, ent, W_AK)
case CSW_M4A1: engfunc(EngFunc_SetModel, ent, W_M4)
case CSW_AWP: engfunc(EngFunc_SetModel, ent, W_AWP)
}
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if(!attacker || attacker > g_maxPlayers)
return HAM_IGNORED

static ent; ent = get_pdata_cbase(attacker, m_pActiveItem, linuxdiff)
static wpn; wpn = pev(ent, pev_iuser1)

if(!wpn)
return HAM_IGNORED

SetHamParamFloat(4, damage * DMG_VALUE)

return HAM_IGNORED
}
#endif

public player_killed(victim, killer, corpse)
{
if(user_admin(victim))
{
g_SecondHave[victim] = false
g_haveGold[victim] = false
return
}

if(user_admin(victim))
{
if(is_user_alive(killer))
{
static p_Health; p_Health = get_user_health(killer)
static p_Money; p_Money = cs_get_user_money(killer)
if(get_pdata_int(victim, m_LastHitGroup) == HIT_HEAD)
{
set_user_health(killer, p_Health + c_health_head)
if(p_Health > c_health_max)
set_user_health(killer, c_health_max)
cs_set_user_money(killer, p_Money + c_money_head)
}
else
{
set_user_health(killer, p_Health + c_health)
if(p_Health > c_health_max)
set_user_health(killer, c_health_max)
cs_set_user_money(killer, p_Money + c_money)
}
}
}
}

#if defined TAB_SHOW
public msgScoreAttrib(const MsgId, const MsgType, const MsgDest)
{
if(user_admin(get_msg_arg_int(1)) && !get_msg_arg_int(2))
set_msg_arg_int(2, ARG_BYTE, VIP_TAG)
}
#endif

stock bool: user_admin(const id)
{
if(!is_user_connected(id))
return false

if(get_user_flags(id) & vip_flag)
return true

return false
}

Give_Second_Weapon(id, wpnHave)
{
switch(wpnHave)
{
case 0: sec_WpnMenu(id)
case 1: DropWeapons(id, 2, "weapon_deagle", CSW_DEAGLE, 35)
case 2: DropWeapons(id, 2, "weapon_usp", CSW_USP, 100)
case 3: DropWeapons(id, 2, "weapon_glock18", CSW_GLOCK18, 120)
}

if(set_SecCase == 6)
{
set_SecCase = 0
main_menu(id)
}

return 1
}

DropWeapons(id, wpnType, wpnName[], wpnID, iAmmo)
{
#define PRIMARY_WEAPON ((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))

#define SECONDARY_WEAPON ((1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_P228)|(1<<CSW_DEAGLE))

new weapons[32], num, i
get_user_weapons(id, weapons, num)

switch(wpnType)
{
case 1: wpnType = PRIMARY_WEAPON
case 2: wpnType = SECONDARY_WEAPON
}

static weap_name[32]
for(i = 0; i < num; i++)
{
if(wpnType & (1<<weapons[i]))
{
get_weaponname(weapons[i], weap_name, sizeof weap_name - 1)
if(!equali(weap_name, wpnName))
engclient_cmd(id, "drop", weap_name)
}
}

#if defined GOLD

if(g_haveGold[id])
{
static ent; ent = fm_give_item(id, wpnName)
if(!pev_valid(ent))
return

set_pev(ent, pev_iuser1, wpnID)
cs_set_user_bpammo(id, wpnID, iAmmo)
deploy_weapon(ent)
engclient_cmd(id, wpnName)

return
}
#endif

fm_give_item(id, wpnName)
cs_set_user_bpammo(id, wpnID, iAmmo)
}
Помогите плз пофиксить ошибку
Код:
[AMXX]    [0] ideal_vip_gold.sma::fw_TakeDamage (line 415)
 
В этой теме было размещено решение! Перейти к решению.

Вложения

Сообщения
165
Реакции
-8
Код:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if(!attacker || attacker > g_maxPlayers)
        return HAM_IGNORED

    if(!pev_valid(ent)) return FMRES_IGNORED

    static ent; ent = get_pdata_cbase(attacker, m_pActiveItem, linuxdiff)
    static wpn; wpn = pev(ent, pev_iuser1)

    if(!wpn)
        return HAM_IGNORED

    SetHamParamFloat(4, damage * DMG_VALUE)

    return HAM_IGNORED
}
 
Сообщения
169
Реакции
51
Помог
6 раз(а)
Код:
public fw_TakeDamage(ent, victim, inflictor, attacker, Float:damage)
{
    if(!attacker || attacker > g_maxPlayers)
        return HAM_IGNORED
        
    if(!pev_valid(ent))
        return FMRES_IGNORED
    
    static ent; ent = get_pdata_cbase(attacker, m_pActiveItem, linuxdiff)
    static wpn; wpn = pev(ent, pev_iuser1)

    if(!wpn)
        return HAM_IGNORED

    SetHamParamFloat(4, damage * DMG_VALUE)

    return HAM_IGNORED
}
 
Сообщения
594
Реакции
350
Предупреждения
1
Помог
9 раз(а)
D1esel,
Код:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if(!attacker || attacker > g_maxPlayers)
        return HAM_IGNORED

    static ent; ent = get_pdata_cbase(attacker, m_pActiveItem, linuxdiff)
    if(!pev_valid(ent)) return FMRES_IGNORED
    static wpn; wpn = pev(ent, pev_iuser1)

    if(!wpn)
        return HAM_IGNORED

    SetHamParamFloat(4, damage * DMG_VALUE)

    return HAM_IGNORED
}
 
Сообщения
594
Реакции
350
Предупреждения
1
Помог
9 раз(а)
Schokk, ваш вариант неверый
 
Сообщения
594
Реакции
350
Предупреждения
1
Помог
9 раз(а)
Код:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if(!attacker || attacker > g_maxPlayers)
        return HAM_IGNORED

    static ent; ent = get_pdata_cbase(attacker, m_pActiveItem, linuxdiff)
    if(pev_valid(ent) != 2) return FMRES_IGNORED
    static wpn; wpn = pev(ent, pev_iuser1)

    if(!wpn)
        return HAM_IGNORED

    SetHamParamFloat(4, damage * DMG_VALUE)

    return HAM_IGNORED
}
более правильный вариант
 
Сообщения
106
Реакции
-4
Неверный раздел форума
Ребята можете мне тоже помочь ???
Код:
public TeamsVote2() {    
    if ( !g_CustomGame ) {
        if (get_playersnum() < get_pcvar_num(cvar_pLeft) - 2) {
            if (g_DidWaitEnough == 16) {
                client_print(0, print_chat, "%s %L", PREFIX, LANG_PLAYER, "PLAYERS_NOT_JOINING")
                set_pug_state(0)
                g_IsStarted = false
                g_AfterRdy = false
                new taskId = scanForTaskID()
                set_task(3.0, "MatchIsOver", taskId)
                return PLUGIN_HANDLED
            }
           
            new sum
            sum = g_DidWaitEnough * 15
            sum = 300 - sum
            client_print(0, print_chat, "%s %L", PREFIX, LANG_PLAYER, "TEAMS_VOTE_DELAY")
            set_hudmessage(255, 0, 0, 0.35, 0.66, 0, 6.0, 12.0)
            ShowSyncHudMsg(0, g_MsgSync6, "%L", LANG_PLAYER, "TEAMS_VOTE_DELAY_HUD", sum)
            g_DidWaitEnough++
            new taskId = scanForTaskID()
            set_task(15.0, "TeamsVote2", taskId)
            return PLUGIN_HANDLED
        }
           
    }
   
    set_pug_state(0)
    g_MapChanged = false
    g_AfterRdy = true
    g_DidWaitEnough = 0
   
    new title[86]
    new option1[32], option2[35], option3[35]
    formatex(title, charsmax(title), "\r%L", LANG_PLAYER, "TEAMS_TITLE")
    formatex(option1, charsmax(option1), "%L", LANG_PLAYER, "SAME_TEAMS")
    formatex(option2, charsmax(option2), "%L", LANG_PLAYER, "RANDOM_CAPTAINS")
    formatex(option3, charsmax(option3), "%L", LANG_PLAYER, "RANDOM_TEAMS")
    g_rVoteMenu = menu_create(title, "voteteams");
    menu_additem(g_rVoteMenu, option1)
    menu_additem(g_rVoteMenu, option2)
    menu_additem(g_rVoteMenu, option3)
   
    new pplayers[32], ppnum, ptempid;
    get_players(pplayers, ppnum, "ch");

    for( new i; i<ppnum; i++ ) {
        ptempid = pplayers[i]
        client_print(ptempid, print_chat, "%s %L", PREFIX, LANG_PLAYER, "TEAMS_PLEASE_VOTE")
        menu_display(ptempid, g_rVoteMenu)  //(line 2845)
    }

    client_cmd(0, "spk Gman/Gman_Choose1")
    new taskId = scanForTaskID()
    set_task(10.0, "EndTeamsVote", taskId)
    return PLUGIN_HANDLED
}
плз пофиксить ошибку

Start of error session.
Info (map "de_train") (file "addons/amxmodx/logs/error_20200720.log")
Plugin called menu_display when item=MENU_EXIT
[AMXX] Displaying debug trace (plugin "pimpspug.amxx", version "1.1.6")
[AMXX] Run time error 10: native error (native "menu_display")
[AMXX] [0] pimpspug.sma::TeamsVote2 (line 2845)

Безымянный.jpg
 
Статус
В этой теме нельзя размещать новые ответы.

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

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