Server Crash -Shutdown Molotov from "CSGOMod"

Сообщения
50
Реакции
-1
Ошибка
./hlds_run: line 255: 25113 Segmentation fault (core dumped) $HL_CMD
BFD: Warning: /home2/cs16_clubs/cs-20001/core.25113 is truncated: expected core file size >= 154329088, found: 3014656.
Cannot access memory at address 0xf77628e8
Cannot access memory at address 0xf77628e4
Failed to read a valid object file image from memory.
Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0xffdb9bcc:
Cannot access memory at address 0xf77628e8
Cannot access memory at address 0xf77628e4
debug.cmds:4: Error in sourced command file:
Cannot access memory at address 0xffdb9bcc
email debug.log to [email protected]
Sun Dec 13 14:57:51 IST 2020: Server restart in 10 seconds
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5271  also with AMXX 1.10.0
Билд
ReHLDS version: 3.8.0.702-dev
ReGamedll
ReGameDLL version: 5.19.0.486-dev
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Список метамодулей
urrently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92c ini Start Never
[ 3] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 6] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 7] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 8] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
X[13] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl1 ANY ANY [14] ReAPI RUN - reapi_amxx_i386.so v5.18.0.203-dev pl1 ANY Never
14 plugins, 14 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5271 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5271 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5271 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5271 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5271 AMXX Dev Team scrollmsg.amxx running
X[ 14] Info. Messages 1.9.0.5271 AMXX Dev Team imessage.amxx running [ 15] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5271 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5271 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5271 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.9.0.5271 AMXX Dev Team statsx.amxx running
[ 22] CS:GO Molotov 2.3.0 DynamicBits & O' molotov_fin.amx running
22 plugins, 22 running
Автор плагина
thedoctor
Версия плагина
2.3.0
Исходный код
#include <amxmodx>
#include <fakemeta_util>
#include <cstrike>
#include <engine>
#include <hamsandwich>
#include <fun>
#include <csgomod>

#define PLUGIN "CS:GO Molotov"
#define AUTHOR "DynamicBits & O'Zone"

#define TASK_RESET 1000
#define TASK_OFFSET 10
#define TASK_BASE1 2000
#define TASK_BASE2 TASK_BASE1 + (TASK_OFFSET * MAX_PLAYERS)
#define TASK_BASE3 TASK_BASE1 + TASK_BASE2 + (TASK_OFFSET * MAX_PLAYERS)

enum { ViewModel, PlayerModel, WorldModel, WorldModelBroken }
new const models[][] = {
"models/csgo_ozone/molotov/v_molotov.mdl",
"models/csgo_ozone/molotov/p_molotov.mdl",
"models/csgo_ozone/molotov/w_molotov.mdl",
"models/csgo_ozone/molotov/w_broken_molotov.mdl"
};

enum { Fire, Explode, Extinguish }
new const sounds[][] = {
"weapons/molotov_fire.wav",
"weapons/molotov_explode.wav",
"weapons/molotov_extinguish.wav",
"weapons/molotov_pinpull.wav",
"weapons/molotov_throw.wav",
"weapons/molotov_draw.wav",
};

new const molotovWeaponName[] = "weapon_hegrenade", molotovClassName[] = "molotov";

new const commandBuy[][] = { "say /molotov", "say_team /molotov", "say /m", "say_team /m", "molotov" };

new molotovEnabled, molotovPrice, molotov, mapBuyBlock, fireSprite, smokeSprite[2], molotovOffset[MAX_PLAYERS + 1],
bool:restarted, bool:reset, Float:molotovRadius, Float:molotovFireTime, Float:molotovFireDamage, Float:gameTime;

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

for (new i; i < sizeof commandBuy; i++) register_clcmd(commandBuy[i], "buy_molotov");

bind_pcvar_num(create_cvar("csgo_molotov_enabled", "1"), molotovEnabled);
bind_pcvar_num(create_cvar("csgo_molotov_price", "500"), molotovPrice);
bind_pcvar_float(create_cvar("csgo_molotov_radius", "150.0"), molotovRadius);
bind_pcvar_float(create_cvar("csgo_molotov_firetime", "7.0"), molotovFireTime);
bind_pcvar_float(create_cvar("csgo_molotov_firedamage", "3.0"), molotovFireDamage);

register_event("DeathMsg", "event_deathmsg", "a", "2>0");
register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
register_event("TextMsg", "event_game_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in");

register_logevent("event_round_end", 2, "1=Round_End");

RegisterHam(Ham_Item_Deploy, molotovWeaponName, "molotov_deploy_model", 1);
RegisterHam(Ham_Spawn, "player", "player_spawned", 1);

register_forward(FM_EmitSound, "sound_emit");
register_forward(FM_KeyValue, "key_value", 1);
register_forward(FM_SetModel, "set_model", 0);
}

public plugin_natives()
register_native("csgo_get_user_molotov", "_csgo_get_user_molotov", 1);

public plugin_precache()
{
fireSprite = precache_model("sprites/flame.spr");
smokeSprite[0] = precache_model("sprites/black_smoke3.spr");
smokeSprite[1] = precache_model("sprites/steam1.spr");

precache_sound("items/9mmclip1.wav");

new i, failed;

for (i = 0; i < sizeof models; i++) {
if (file_exists(models[i])) precache_model(models[i]);
else
{
log_amx("[CS:GO] Molotov file '%s' not exist. Skipped!", models[i]);

failed = true;
}
}

new filePath[64];

for (i = 0; i < sizeof sounds; i++) {
formatex(filePath, charsmax(filePath), "sound\%s", sounds[i]);

if (file_exists(filePath)) precache_sound(sounds[i]);
else {
log_amx("[CS:GO] Molotov file '%s' not exist. Skipped!", sounds[i]);

failed = true;
}
}

if (failed) set_fail_state("[CS:GO] Not all molotov files were precached. Check logs!");
}

public key_value(ent, keyValueId)
{
if (pev_valid(ent)) {
new className[32], keyName[32], keyValue[32];

get_kvd(keyValueId, KV_ClassName, className, charsmax(className));
get_kvd(keyValueId, KV_KeyName, keyName, charsmax(keyName));
get_kvd(keyValueId, KV_Value, keyValue, charsmax(keyValue));

if (equali(className, "info_map_parameters") && equali(keyName, "buying")) {
if (str_to_num(keyValue) != 0) mapBuyBlock = str_to_num(keyValue);
}
}
}

public client_putinserver(id)
rem_bit(id, molotov);

public client_disconnected(id)
{
rem_bit(id, molotov);

remove_molotovs(id);
}

public buy_molotov(id)
{
if (!molotovEnabled || !pev_valid(id) || !cs_get_user_buyzone(id) || !is_user_alive(id)) return PLUGIN_HANDLED;

new Float:cvarBuyTime = get_cvar_float("mp_buytime"), Float:buyTime;

static msgText;

if (!msgText) msgText = get_user_msgid("TextMsg");

if (cvarBuyTime != -1.0 && !(get_gametime() < gameTime + (buyTime = cvarBuyTime * 60.0))) {
new buyTimeText[8];

num_to_str(floatround(buyTime), buyTimeText, charsmax(buyTimeText));

message_begin(MSG_ONE, msgText, _, id);
write_byte(print_center);
write_string("#Cant_buy");
write_string(buyTimeText);
message_end();

return PLUGIN_HANDLED;
}

if ((mapBuyBlock == 1 && cs_get_user_team(id) == CS_TEAM_CT) || (mapBuyBlock == 2 && cs_get_user_team(id) == CS_TEAM_T) || mapBuyBlock == 3) {
message_begin(MSG_ONE, msgText, _, id);
write_byte(print_center);

if (cs_get_user_team(id) == CS_TEAM_T) write_string("#Cstrike_TitlesTXT_Terrorist_cant_buy");
else if (cs_get_user_team(id) == CS_TEAM_CT) write_string("#Cstrike_TitlesTXT_CT_cant_buy");

message_end();

return PLUGIN_HANDLED;
}

new money = cs_get_user_money(id);

if (money < molotovPrice) {
message_begin(MSG_ONE, msgText, _, id);
write_byte(print_center);
write_string("#Not_Enough_Money");
message_end();

return PLUGIN_HANDLED;
}

if (get_bit(id, molotov)) {
message_begin(MSG_ONE, msgText, _, id);
write_byte(print_center);
write_string("#Cannot_Carry_Anymore");
message_end();

return PLUGIN_HANDLED;
}

cs_set_user_money(id, cs_get_user_money(id) - molotovPrice);

set_bit(id, molotov);

give_item(id, molotovWeaponName);

emit_sound(id, CHAN_AUTO, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

return PLUGIN_HANDLED;
}

public event_deathmsg()
rem_bit(read_data(2), molotov);

public event_game_restart()
restarted = true;

public event_round_end()
{
if (!reset) {
reset_tasks();

reset = true;
}
}

public event_new_round()
{
reset = false;

gameTime = get_gametime();

if (!molotovEnabled) return PLUGIN_CONTINUE;

if (restarted) {
for (new i; i <= MAX_PLAYERS; i++) rem_bit(i, molotov);

restarted = false;
}

reset_tasks();

remove_molotovs();

return PLUGIN_CONTINUE;
}

public molotov_deploy_model(weapon)
{
if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;

new id = get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX);

if (!molotovEnabled || !pev_valid(id) || !is_user_alive(id) || !get_bit(id, molotov)) return HAM_IGNORED;

set_pev(id, pev_viewmodel2, models[ViewModel]);
set_pev(id, pev_weaponmodel2, models[PlayerModel]);

return HAM_IGNORED;
}

public player_spawned(id)
{
if (!get_bit(id, molotov)) return;

set_task(0.1, "player_spawned_post", id);
}

public player_spawned_post(id)
{
if (!is_user_alive(id)) return;

give_item(id, molotovWeaponName);
}

public set_model(ent, model[])
{
if (!pev_valid(ent) || !molotovEnabled) return FMRES_IGNORED;

static className[9];

pev(ent, pev_classname, className, charsmax(className));

if (!equal(className, "grenade") || containi(model, "hegrenade") == -1) return FMRES_IGNORED;

new id = entity_get_edict(ent, EV_ENT_owner);

if (!is_user_connected(id) || !pev_valid(id) || !get_bit(id, molotov)) return FMRES_IGNORED;

set_pev(ent, pev_nextthink, 9999.0);
set_pev(ent, pev_team, get_user_team(id));

engfunc(EngFunc_SetModel, ent, models[WorldModel]);

return FMRES_SUPERCEDE;
}

public sound_emit(ent, channel, sample[])
{
if (!equal(sample[8], "he_bounce", 9) || !pev_valid(ent)) return FMRES_IGNORED;

static modelName[64];

pev(ent, pev_model, modelName, charsmax(modelName));

if (contain(modelName, models[WorldModel]) != -1) {
emit_sound(ent, CHAN_AUTO, "debris/glass2.wav", VOL_NORM, ATTN_STATIC, 0, PITCH_LOW);

new Float:velocity[3];

pev(ent, pev_velocity, velocity);

velocity[0] *= 0.01;
velocity[1] *= 0.01;
velocity[2] *= 0.01;

set_pev(ent, pev_velocity, velocity);

molotov_explode(ent);

return FMRES_SUPERCEDE;
}

if (contain(modelName, models[WorldModelBroken]) != -1) {
return FMRES_SUPERCEDE;
}

return FMRES_IGNORED;
}

stock molotov_explode(ent)
{
new Float:tempOrigin[3], origin[3], data[8], owner = pev(ent, pev_owner);

if (!pev_valid(owner)) return;

rem_bit(owner, molotov);

if (reset) {
set_pev(ent, pev_flags, pev(ent, pev_flags) | FL_KILLME);

return;
}

set_pev(ent, pev_classname, molotovClassName);

engfunc(EngFunc_SetModel, ent, models[WorldModelBroken]);
entity_set_int(ent, EV_INT_solid, SOLID_NOT);

pev(ent, pev_origin, tempOrigin);

new entFire = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));

set_pev(entFire, pev_classname, molotovClassName);
set_pev(entFire, pev_origin, tempOrigin);

if (molotovOffset[owner] == TASK_OFFSET - 1) molotovOffset[owner] = 0;

data[0] = ent;
data[1] = entFire;
data[2] = owner;
data[3] = molotovOffset[owner]++;
data[4] = pev(ent, pev_team);
data[5] = origin[0] = floatround(tempOrigin[0]);
data[6] = origin[1] = floatround(tempOrigin[1]);
data[7] = origin[2] = floatround(tempOrigin[2]);

if (extinguish_molotov(data)) return;

random_fire(origin, entFire);

emit_sound(ent, CHAN_AUTO, sounds[Explode], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

set_task(0.1, "fire_damage", TASK_BASE1 + (TASK_OFFSET * owner) + molotovOffset[owner], data, sizeof(data), "a", floatround(molotovFireTime / 0.1, floatround_floor));
set_task(1.0, "fire_sound", TASK_BASE2 + (TASK_OFFSET * owner) + molotovOffset[owner], data, sizeof(data), "a", floatround(molotovFireTime) - 1);

set_task(molotovFireTime, "fire_stop", TASK_BASE3 + (TASK_OFFSET * owner) + molotovOffset[owner], data, sizeof(data));
}

public fire_sound(data[])
{
new ent = data[0];

if (!pev_valid(ent)) return;

new owner = data[2];

if (pev_valid(owner) && is_user_connected(owner)) {
emit_sound(ent, CHAN_AUTO, sounds[Fire], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
} else {
fire_stop(data);
}
}

public fire_stop(data[])
{
new ent = data[0], entFire = data[1];

if (pev_valid(ent)) set_pev(ent, pev_flags, pev(ent, pev_flags) | FL_KILLME);
if (pev_valid(entFire)) set_pev(entFire, pev_flags, pev(entFire, pev_flags) | FL_KILLME);
}

public fire_damage(data[])
{
new ent = data[0], entFire = data[1], owner = data[2];

if (!pev_valid(ent) || !pev_valid(entFire) || !pev_valid(owner) || !is_user_connected(owner) || extinguish_molotov(data)) return;

new Float:newOrigin[3], origin[3];

origin[0] = data[5];
origin[1] = data[6];
origin[2] = data[7];

random_fire(origin, entFire);

IVecFVec(origin, newOrigin);

radius_damage2(owner, data[4], newOrigin, molotovFireDamage, molotovRadius);
}

public _csgo_get_user_molotov(id)
return get_bit(id, molotov);

stock radius_damage2(attacker, team, Float:origin[3], Float:damage, Float:range)
{
new Float:tempOrigin[3], Float:distance, Float:tempDamange;

for (new i = 1; i <= MAX_PLAYERS; i++) {
if (!is_user_alive(i) || (attacker != i && team == get_user_team(i))) continue;

pev(i, pev_origin, tempOrigin);

distance = get_distance_f(origin, tempOrigin);

if (distance > range) continue;

tempDamange = damage;

if (pev(i, pev_health) <= tempDamange) kill(attacker, i, team);
else fm_fakedamage(i, molotovClassName, tempDamange, DMG_BURN);
}
}

stock extinguish_molotov(data[])
{
new ent = data[0], entFire = data[1], owner = data[2];

if (!pev_valid(ent) || !pev_valid(entFire) || !pev_valid(owner) || !is_user_connected(owner)) return false;

static entList[16];

new Float:dmgTime, foundGrenades = find_sphere_class(ent, "grenade", molotovRadius * 0.75, entList, charsmax(entList));

for (new i = 0; i < foundGrenades; i++) {
if (grenade_is_smoke(entList[i])) {
new Float:velocity[3], Float:origin[3];

velocity[0] = 0.0;
velocity[1] = 0.0;
velocity[2] = 0.0;

entity_set_vector(entList[i], EV_VEC_velocity, velocity);
entity_get_vector(entList[i], EV_VEC_origin, origin);

origin[2] -= distance_to_floor(origin);

entity_set_origin(entList[i], origin);

pev(entList[i], pev_dmgtime, dmgTime);
set_pev(entList[i], pev_dmgtime, dmgTime - 3.0);

if (!user_has_weapon(owner, CSW_HEGRENADE)) {
rem_bit(owner, molotov);
}

remove_task(TASK_BASE1 + (TASK_OFFSET * owner) + data[3]);
remove_task(TASK_BASE2 + (TASK_OFFSET * owner) + data[3]);
remove_task(TASK_BASE3 + (TASK_OFFSET * owner) + data[3]);

if (pev_valid(ent)) {
emit_sound(entList[i], CHAN_AUTO, sounds[Extinguish], VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

set_pev(ent, pev_flags, pev(ent, pev_flags) | FL_KILLME);
}

if (pev_valid(entFire)) {
set_pev(entFire, pev_flags, pev(ent, pev_flags) | FL_KILLME);
}

return true;
}
}

return false;
}

stock random_fire(original[3], ent)
{
new range, origin[3], counter, i;

range = floatround(molotovRadius);

for (i = 1; i <= 5; i++) {
counter = 1;

origin[0] = original[0] + random_num(-range, range);
origin[1] = original[1] + random_num(-range, range);
origin[2] = original[2];
origin[2] = ground_z(origin, ent);

while (get_distance(origin, original) > range) {
origin[0] = original[0] + random_num(-range, range);
origin[1] = original[1] + random_num(-range, range);
origin[2] = original[2];

if (++counter >= 10) origin[2] = ground_z(origin, ent, 1);
else origin[2] = ground_z(origin, ent);
}

new random = random_num(5, 15);

message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_SPRITE);
write_coord(origin[0]);
write_coord(origin[1]);
write_coord(origin[2] + random * 5);
write_short(fireSprite);
write_byte(random);
write_byte(100);
message_end();
}

message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_SMOKE);
write_coord(origin[0]);
write_coord(origin[1]);
write_coord(origin[2] + 120);
write_short(smokeSprite[random_num(0, 1)]);
write_byte(random_num(10, 30));
write_byte(random_num(10, 20));
message_end();
}

stock reset_tasks()
{
for (new i = 1; i <= MAX_PLAYERS; i++) {
for (new j = 0; j < TASK_OFFSET; j++) {
remove_task(TASK_BASE1 + (TASK_OFFSET * i) + j);
remove_task(TASK_BASE2 + (TASK_OFFSET * i) + j);
remove_task(TASK_BASE3 + (TASK_OFFSET * i) + j);
}
}
}

stock kill(killer, victim, team)
{
if (!pev_valid(killer) || !pev_valid(victim) || !is_user_connected(killer) || !is_user_alive(victim)) return;

static msgDeathMsg;

if (!msgDeathMsg) msgDeathMsg = get_user_msgid("DeathMsg");

message_begin(MSG_ALL, msgDeathMsg, {0,0,0}, 0);
write_byte(killer);
write_byte(victim);
write_byte(0);
write_string(molotovClassName);
message_end();

new msgBlock = get_msg_block(msgDeathMsg);

set_msg_block(msgDeathMsg, BLOCK_ONCE);

new killerFrags = get_user_frags(killer),
victimFrags = get_user_frags(victim);

if (killer != victim) fm_set_user_frags(victim, victimFrags + 1);

if (team != get_user_team(victim)) killerFrags++;
else killerFrags--;

fm_set_user_frags(killer, killerFrags);

user_kill(victim, 0);
set_msg_block(msgDeathMsg, msgBlock);

new victimName[32], victimAuth[35], victimTeam[32];

get_user_name(victim, victimName, charsmax(victimName));
get_user_authid(victim, victimAuth, charsmax(victimAuth));
get_user_team(victim, victimTeam, charsmax(victimTeam));

if (killer == victim) {
log_message("^"%s<%d><%s><%s>^" committed suicide with ^"molotov^"", victimName, get_user_userid(victim), victimAuth, victimTeam);
} else if (is_user_connected(killer)) {
new killerName[32], killerAuth[35], killerTeam[32];

get_user_name(killer, killerName, charsmax(killerName));
get_user_authid(killer, killerAuth, charsmax(killerAuth));
get_user_team(killer, killerTeam, charsmax(killerTeam));

log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"molotov^"", killerName, get_user_userid(killer), killerAuth, killerTeam, victimName, get_user_userid(victim), victimAuth, victimTeam);
}

if (killer != victim) {
new money = cs_get_user_money(killer) + 300;

cs_set_user_money(killer, money > 16000 ? 16000 : money);
}

static msgScoreInfo;

if (!msgScoreInfo) msgScoreInfo = get_user_msgid("ScoreInfo");

message_begin(MSG_ALL, msgScoreInfo);
write_byte(killer);
write_short(killerFrags);
write_short(get_user_deaths(killer));
write_short(0);
write_short(team);
message_end();
}

stock ground_z(origin[3], ent, skip = 0, recursion = 0)
{
origin[2] += random_num(5, 80);

if (!pev_valid(ent)) return origin[2];

new Float:tempOrigin[3];

IVecFVec(origin, tempOrigin);
set_pev(ent, pev_origin, tempOrigin);
engfunc(EngFunc_DropToFloor, ent);

if (!skip && !engfunc(EngFunc_EntIsOnFloor, ent)) {
if (recursion >= 10) skip = 1;

return ground_z(origin, ent, skip, ++recursion);
}

pev(ent, pev_origin, tempOrigin);

return floatround(tempOrigin[2]);
}

stock grenade_is_smoke(ent)
{
if (!pev_valid(ent)) return false;

new entModel[64];

pev(ent, pev_model, entModel, charsmax(entModel));

if (contain(entModel, "smokegrenade") != -1) return true;

return false;
}

stock remove_molotovs(id = 0)
{
new ent = find_ent_by_class(0, molotovClassName);

while (ent > 0) {
if (!id || (id && entity_get_edict(ent, EV_ENT_owner) == id)) set_pev(ent, pev_flags, pev(ent, pev_flags) | FL_KILLME);

ent = find_ent_by_class(ent, molotovClassName);
}
}

stock Float:distance_to_floor(Float:start[3], ignoremonsters = 1)
{
new Float:dest[3], Float:end[3];

dest[0] = start[0];
dest[1] = start[1];
dest[2] = -8191.0;

engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, 0, 0);
get_tr2(0, TR_vecEndPos, end);

new Float:ret = start[2] - end[2];

return ret > 0 ? ret : 0.0;
}


im taking the "Molotov" plugin from this mod.
the problem: plugin make server crash when you shutdown the molotov with smoke.(one or few times when u did the action).
im posting issue in github im sure he try to fix that but maybe your guys can help to slove the problem.

link to issue in Github

there has all info about the problem also with Video.

FIXED
 
Последнее редактирование:
Сообщения
50
Реакции
-1
pls dont respond if you cant help man.
its me in the issue and im add link to this if someone want more info + video about the problem.
im sure the author will try his best but if has pepole can help him to slove this problem should be nice..
 
Сообщения
102
Реакции
-2
limit of what ?

its happen even im throw only one molotov + smoke to shutdown
its random its can happend after 1-2
or 5-6 or more..
im think its something with engine or amxx so probably need someone with a lot of knowledge.
ty anyway dude..
but crash when test you? When i tested with 4 player in server server dont crash , i mean 4 players buy 1 molotov and smoke
 
Сообщения
50
Реакции
-1
but crash when test you? When i tested with 4 player in server server dont crash , i mean 4 players buy 1 molotov and smoke
you shutdown the molotov with smoke ?
like i said its random i tested it with 2 friends , I will be honest its take more time with more pepole but it's still crash
when i test it alone its crash more faster..
 

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

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