- Ошибка
-
L 03/23/2022 - 12:17:35: Function is not present (function "bazooka_arena") (plugin "test_bazooka.amxx")
L 03/23/2022 - 12:17:35: [AMXX] Displaying debug trace (plugin "test_bazooka.amxx", version "1.3")
L 03/23/2022 - 12:17:35: [AMXX] Run time error 10: native error (native "set_task")
L 03/23/2022 - 12:17:35: [AMXX] [0] test_bazooka.sma::round_end (line 111)
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5263
- Билд
-
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.773-dev-mpatch
Build date: 13:54:08 Feb 22 2022 (2873)
- ReGamedll
-
ReGameDLL version: 5.20.0.492-dev
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.75 ini Start Never
[ 2] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5263 ini Start ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 9] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[10] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[11] Fun RUN - fun_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[14] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[15] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[16] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[17] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[18] ReAPI RUN - reapi_amxx_i386.so v5.19.0.210-dev pl5 ANY Never
[19] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[20] CSDM2 RUN - csdm_amxx_i386.so v2.1.3c-KWo pl5 ANY ANY
[21] CURL AMXX RUN - curl_amxx_i386.so v1.1.1 pl5 ANY ANY
- Список плагинов
-
[ 1] GameCMS_API 5.5.5 zhorzh78 gamecms_api.amx running
[ 2] Admin Base 1.9.0.5262 AMXX Dev Team admin.amxx running
[ 3] unknown unknown unknown csstats.amxx debug
[ 4] CSXSQL: Onlinetime Awa 0.2 serfreeman1337 csstatsx_playti debug
[ 5] [REAPI] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am debug
[ 6] Admin Chat 1.9.0.5262 AMXX Dev Team adminchat.amxx running
[ 7] Admin Commands 1.9.0.5262 AMXX Dev Team admincmd.amxx running
[ 8] Slots Reservation 1.9.0.5262 AMXX Dev Team adminslots.amxx running
[ 9] Admin Votes 1.9.0.5262 AMXX Dev Team adminvote.amxx running
[ 10] Commands Menu 1.9.0.5262 AMXX Dev Team cmdmenu.amxx running
[ 11] Maps Menu 1.9.0.5262 AMXX Dev Team mapsmenu.amxx running
[ 12] Multi-Lingual System 1.9.0.5262 AMXX Dev Team multilingual.am running
[ 13] New Kick Menu 1.3.2 Radius newkickmenu.amx running
[ 14] Players Menu 1.9.0.5262 AMXX Dev Team plmenu.amxx running
[ 15] Stats Configuration 1.9.0.5262 AMXX Dev Team statscfg.amxx running
[ 16] Automatic Unstuck 1.5 NL)Ramon(NL UnStuck.amxx debug
[ 17] CSDM Spawn Editor 2.1.3d CSDM Team spawn_editor.am running
[ 18] Build Dispenser #1.0.5 NOVA csdm_dispenser_ debug
[ 19] Mine 1.0 ill csdm_mine.amxx running
[ 20] BazookaAdvanced 1.3 Major Victory test_bazooka.am debug
[ 21] menu 1.2 NOVA menu.amxx running
[ 22] NewCSDM_Menu 1.2 Sanja menu_gun.amxx running
[ 23] NewCSDM_Menu 1.2 FORGAME.SU menu_instal.amx running
[ 24] Model_redaktor 1.0 N.O.V.A models.amxx debug
[ 25] Normal Mode Kriss SV R 2.0 Asep, Credits : normal-mode_kri running
[ 26] Golden Ak 47 1.0 AlejandroSk gold_ak_47.amxx running
[ 27] Golden Ak 47 1.0 AlejandroSk gold_ak_47_2.am running
[ 28] Golden Ak 47 1.0 AlejandroSk led_ak_47.amxx running
[ 29] Golden Ak 47 1.0 AlejandroSk zwer_ak_47.amxx running
[ 30] Golden Ak 47 1.0 AlejandroSk poladin_ak_47.a running
[ 31] Golden Ak 47 1.0 AlejandroSk gold_m4a1_2.amx running
[ 32] Golden Ak 47 1.0 AlejandroSk gold_m4a1.amxx running
[ 33] Golden Ak 47 1.0 AlejandroSk led_awp.amxx running
[ 34] Golden Ak 47 1.0 AlejandroSk gold_awp.amxx running
[ 35] Golden Ak 47 1.0 AlejandroSk gold_digl.amxx running
[ 36] [ZP] Extra: M134 1.0 LARS-DAY[BR]EAKE azp_weapon_m134 running
[ 37] BunnyHop 1.2 PurposeLess rebunnyhop.amxx debug
[ 38] CS Shop 5.0 iNeedHelp CS_Shop.amxx debug
[ 39] Map Manager RU 1.2.2 Mistrick mapmanager_ru.a running
[ 40] unknown unknown unknown test_timevote.a running
[ 41] Back Weapons RBS 15.07.15 hoboman313/cheap backweapons_rbs running
[ 42] unknown unknown unknown test_autoteam.a running
[ 43] Reset Score 0.2 Silenttt / CepeH RESET_SCORE_V0. running
[ 44] Menu_up 1.0 NOVA menu_predmet.am debug
[ 45] [ZP] Extra: Unlimited 1.0 MeRcyLeZZ zp_extra_unlimi running
[ 46] Menu - Creator None Pir menu_creator.am debug
[ 47] NewCSDM_Menu 1.2 Sanja vip_menu.amxx running
[ 48] vipmenu 1.0 Super VipMenu Cr admin_menu.amxx running
[ 49] Hero_bay_NOVA 1.0 N.O.V.A hero.amxx debug
[ 50] unknown unknown unknown test_parachute. running
[ 51] VIP 3.2 NOVA IDEAL_VIP.amxx running
[ 52] Lite Translit 2.8 neygomon lite_translit.a running
[ 53] Vampire 1.0c Shalfey vampire.amxx running
[ 54] Damager 1.0 Prayer damager.amxx running
[ 55] Remove Drop Weapons 0.0.2 Athix Remove_Drop_Wea running
[ 56] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 57] [All mod] Grab 2.1 Ian Cammarata / grab.amxx running
[ 58] chec_hp 1.0 Sanja chec_hp.amxx running
[ 59] Sentry guns 3.0 forgame.su sentrygun.amxx debug
[ 60] unknown unknown unknown money.amxx running
[ 61] Radio Commands: Stalke 0.2 Pir NewRadioCommand debug
[ 62] custom.hpk Control 2.0 Northon customhpk_contr running
[ 63] Fix AutoBuy Bug 1.1 PomanoB & UFPS.T autobuyfix.amxx running
[ 64] SF TripMine 0.3.4 serfreeman1337 lasermine_2.amx debug
[ 65] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 66] Admin Check 1.51 OneEyed admin_check.amx running
[ 67] unknown unknown unknown AmxModMenuML.am running
[ 68] Simple AFK Manager 2.2 [gm-project.net] sam.amxx debug
[ 69] Game Namer 1.1 NeuroToxin gamenamechanger running
[ 70] auto_change_map 1.0 Black_Hawk auto_change_map running
[ 71] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx running
[ 72] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike running
[ 73] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 74] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am debug
[ 75] AES: Admin Tools 0.5 Vega serfreeman1337 aes_exp_editor. running
[ 76] AES: Bonus System 0.5 Vega serfreeman1337 aes_bonus_syste running
[ 77] AES: Bonus CSTRIKE 0.5 Vega serfreeman1337 aes_bonus_cstri running
[ 78] AES: Status Info 0.1 serfreeman1337 aes_status_info running
[ 79] CSDM Main 2.1.1 CSDM Team csdm_main.amxx running
[ 80] CSDM Equip 2.1.1 CSDM Team csdm_equip.amxx running
[ 81] CSDM Mod 2.1.1 CSDM Team csdm_spawn_pres running
[ 82] CSDM Misc 2.1.1 CSDM Team csdm_misc.amxx running
[ 83] CSDM Protection 2.1.1 BAILOPAN csdm_protection running
[ 84] CSDM Main 2.1.1 CSDM Team csdm_ffa.amxx running
[ 85] AMXBans: Screens 1.9.0 MA: 1.6.14 Larte Team amxbans_ssban.a running
85 plugins, 85 running
- Автор плагина
- Не знаю
- Версия плагина
- 1.3
- Исходный код
-
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <engine>
#include <fun>
#include <cstrike>
#include <amxmisc>
#include <hamsandwich>
#define TE_EXPLOSION 3
#define TE_EXPLFLAG_NONE 0
#define TE_SMOKE 5
#define TE_BLOODSPRITE 115
#define TE_BLOODSTREAM 101
#define TE_MODEL 106
#define TE_WORLDDECAL 116
#define BA_NORMAL (1<<0) // "a"
#define BA_HEAT (1<<1) // "b"
#define BA_USER (1<<2) // "c"
#define COST_BAZOOKA 9000
new g_sModelIndexFireball, g_sModelIndexSmoke, rocketsmoke
new bool:CanShoot[32], Munni[32], mode[32], bool:allow_shooting, user_controll[32], bool:hasBazooka[32]
new mdl_gib_flesh, mdl_gib_head, mdl_gib_legbone, mdl_gib_lung, mdl_gib_meat, mdl_gib_spine, spr_blood_drop, spr_blood_spray
new gHealthIndex[33], bool:cantplantbomb, bool:cantswitch, iFlags, modetext[64]
public plugin_init() {
register_plugin("BazookaAdvanced", "1.3", "Major Victory")
register_cvar("amx_bazooka_dropping", "1")// can a player drop a bazooka
register_cvar("amx_bazooka_ammo", "1")// how much ammo per bazooka
register_cvar("amx_bazooka_damageradius", "250")
register_cvar("amx_bazooka_maxdamage", "250")
register_cvar("amx_bazooka_buyable", "1")//diasbles/enables the buy menu
register_cvar("amx_bazooka_restrict", "bc") // a = Normal | b = Heat-Seeking | c = User-Guided
register_cvar("amx_bazooka_reloadtime", "2.5")// in seconds
register_cvar("amx_bazooka_trailtime", "30")// roughly 3 seconds
register_cvar("amx_bazooka_velocity", "700")
register_cvar("amx_bazooka_teamcolors", "1")// set to 1 for team colored trails
register_cvar("amx_bazooka_gib", "1")// set to 1 for gib deaths (may cause lag on slower computers)
//register_clcmd("bazooka", "native_give")
register_clcmd("say", "handle_say")
register_clcmd("say_team", "handle_say")
register_event("DeathMsg", "player_die", "a")
register_event("TextMsg", "bomb_msg", "b", "2=#C4_Plant_At_Bomb_Spot")
register_event("ResetHUD","event_respawn","be","1=1")
register_logevent("round_end", 2, "1=Round_End")
register_logevent("round_start", 2, "1=Round_Start")
RegisterHam(Ham_Item_Deploy, "weapon_c4", "ham_item_deploy_post",1)
register_clcmd("drop", "handle_drop")
register_forward(FM_PlayerPreThink, "forward_playerprethink")
register_forward(FM_SetModel, "forward_setmodel")
register_menu("Bazooka Menu", 1023, "do_bazookamenu")
register_logevent("bombplant",3,"2=Planted_The_Bomb")
}
public ham_item_deploy_post(weapon_ent){
static id;id=get_pdata_cbase(weapon_ent,41,4)
set_pev(id, pev_viewmodel2, "models/nova/gun/bazooka/v_bazooka_3.mdl")
set_pev(id, pev_weaponmodel2, "models/nova/gun/bazooka/p_bazooka_3.mdl")
}
public plugin_precache() {
precache_model("models/nova/gun/bazooka/missile_5.mdl")
precache_model("models/nova/gun/bazooka/w_bazooka_3.mdl")
precache_model("models/nova/gun/bazooka/v_bazooka_3.mdl")
precache_model("models/nova/gun/bazooka/p_bazooka_3.mdl")
precache_sound("weapons/rocketfire1.wav")
precache_sound("items/gunpickup4.wav")
precache_sound("weapons/nuke_fly.wav")// <-- this is the only non-game sound file, make sure you have it
precache_sound("weapons/dryfire1.wav")
spr_blood_drop = precache_model("sprites/blood.spr")
spr_blood_spray = precache_model("sprites/bloodspray.spr")
mdl_gib_flesh = precache_model("models/Fleshgibs.mdl")
mdl_gib_head = precache_model("models/GIB_Skull.mdl")
mdl_gib_legbone = precache_model("models/GIB_Legbone.mdl")
mdl_gib_lung = precache_model("models/GIB_Lung.mdl")
mdl_gib_meat = precache_model("models/GIB_B_Gib.mdl")
mdl_gib_spine = precache_model("models/GIB_B_Bone.mdl")
g_sModelIndexFireball = precache_model("sprites/zerogxplode.spr")
g_sModelIndexSmoke = precache_model("sprites/steam1.spr")
rocketsmoke = precache_model("sprites/smoke.spr")
}
public get_restrict_flags() {
new sFlags[24]
get_cvar_string("amx_bazooka_restrict",sFlags,24)
iFlags = read_flags(sFlags)
}
public bomb_msg(id) {
if (cs_get_user_plant(id) != 1)
client_print(id,print_center,"")
}
public bombplant() {
cantplantbomb = true
}
public round_end() {
set_task(4.8, "round_prestart")
set_task(5.0, "player_spawn")
set_task(5.2, "bazooka_arena")
}
public round_prestart() {
allow_shooting = false
cantplantbomb = true
cantswitch = true
}
public round_start() {
allow_shooting = true
cantplantbomb = false
cantswitch = false
}
public fire_rocket(id) {
ammo_hud(id, 0)
ammo_hud(id, 1)
CanShoot[id] = false
UTIL_PlayWeaponAnimation(id, 4)
new data[1]
data[0] = id
new rtime = get_cvar_num("amx_bazooka_reloadtime")
if (cs_get_user_plant(id) != 1){
set_task((rtime + 0.0), "rpg_reload", id+9477, data, 1)
if ((Munni[id] <= 0))
{
emit_sound(id, CHAN_WEAPON, "weapons/dryfire1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
return PLUGIN_HANDLED
}
else{
new Float:StartOrigin[3], Float:Angle[3]
new PlayerOrigin[3]
get_user_origin(id, PlayerOrigin, 1)
StartOrigin[0] = float(PlayerOrigin[0])
StartOrigin[1] = float(PlayerOrigin[1])
StartOrigin[2] = float(PlayerOrigin[2])
entity_get_vector(id, EV_VEC_v_angle, Angle)
Angle[0] = Angle[0] * -1.0
new RocketEnt = create_entity("info_target")
entity_set_string(RocketEnt, EV_SZ_classname, "rpgrocket")
entity_set_model(RocketEnt, "models/nova/gun/bazooka/missile_5.mdl")
entity_set_origin(RocketEnt, StartOrigin)
entity_set_vector(RocketEnt, EV_VEC_angles, Angle)
new Float:MinBox[3] = {-1.0, -1.0, -1.0}
new Float:MaxBox[3] = {1.0, 1.0, 1.0}
entity_set_vector(RocketEnt, EV_VEC_mins, MinBox)
entity_set_vector(RocketEnt, EV_VEC_maxs, MaxBox)
entity_set_int(RocketEnt, EV_INT_solid, 2)
entity_set_int(RocketEnt, EV_INT_movetype, 5)
entity_set_edict(RocketEnt, EV_ENT_owner, id)
new Float:Velocity[3]
new myvelocity = get_cvar_num("amx_bazooka_velocity")
VelocityByAim(id, myvelocity, Velocity)
entity_set_vector(RocketEnt, EV_VEC_velocity, Velocity)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(22);
write_short(RocketEnt);
write_short(rocketsmoke);
write_byte(30);
write_byte(3);
write_byte(255);
write_byte(255);
write_byte(255);
write_byte(255);
message_end();
emit_sound(RocketEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
emit_sound(RocketEnt, CHAN_VOICE, "weapons/nuke_fly.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public rpg_reload(data[]) {
CanShoot[data[0]] = true
}
public pfn_touch(ptr, ptd) {
new ClassName[32]
new ClassNameptd[32]
if ((ptr > 0) && is_valid_ent(ptr)) {
entity_get_string(ptr, EV_SZ_classname, ClassName, 31)
}
if ((ptd > 0) && is_valid_ent(ptd)) {
entity_get_string(ptd, EV_SZ_classname, ClassNameptd, 31)
}
if (equal(ClassName, "rpgrocket")) {
remove_task(ptr)
new Float:EndOrigin[3]
entity_get_vector(ptr, EV_VEC_origin, EndOrigin)
message_begin( MSG_BROADCAST, SVC_TEMPENTITY) // Explosion
write_byte(TE_EXPLOSION)
write_coord(floatround(EndOrigin[0]))
write_coord(floatround(EndOrigin[1]))
write_coord(floatround(EndOrigin[2])+5)
write_short(g_sModelIndexFireball)
write_byte(random_num(0,20) + 20)
write_byte(12) // framerate
write_byte(TE_EXPLFLAG_NONE)
message_end()
message_begin(MSG_BROADCAST, SVC_TEMPENTITY) // Smoke
write_byte(TE_SMOKE)
write_coord(floatround(EndOrigin[0]))
write_coord(floatround(EndOrigin[1]))
write_coord(floatround(EndOrigin[2])+15)
write_short(g_sModelIndexSmoke)
write_byte(60)
write_byte(10)
message_end()
new maxdamage = get_cvar_num("amx_bazooka_maxdamage")
new damageradius = get_cvar_num("amx_bazooka_damageradius")
new ent=ptr
new victim=FM_NULLENT, Float:vOrigin[3], Float:temp, attacker, Float:damage, Float:radius
attacker=pev(ent, pev_owner)
radius=250.0
while((victim=fm_find_ent_in_sphere(victim, EndOrigin, radius))!=0)
{
if(pev(victim, pev_takedamage)!=DAMAGE_NO&&pev(victim, pev_solid)!=SOLID_NOT)
{
damage=00.0
if(1<=victim<=32)
{
if(is_user_alive(victim)&&fm_cs_get_user_team(victim)!=fm_cs_get_user_team(pev(ent, pev_owner)))
{
pev(victim, pev_origin, vOrigin)
temp=vector_distance(EndOrigin, vOrigin)
if(temp<1.0)temp=1.0
if(temp>radius)temp=radius
damage-=(damage/radius)*temp
if(damage<90.0) damage=90.0
ExecuteHamB(Ham_TakeDamage, victim, ent, attacker, damage, DMG_BULLET|DMG_ALWAYSGIB)
}
}
else
ExecuteHamB(Ham_TakeDamage, victim, ent, attacker, 500.0, DMG_BLAST)
}
}
attach_view(entity_get_edict(ptr, EV_ENT_owner), entity_get_edict(ptr, EV_ENT_owner))
user_controll[entity_get_edict(ptr, EV_ENT_owner)] = 0
remove_entity(ptr)
}
if (equal(ClassName, "rpg") || equal(ClassName, "rpg_temp")) {
new Picker[32]
if ((ptd > 0) && is_valid_ent(ptd)) {
entity_get_string(ptd, EV_SZ_classname, Picker, 31)
}
if (equal(Picker, "player")) {
give_item(ptd, "weapon_c4")
hasBazooka[ptd] = true
Munni[ptd] = Munni[ptd] + entity_get_int(ptr, EV_INT_iuser1)
client_print(ptd, print_chat, "[Bazooka] You have picked up a bazooka!")
ammo_hud(ptd, 0)
ammo_hud(ptd, 1)
emit_sound(ptd, CHAN_WEAPON, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
remove_entity(ptr)
}
}
}
stock fm_cs_get_user_team(id)
{
if (pev_valid(id) != 2) return 0
return get_pdata_int(id, 114, 5)
}
public drop_rpg(id, level, cid) {
if (!cmd_access(id, level, cid, 1)) {
return PLUGIN_HANDLED
}
new Float:PlayerOrigin[3], Float:End[3], Float:Return[3], Float:TraceDirection[3]
entity_get_vector(id, EV_VEC_origin, PlayerOrigin)
VelocityByAim(id, 64, TraceDirection)
End[0] = TraceDirection[0] + PlayerOrigin[0]
End[1] = TraceDirection[1] + PlayerOrigin[1]
End[2] = TraceDirection[2] + PlayerOrigin[2]
trace_line(id, PlayerOrigin, End, Return)
Return[2] = PlayerOrigin[2]
new RPG = create_entity("info_target")
entity_set_string(RPG, EV_SZ_classname, "rpg")
entity_set_model(RPG, "models/nova/gun/bazooka/w_bazooka_3.mdl")
entity_set_origin(RPG, Return)
new Float:MinBox[3] = {-16.0, -16.0, 0.0}
new Float:MaxBox[3] = {16.0, 16.0, 16.0}
entity_set_vector(RPG, EV_VEC_mins, MinBox)
entity_set_vector(RPG, EV_VEC_maxs, MaxBox)
entity_set_int(RPG, EV_INT_solid, 1)
entity_set_int(RPG, EV_INT_movetype, 6)
entity_set_int(RPG, EV_INT_iuser1, get_cvar_num("amx_bazooka_ammo"))
return PLUGIN_HANDLED
}
public client_PreThink(id) {
if (is_user_alive(id)) {
new weaponid, clip, ammo
weaponid = get_user_weapon(id, clip, ammo)
if ((weaponid == CSW_C4) && hasBazooka[id]) {
new attack = get_user_button(id) & IN_ATTACK
new oldattack = get_user_oldbutton(id) & IN_ATTACK
new attack2 = get_user_button(id) & IN_ATTACK2
new oldattack2 = get_user_oldbutton(id) & IN_ATTACK2
new CsTeams:iTeam =cs_get_user_team(id)
if (attack && (cs_get_user_plant(id) != 1)) {
get_restrict_flags()
if (mode[id] != 1 && ((iFlags&BA_USER) || (iFlags&BA_HEAT))) {
mode[id] = 1
if (CanShoot[id] && allow_shooting && (user_controll[id] == 0)) {
fire_rocket(id)
}
}
else {
if (CanShoot[id] && allow_shooting && (user_controll[id] == 0)) {
fire_rocket(id)
}
}
}
}
}
if (user_controll[id] > 0) {
new RocketEnt = user_controll[id]
if (is_valid_ent(RocketEnt)) {
new Float:Velocity[3]
VelocityByAim(id, 500, Velocity)
entity_set_vector(RocketEnt, EV_VEC_velocity, Velocity)
new Float:NewAngle[3]
entity_get_vector(id, EV_VEC_v_angle, NewAngle)
entity_set_vector(RocketEnt, EV_VEC_angles, NewAngle)
}
else {
attach_view(id, id)
}
}
return FMRES_IGNORED
}
public forward_setmodel(entity, model[]) {
if (!is_valid_ent(entity)) {
return FMRES_IGNORED
}
if (equal(model, "models/w_backpack.mdl")) {
client_print(0, print_center, "")
new ClassName[32]
entity_get_string(entity, EV_SZ_classname, ClassName, 31)
if (equal(ClassName, "weaponbox")) {
remove_entity(entity)
return FMRES_SUPERCEDE
}
}
return FMRES_IGNORED
}
public client_connect(id) {
CanShoot[id] = true
Munni[id] = 0
mode[id] = 1
hasBazooka[id] = false
}
ammo_hud(id, show) {
}
public player_die(id) {
new victim
victim = read_data(2)
ammo_hud(victim, 0)
Munni[victim] = 0
hasBazooka[victim] = false
/*
if ((cs_get_user_plant(victim) == 1) || cantswitch) {
cs_set_user_plant(victim,0,0)
cantswitch = false
}*/
}
public player_spawn() {
return PLUGIN_HANDLED
}
public handle_drop(id)
{
if (read_argc() > 1)
{
new weapon[17]
read_argv(1, weapon, 16)
if (equal(weapon, "weapon_c4"))
{
new weapons[32], count
get_user_weapons(id, weapons, count)
for (new i = 0; i < count; i++)
{
if (weapons[i] == 6)
{
return PLUGIN_HANDLED
}
}
}
}
else
{
new weaponid, clip, ammo
weaponid = get_user_weapon(id, clip, ammo)
if (weaponid == CSW_C4)
{
return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}
public drop_rpg_temp(id) {
return PLUGIN_HANDLED
}
public handle_say(id) {
return PLUGIN_CONTINUE
}
public show_buymenu(id) {
return PLUGIN_HANDLED
}
/************************************************************
* GIB FUNCTIONS (made by mike_cao)
************************************************************/
public event_respawn(id)
{
gHealthIndex[id] = get_user_health(id)
fx_trans(id,255)
return PLUGIN_CONTINUE
}
static fx_trans(player,amount)
{
/*
set_user_rendering(player,kRenderFxNone,0,0,0,kRenderTransAlpha,amount)
*/
return PLUGIN_CONTINUE
}
static fx_gib_explode(origin[3],num)
{
new flesh[3], x, y, z
flesh[0] = mdl_gib_flesh
flesh[1] = mdl_gib_meat
flesh[2] = mdl_gib_legbone
// Gib explosion
// Head
/*
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_MODEL)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(random_num(-100,100))
write_coord(random_num(-100,100))
write_coord(random_num(100,200))
write_angle(random_num(0,360))
write_short(mdl_gib_head)
write_byte(0) // bounce
write_byte(500) // life
message_end()
// Spine
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_MODEL)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(random_num(-100,100))
write_coord(random_num(-100,100))
write_coord(random_num(100,200))
write_angle(random_num(0,360))
write_short(mdl_gib_spine)
write_byte(0) // bounce
write_byte(500) // life
message_end()
// Lung
for(new i = 0; i < random_num(1,2); i++) {
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_MODEL)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(random_num(-100,100))
write_coord(random_num(-100,100))
write_coord(random_num(100,200))
write_angle(random_num(0,360))
write_short(mdl_gib_lung)
write_byte(0) // bounce
write_byte(500) // life
message_end()
}
// Parts, 10 times
for(new i = 0; i < 10; i++) {
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_MODEL)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(random_num(-100,100))
write_coord(random_num(-100,100))
write_coord(random_num(100,200))
write_angle(random_num(0,360))
write_short(flesh[random_num(0,2)])
write_byte(0) // bounce
write_byte(500) // life
message_end()
}
// Blood
for(new i = 0; i < num; i++) {
x = random_num(-100,100)
y = random_num(-100,100)
z = random_num(0,100)
for(new j = 0; j < 3; j++) {
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_BLOODSPRITE)
write_coord(origin[0]+(x*j))
write_coord(origin[1]+(y*j))
write_coord(origin[2]+(z*j))
write_short(spr_blood_spray)
write_short(spr_blood_drop)
write_byte(229) // color index
write_byte(15) // size
message_end()
}
}
*/
}
public plugin_natives()
{
register_native("b_give", "native_give", 1)
}
public native_give(player)
{
if(cs_get_user_money( player ) >= COST_BAZOOKA)
{
give_item(player, "weapon_c4")
hasBazooka[player] = true
Munni[player] += 25
ammo_hud(player, 0)
ammo_hud(player, 1)
cs_set_user_money( player, cs_get_user_money( player ) - COST_BAZOOKA );
}
}
stock UTIL_PlayWeaponAnimation(const Player, const Sequence)
{
set_pev(Player, pev_weaponanim, Sequence)
message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = Player)
write_byte(Sequence)
write_byte(pev(Player, pev_body))
message_end()
}
Ошибка в работе плагина в логах error Исходный файл
23 Мар 2022
В этой теме было размещено решение! Перейти к решению.
Вложения
-
16.8 KB Просмотры: 112