Некорректно работает GrenadeSpamPunish

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
92
Реакции
23
Ошибка
Падает сервер, в debug.log
----------------------------------------------
CRASH: Mon Dec 4 23:36:10 MSK 2017
Start Line: ./hlds_linux -debug -game cstrike -master -pingboost 1 -sys_ticrate 500 -insecure +ip --- +port 27015 +map de_dust2_2x2 -maxplayers 32 +rcon_password +sv_password -pidfile hlds.1253.pid
[New LWP 12696]
[New LWP 12702]
[New LWP 17733]
[New LWP 12700]
[New LWP 24469]
[New LWP 17734]
[New LWP 24470]
[New LWP 17735]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./hlds_linux -debug -game cstrike -master -pingboost 1 -sys_ticrate 500 -insecu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xf7566c78 in ?? () from /lib32/libc.so.6
#0 0xf7566c78 in ?? () from /lib32/libc.so.6
#1 0xf7568b51 in malloc () from /lib32/libc.so.6
#2 0xf773a2a8 in operator new (sz=44) at /valve/build/targets/src/gcc-4.6.1/libstdc++-v3/libsupc++/new_op.cc:52
#3 0xf323ffdf in ?? () from /home/27014/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
No symbol table info available.
From To Syms Read Shared Object Library
No linux-gate.so.1
0xf77cbad0 0xf77cc96c Yes (*) /lib32/libdl.so.2
0xf7789600 0xf77b6f65 Yes (*) /lib32/libm.so.6
0xf76f8914 0xf773ec78 Yes ./libstdc++.so.6
0xf769ee04 0xf76ae490 Yes ./libgcc_s.so.1
0xf750a420 0xf763834e Yes (*) /lib32/libc.so.6
0xf77db860 0xf77f373c Yes (*) /lib/ld-linux.so.2
0xf6f70410 0xf7045f90 Yes (*) /home/27014/engine_i486.so
0xf6f389b0 0xf6f3beaa Yes (*) /lib32/librt.so.1
0xf6f265c0 0xf6f30d74 Yes (*) ./libsteam_api.so
0xf6f0c870 0xf6f18f47 Yes /lib32/libpthread.so.0
0xf6ef0a00 0xf6efd1b8 Yes /home/27014/filesystem_stdio.so
0xf5fe7e80 0xf6acf040 Yes (*) /cs/hlds_6153/steamclient.so
0xf5e62670 0xf5ed8020 Yes (*) /cs/hlds_6153/crashhandler.so
0xf361eb70 0xf3634984 Yes /home/27014/./cstrike/addons/metamod/dlls/metamod.so
0xf339c180 0xf3515040 Yes (*) /home/27014/cstrike/dlls/cs.so
0xf329ad00 0xf329bf40 Yes (*) /home/27014/cstrike/addons/SafeNameAndChat/SafeNameAndChat.so
0xf328e4e0 0xf3294568 Yes (*) /home/27014/cstrike/addons/unprecacher/ultimate_unprecacher_mm_i386.so
0xf31faa00 0xf325a768 Yes (*) /home/27014/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
0xf3037490 0xf30c7228 Yes (*) cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xf2f74d30 0xf2fe7208 Yes (*) cstrike/addons/amxmodx/modules/sqlite_amxx_i386.so
0xf2f61c10 0xf2f64c98 Yes (*) cstrike/addons/amxmodx/modules/fun_amxx_i386.so
0xf2f54190 0xf2f59e84 Yes (*) cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xf2f4e8b0 0xf2f4f1d8 Yes (*) cstrike/addons/amxmodx/modules/csx_amxx_i386.so
0xf2f46480 0xf2f48050 Yes (*) cstrike/addons/amxmodx/modules/hidecvars_amxx_i386.so
0xf2f38f00 0xf2f3f230 Yes (*) cstrike/addons/amxmodx/modules/reaimdetector_amxx_i386.so
0xf2f01180 0xf2f1e740 Yes (*) /home/27014/cstrike/addons/reunion/reunion_mm_i386.so
0xf2eedb90 0xf2ef72f0 Yes (*) /home/27014/cstrike/addons/resemiclip/resemiclip_mm_i386.so
0xf2ec4b40 0xf2ece0b0 Yes (*) /home/27014/cstrike/addons/reauthcheck/reauthcheck_mm_i386.so
0xf2e09d70 0xf2e25c70 Yes (*) /home/27014/cstrike/addons/whblocker/whblocker_mm_i386.so
0xf2de34f0 0xf2df8af0 Yes (*) /home/27014/cstrike/addons/rechecker/rechecker_mm_i386.so
0xf2bca8c0 0xf2d78571 Yes (*) /home/27014/cstrike/addons/VoiceTranscoder/VoiceTranscoder.so
0xf2b53980 0xf2b5fd30 Yes (*) /home/27014/cstrike/addons/resrdetector/resrdetector_mm_i386.so
0xf2b1ac50 0xf2b474a8 Yes (*) cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xf2aee0d0 0xf2af9478 Yes (*) cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xf2aa7930 0xf2ace7a0 Yes (*) cstrike/addons/amxmodx/modules/reapi_amxx_i386.so
0xf2a4c870 0xf2a780b8 Yes (*) cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xf2042ad0 0xf204951b Yes (*) /lib32/libnss_files.so.2
0xef7ffe80 0xf02e7040 Yes (*) ./steamclient.so
0xf1ea0670 0xf1f16020 Yes (*) ./crashhandler.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xffc558d8:
eip = 0xf7566c78; saved eip = 0xf7568b51
called by frame at 0xffc558f8
Arglist at 0xf7699420, args:
Locals at 0xf7699420, Previous frame's sp is 0xffc558d8
Saved registers:
ebx at 0xffc558c4, ebp at 0xffc558d0, esi at 0xffc558c8, edi at 0xffc558cc, eip at 0xffc558d4
End of crash report
----------------------------------------------
ОС
Linux
Билд
Protocol version 48
Exe version 1.6.3.7/Stdio (cstrike)
ReHLDS version: 3.3.0.604-dev
Build date: 17:48:19 Oct 31 2017 (1298)
Build from: https://github.com/dreamstalker/rehlds/commit/cc90106
ReGamedll
ReGameDLL version: 5.3.0.222-dev
Build date: 22:15:38 Sep 22 2017
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/27f0563
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Ultimate Unprec RUN - ultimate_unpreca v0.3 Alp ini ANY ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.8.2-d ini Start ANY
[ 4] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.690 ini Chlvl ANY
[ 8] Rechecker RUN - rechecker_mm_i38 v2.3 ini Chlvl ANY
[ 9] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[10] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[11] MySQL RUN - mysql_amxx_i386. v1.8.2 pl3 ANY ANY
[12] SQLite RUN - sqlite_amxx_i386 v1.8.2 pl3 ANY ANY
[13] Fun RUN - fun_amxx_i386.so v1.8.2 pl3 ANY ANY
[14] CStrike RUN - cstrike_amxx_i38 v1.8.2-d pl3 ANY ANY
[15] Hide Cvars RUN - hidecvars_amxx_i v1.0 pl3 ANY ANY
[16] ReAimDetector RUN - reaimdetector_am v0.2.0 pl3 ANY Never
[17] FakeMeta RUN - fakemeta_amxx_i3 v1.8.2 pl3 ANY ANY
[18] Engine RUN - engine_amxx_i386 v1.8.2 pl3 ANY ANY
[19] ReAPI RUN - reapi_amxx_i386. v5.1.0.1 pl3 ANY Never
[20] Ham Sandwich RUN - hamsandwich_amxx v1.8.2 pl3 ANY ANY
20 plugins, 20 running
Список плагинов
-
Исходный код
GrenadeSpamPunish.sma

/*Grenade Spam Punish
*
* by [gOf]-Soul from http://www.gofclan.org
*
* This is a very simple plugin I wrote to control grenade spamming.
* There were a couple different plugins out that would seem to control
* grenade spamming. But they blocked if you would try to buy extra
* grenades. The ones I tried only blocked you from buying them via
* the regular menu. This plugin keeps you from throwing more grenades
* than the allotted number of grenades allowed by the configuration file
*
* The plugin requires that you use the engine module of amxmodx because
* I remove any grenades from the environment that should NOT have been
* thrown. If you do not want to enable the engine module you can remove
* the requirement by removing the remove_entity(greindex) line at the
* bottom of the script.
*
* Config Flags
* -----------------------------------------------------------------------------
* cvar : mp_grenspampunish
* description: cvar that determins if the grenade spam punish plugin is
* enabled possible values are 1 and 0. To enable the plugin
* set it to 1 to disable the plugin just set it to 0.
* default : 1 (enabled)
*
* cvar : mp_grenspampunish_maxflash
* description: Maximum number of flash bangs allowed to be thrown per round
* default : 2
*
* cvar : mp_grenspampunish_maxhe
* description: Maximum number of he grenades allowed to be thrown per round
* default : 1
*
* cvar : mp_grenspampunish_maxsmoke
* description: Maximum number of smoke grenades allowed to be thrown per round
* default : 1
*
* cvar : mp_grenspampunish_damage
* description: Amount of damage to inflict if someone violates the spam plugin
* Damage of 100 will automatically kill them. The plugin uses the
* user_slap to inflict the damage
* default : 100
*
*
* To load settings for a certain map then place them into the map specific
* config files i.e. amxmodx/configs/maps/de_dust.cfg
*
* -----------------------------------------------------------------------------
*
* **************
* * CHANGE LOG *
* **************
* v1.4
* -Changed Array Declaration to get rid of out of bound error for
* the grencount array
*
* v1.3
* -Took out cstrike reference
* -Code cleanup (thanks to vittu)
*
* v1.2
* -Removed the config file. Place configuration directly into amxx.cfg
* -For map specific configs use the map specific config features provided
* by AmxModx
* -Updated for pcvars - requires 1.70 and higher to use
* -Updated to more dependable register_logevent("funcNewRound", 2, "1=Round_Start")
* instead of ResetHud event
* -Fixed bug of not clearing number of throws when a person joins the server
* caused someone to get punished on first throw
*
* v1.1
* -Updated the plugin to not write the grenade count information
* to the vault. Just used a global variable
*
* -Added map specific grenade counts so that you could specify higher
* grenade throw limits for certain maps like fy_pool_day
*
*/


#include <amxmodx>
#include <amxmisc>
#include <engine>

#define PLUGIN "Grenade Spam Punish"
#define VERSION "1.4"
#define AUTHOR "[gOf]-Soul"

new grencount[33][3]

new p_grenspampunish
new p_grenspampunish_maxflash
new p_grenspampunish_maxhe
new p_grenspampunish_maxsmoke
//new p_grenspampunish_damage

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

register_logevent("funcNewRound", 2, "1=Round_Start")

p_grenspampunish=register_cvar("mp_grenspampunish","1") // enable/disable plugin
p_grenspampunish_maxflash=register_cvar("mp_grenspampunish_maxflash","3") // number of FB's allowed per round
p_grenspampunish_maxhe=register_cvar("mp_grenspampunish_maxhe","3") // number of HE's allowed per round
p_grenspampunish_maxsmoke = register_cvar("mp_grenspampunish_maxsmoke","2") // number of SG's allowed per round
//p_grenspampunish_damage = register_cvar("mp_grenspampunish_damage","100") // health to remove upon punishment

//new configsdir[128]
//get_configsdir(configsdir, 127)
//server_cmd("exec %s/amxx.cfg", configsdir)

//new currmap[128]
//get_mapname(currmap,127)
//server_cmd("exec %s/maps/%s.cfg",configsdir, currmap)

return PLUGIN_CONTINUE
}

public client_putinserver(id){
//reset he grenades count
grencount[id][0] = 0

//reset smoke grenades count
grencount[id][1] = 0

//reset flash grenades count
grencount[id][2] = 0
}

public funcNewRound() {
if ( !get_pcvar_num(p_grenspampunish) )
return PLUGIN_CONTINUE

new players[32], numPlayerCount, idxPlayer
get_players(players, numPlayerCount)
for(idxPlayer = 0; idxPlayer < numPlayerCount; idxPlayer++)
{

//reset he grenades count
grencount[players[idxPlayer]][0] = 0

//reset smoke grenades count
grencount[players[idxPlayer]][1] = 0

//reset flash grenades count
grencount[players[idxPlayer]][2] = 0

}

return PLUGIN_CONTINUE
}

public grenade_throw( index , greindex , wId ){
if ( !get_pcvar_num(p_grenspampunish) )
return PLUGIN_CONTINUE

new punishlevel,grencountindex
new playername[32],greName[32]
get_user_name(index, playername, 32)

//Example of a switch statement
switch (wId)
{
case CSW_HEGRENADE:
{
copy(greName,31,"HE Grenades")
punishlevel = get_pcvar_num(p_grenspampunish_maxhe)
grencountindex = 0
}
case CSW_SMOKEGRENADE:
{
copy(greName,31,"Smoke Grenades")
punishlevel = get_pcvar_num(p_grenspampunish_maxsmoke)
grencountindex = 1
}
case CSW_FLASHBANG:
{
copy(greName,31,"Flash Grenades")
punishlevel = get_pcvar_num(p_grenspampunish_maxflash)
grencountindex = 2
}
}

grencount[index][grencountindex]=grencount[index][grencountindex]+1

if (punishlevel < grencount[index][grencountindex]){
// client_print(index ,print_chat,"You have exceeded the maximum number of %s that you can throw.",greName)
// client_print(index ,print_chat,"You are only allowed %d %s per round.",punishlevel,greName)
//client_print_color(index, RED, "%s ^3Флуд гранатами запрещён!", PREFIX)
client_print(index, print_center , "*** Флуд гранатами запрещён! ***")

//user_slap(index, get_pcvar_num(p_grenspampunish_damage))

remove_entity(greindex)
//set_hudmessage (r, g, b, x, y, effects, fxtime, holdtime, fadeintime, fadeouttime, channel=4 )
//set_hudmessage(255 ,0 ,0 ,-1.0 ,0.32 ,0 ,6.0 ,10.0,1.0,1.0,4 )
//show_hudmessage(0,"%s was punished because they were grenade spamming", playername)
}
return PLUGIN_CONTINUE
}
Здравствуйте, не могу понять в чем проблема: сервер выключается каждые 15-20 минут
 

Вложения

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

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

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