- Ошибка
-
не работает на сервере REHLDS , AMXMOD 1.8.2
- ОС
- Linux
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.3.0.628-dev
Build date: 14:15:53 Dec 26 2017 (1354)
Build from: https://github.com/dreamstalker/rehlds/commit/780afd0
- ReGamedll
-
ReGameDLL version: 5.3.0.279-dev
Build date: 12:34:05 Dec 17 2017
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/565e9cd
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.8.2 ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 5] WHBlocker RUN - whblocker_mm_i38 v1.5.695 ini Chlvl ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 7] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 9] ReAPI RUN - reapi_amxx_i386. v5.2.0.1 pl1 ANY Never
[10] ReAimDetector RUN - reaimdetector_am v0.2.0 pl1 ANY Never
[11] MySQL RUN - mysql_amxx_i386. v1.8.2 pl1 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i3 v1.8.2 pl1 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx v1.8.2 pl1 ANY ANY
[14] CStrike RUN - cstrike_amxx_i38 v1.8.2-d pl1 ANY ANY
[15] CSX Extended RUN - csx_amxx_i386.so v1.5 pl1 ANY ANY
[16] Engine RUN - engine_amxx_i386 v1.8.2 pl1 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.8.2 pl1 ANY ANY
17 plugins, 17 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] admin_loader 0.3.5 kanagava admin_loader.am running
[ 2] FreshBans 1.3.7b kanagava fresh_bans_137b running
[ 3] DopBan 3.0.1b kanagava dop_ban.amxx running
[ 4] ReAimDetector API 0.2.0 ReHLDS Team reaimdetector.a running
[ 5] ReChecker Logging freesrv custom rc_logging.amxx running
[ 6] RC BaseChanger freesrv custom rc_basechanger. stopped
[ 7] Aliases checker 1.0.3 kanagava alias_detector. running
[ 8] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 9] Multiple Game Names 1.0 mforce Gamename.amxx running
[ 10] Advanced Experience Sy 0.4 serfreeman1337 aes_main.amxx running
[ 11] AES: Exp CSTRIKE 0.3 serfreeman1337 aes_exp_cstrike running
[ 12] AES: Informer 0.2 serfreeman1337 aes_informer.am running
[ 13] AES: Experience Editor 0.1 serfreeman1337 aes_exp_editor. running
[ 14] AES: Bonus System 0.2 serfreeman1337 aes_bonus_syste running
[ 15] AES: Bonus CSTRIKE 0.4 serfreeman1337 aes_bonus_cstri running
[ 16] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
[ 17] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 18] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 19] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 20] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 21] Vip Test 1.0 daywer vip_test.amxx running
[ 22] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 23] Players Menu 1.8.2 AMXX Dev Team plmenu.amxx running
[ 24] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 25] AdminListen 2.3x /dev/ urandom adminlisten.amx running
[ 26] Admin Check 1.51 OneEyed admin_check.amx running
[ 27] SS Menu 1.0 lalka screnmenu.amxx running
[ 28] Admin, Vip and Lady mo 0.3b Freedo.m +mod.Le admin_lady.amxx running
[ 29] Admin Votes 1.8.2 AMXX Dev Team adminvote.amxx running
[ 30] Lite Kill Assist 1.17 neygomon lite_assist.amx running
[ 31] Commands Menu 1.8.2 AMXX Dev Team cmdmenu.amxx running
[ 32] Maps Menu 1.8.2 AMXX Dev Team mapsmenu.amxx running
[ 33] unknown unknown unknown GenServerMenu.a running
[ 34] Admin Gag 1.0 AndrewZ gag_menu.amxx running
[ 35] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx running
[ 36] NextMap 1.8.2 AMXX Dev Team nextmap.amxx running
[ 37] Restrict Weapons 1.8.2 AMXX Dev Team restmenu.amxx running
[ 38] StatsX Colored TOP15 1.8.2 AMXX Dev Team Statsx_Colored_ running
[ 39] Stats Configuration 1.8.2 AMXX Dev Team statscfg.amxx running
[ 40] CS Stats Logging 1.8.2 AMXX Dev Team stats_logging.a running
[ 41] TimeLeft 1.8.2 AMXX Dev Team timeleft.amxx running
[ 42] Anti reconnect 3.0 JohnJ antireconnect.a running
[ 43] mute menu 1.0 cheap_suit mute.amxx running
[ 44] GHW Auto Message Displ 3.1b GHW_Chronic/Safe GHW_Message_Dis running
[ 45] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 46] [Y18] DeagsMapManager 3.23 Deags/AMXX Commu deagsmapmanager running
[ 47] C4 CD Voice 1.1 TTuCTOH c4cdvoice.amxx running
[ 48] Automatic knife duel 0.3 JGHG automatic_knife running
[ 49] Afk Control 0.5.1 neygomon afk_control.amx running
[ 50] Damager 0.1b Subb98 damager.amxx running
[ 51] IP 2.1 Bl0ck IP.amxx running
[ 52] Free_parachute 1.1 xD Free_parachute. running
[ 53] unknown unknown unknown resetscore.amxx running
[ 54] Server Menu 0.1 JIo6koBbIu BoJIo server_menu.amx running
[ 55] PsychoStats Plugin 1.1 Stormtrooper ps_heatmaps.amx running
[ 56] nice Demo 1.0 sector nice_demo.amxx running
[ 57] High Ping Kicker 1.0 Shadow/Bo0m! amx_hpk.amxx running
[ 58] Killa HP 1.0 jas0n killa_hp.amxx running
[ 59] Best Player 0.2b Subb98 best_player.amx running
[ 60] AMX Slay Losers 1.2 [email protected] slaylosers.amxx running
[ 61] Knife warmup 0.1 Subb98 knife_warmup.am running
[ 62] Fake Map 0.2 Vaqtincha Mapname.amxx running
[ 63] Nade Health 0.1 Dorus new_health_nade running
[ 64] Knives Shop 1.2 OverGame knifes.amxx running
[ 65] [ReAPI] No Team Flash 1.0 ReHLDS Team noteamflash.amx running
[ 66] No Slash 0.1 Flash NoSlash.amxx running
[ 67] Kill Supplybox 1.0 Exodus Dex_Supplybox.a running
[ 68] Lite Translit 2.8 neygomon lite_translit.a running
68 plugins, 67 running
- Исходный код
-
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
new const VERSION[] = "1.0";
#define get_bit(%1,%2) (%1 & (1 << (%2 & 31)))
#define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
#define clr_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
#define is_primary_weapon(%0) (PRIMARY_WEAPONS_BITSUM & (1 << %0))
#define OFFSET_WEAPONID 43
#define EXTRAOFFSET_WEAPONS 4
const PRIMARY_WEAPONS_BITSUM = (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) | (1 << 0);
const MAX_CLIENTS = 32;
const AUTH_LEN = 34;
const IP_LEN = 16;
const MSG_LEN = 191;
const POST = 1;
const PRE = 0;
const KEYS = 511;
enum
{
TEAM_UNASSIGNED = 0,
TEAM_TERRORIST = 1,
TEAM_CT = 2,
TEAM_SPECTATOR = 3
}
new user_team[MAX_CLIENTS + 1], ip[IP_LEN], authid[AUTH_LEN],
pcv_awp_timelimit, pcv_awp_limit_by_team, awp_limit_by_team,
need_block_awp[MAX_CLIENTS + 1], need_block_awp_by_time[MAX_CLIENTS + 1],
Float: awp_use_time[MAX_CLIENTS + 1], Float: last_ctime[MAX_CLIENTS + 1],
Float: awp_timelimit, awp_count_by_team[4], awp_access;
new const BLOCK_AUTHID[][] = {
"STEAM_0:0:0000000000"
};
new const BLOCK_IP[][] = {
"000.000.000.000"
};
/* Список карт на которых нужно отключить плагин
можно указывать название полностью или только префикс карты
*/
new const MAPLIST_DISABLED[][] = {
"aim_",
"awp_"
};
/* Список карт на которых нужна принудительная блокировка, несмотря на условия
можно указывать название полностью или только префикс карты
*/
new const MAPLIST_FORCED[][] = {
"de_dust2_2x2",
"de_dust2_2x2_winter16",
"de_dust2_2x2_xmas",
"de_russia_2x2",
"$2000$"
};
stock const CHAT_INFO_PREFIX[] = "^3[ИНФО]^1";
stock const AWP_RESTRICT_MSG[] = "%s На этой карте запрещено пользоваться AWP";
stock const AWP_RESTRICT_PERSONAL_MSG[] = "%s Вам запрещено использовать AWP. Обратитесь к Администратору";
stock const AWP_RESTRICT_BY_TIME_MSG[] = "%s Вы сможете купить AWP, когда сыграете %.0f сек с другим оружием";
stock const AWP_RESTRICT_BY_TEAM_MSG[] = "%s В команде уже есть %d AWP";
stock const PLAYER[] = "player";
stock const DROP[] = "drop";
stock const WEAPON_AWP[] = "weapon_awp";
public plugin_init()
{
register_plugin ("AWP Restrictions", VERSION, "Free");
register_clcmd ("awp", "clcmd_awp");
register_clcmd ("magnum", "clcmd_awp");
register_event ("TextMsg", "event_restart", "a", "2=#Game_will_restart_in");
register_menucmd (register_menuid("BuyRifle", 1), KEYS, "buy_rifle");
register_message (get_user_msgid ("TeamInfo"), "msg_TeamInfo");
register_srvcmd ("amx_reloadcvars", "load_cvars");
}
public plugin_cfg()
{
load_cvars();
new map_name[32];
get_mapname(map_name, charsmax(map_name));
new i, j, need_pause_plugin, need_block_awp_forcibly;
for (; i < sizeof MAPLIST_DISABLED && !need_pause_plugin; i++) {
while (MAPLIST_DISABLED[i][j] && map_name[j]) {
if (map_name[j] == MAPLIST_DISABLED[i][j]) {
switch (MAPLIST_DISABLED[i][j + 1]) {
case 0: {
if (map_name[j + 1] == 0) {
need_pause_plugin = 1;
break;
}
}
case '_': {
if (!MAPLIST_DISABLED[i][j + 2]) {
need_pause_plugin = 1;
break;
}
}
}
}
else {
break;
}
j++;
}
}
if (need_pause_plugin) {
pause("ad");
}
i = j = 0;
for (; i < sizeof MAPLIST_FORCED && !need_block_awp_forcibly; i++) {
while (MAPLIST_FORCED[i][j] && map_name[j]) {
if (map_name[j] == MAPLIST_FORCED[i][j]) {
switch (MAPLIST_FORCED[i][j + 1]) {
case 0: {
if (map_name[j + 1] == 0) {
need_block_awp_forcibly = 1;
break;
}
}
case '_': {
if (MAPLIST_FORCED[i][j + 2] == 0) {
need_block_awp_forcibly = 1;
break;
}
}
}
}
else {
break;
}
j++;
}
}
if (need_block_awp_forcibly) {
state block_awp_forcibly_enabled;
register_event ("CurWeapon", "event_CurWeapon", "be", "1=1", "2=18");
}
else {
state block_awp_forcibly_disabled;
register_event ("CurWeapon", "event_CurWeapon", "be", "1=1");
if (awp_timelimit > 0.0) {
RegisterHam (Ham_Killed, PLAYER, "player_Killed_Post", POST);
RegisterHam (Ham_Spawn, PLAYER, "player_Spawn_Post", POST);
}
}
if (awp_limit_by_team) {
RegisterHam (Ham_AddPlayerItem, PLAYER, "AddPlayerItem", POST);
RegisterHam (Ham_RemovePlayerItem, PLAYER, "RemovePlayerItem", PRE);
}
else {
awp_access = -1;
}
}
public load_cvars()
{
static is_cvars_registered;
log_amx((is_cvars_registered) ? "Cvars Reloaded" : "Cvars Loaded");
if (!is_cvars_registered) {
pcv_awp_timelimit = register_cvar ("awp_timelimit", "180");
pcv_awp_limit_by_team = register_cvar ("awp_limit_by_team", "2"); //кол-во AWP в команде
is_cvars_registered = 1;
}
server_exec();
awp_timelimit = get_pcvar_float (pcv_awp_timelimit);
awp_limit_by_team = get_pcvar_num (pcv_awp_limit_by_team);
}
public event_restart()
{
#emit CONST.ALT need_block_awp
#emit ZERO.PRI
#emit FILL 132
if (awp_timelimit > 0.0) {
#emit CONST.ALT need_block_awp_by_time
#emit ZERO.PRI
#emit FILL 132
arrayset(_:awp_use_time, _:0.0, sizeof awp_use_time);
}
if (awp_limit_by_team) {
#emit CONST.ALT awp_count_by_team
#emit ZERO.PRI
#emit FILL 16
awp_access = 0;
}
}
public client_putinserver(id) <block_awp_forcibly_enabled> {}
public client_putinserver(id) <block_awp_forcibly_disabled>
{
need_block_awp[id] = need_block_awp_by_time[id] = 0;
awp_use_time[id] = 0.0;
if (awp_limit_by_team) {
clr_bit(awp_access, id);
}
get_user_ip(id, ip, charsmax(ip), 1)
for(new i; i < sizeof BLOCK_IP; i++) {
if (equal(ip, BLOCK_IP[i]) ) {
need_block_awp[id] = 1;
break;
}
}
if (!need_block_awp[id]) {
get_user_authid(id, authid, charsmax(authid));
for(new i; i < sizeof BLOCK_AUTHID; i++) {
if (equal(authid, BLOCK_AUTHID[i])) {
need_block_awp[id] = 1;
break;
}
}
}
}
public client_disconnect(id) <block_awp_forcibly_enabled> {}
public client_disconnect(id) <block_awp_forcibly_disabled>
{
if (awp_limit_by_team && get_bit(awp_access, id)) {
--awp_count_by_team[user_team[id]];
}
}
public clcmd_awp(id) <block_awp_forcibly_enabled>
{
return PLUGIN_HANDLED;
}
public clcmd_awp(id) <block_awp_forcibly_disabled>
{
if (need_block_awp[id]) {
client_print_color (id, print_team_default, AWP_RESTRICT_PERSONAL_MSG, CHAT_INFO_PREFIX);
return PLUGIN_HANDLED;
}
else if (need_block_awp_by_time[id]) {
client_print_color (id, print_team_default, AWP_RESTRICT_BY_TIME_MSG, CHAT_INFO_PREFIX, awp_use_time[id]);
return PLUGIN_HANDLED;
}
else if (awp_count_by_team[user_team[id]] >= awp_limit_by_team && !get_bit(awp_access, id)) {
client_print_color (id, print_team_default, AWP_RESTRICT_BY_TEAM_MSG, CHAT_INFO_PREFIX, awp_limit_by_team);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public buy_rifle(id, item) <block_awp_forcibly_disabled>
{
static need_block, block_awp_msg[MSG_LEN];
need_block = 0;
if (need_block_awp[id]) {
need_block = 1;
formatex (block_awp_msg, charsmax(block_awp_msg), AWP_RESTRICT_MSG, CHAT_INFO_PREFIX);
}
else if (need_block_awp_by_time[id]) {
need_block = 1;
formatex (block_awp_msg, charsmax(block_awp_msg), AWP_RESTRICT_BY_TIME_MSG, CHAT_INFO_PREFIX, awp_use_time[id]);
}
else if (awp_count_by_team[user_team[id]] >= awp_limit_by_team && !get_bit(awp_access, id)) {
need_block = 1;
formatex (block_awp_msg, charsmax(block_awp_msg), AWP_RESTRICT_BY_TEAM_MSG, CHAT_INFO_PREFIX, awp_limit_by_team);
}
if (need_block) {
switch (user_team[id]) {
case TEAM_CT: {
if (item == 5) {
client_print_color (id, print_team_default, block_awp_msg);
return PLUGIN_HANDLED;
}
}
case TEAM_TERRORIST: {
if (item == 4) {
client_print_color (id, print_team_default, block_awp_msg);
return PLUGIN_HANDLED;
}
}
}
}
return PLUGIN_CONTINUE;
}
public buy_rifle(id, item) <block_awp_forcibly_enabled>
{
switch (user_team[id]) {
case TEAM_CT: {
if (item == 5) {
client_print_color (id, print_team_default, AWP_RESTRICT_MSG, CHAT_INFO_PREFIX);
return PLUGIN_HANDLED;
}
}
case TEAM_TERRORIST: {
if (item == 4) {
client_print_color (id, print_team_default, AWP_RESTRICT_MSG, CHAT_INFO_PREFIX);
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_CONTINUE;
}
public event_CurWeapon(id) <block_awp_forcibly_enabled>
{
engclient_cmd (id, DROP, WEAPON_AWP);
client_print_color (id, print_team_default, AWP_RESTRICT_MSG, CHAT_INFO_PREFIX);
}
public event_CurWeapon(id) <block_awp_forcibly_disabled>
{
static csw_id, last_csw_id[MAX_CLIENTS + 1],
Float: ctime;
csw_id = read_data(2);
if (is_primary_weapon(csw_id)) {
ctime = get_gametime();
if (csw_id == CSW_AWP) {
if (need_block_awp[id]) {
engclient_cmd (id, DROP, WEAPON_AWP);
client_print_color (id, print_team_default, AWP_RESTRICT_PERSONAL_MSG, CHAT_INFO_PREFIX);
}
else if (need_block_awp_by_time[id]) {
engclient_cmd (id, DROP, WEAPON_AWP);
client_print_color (id, print_team_default, AWP_RESTRICT_BY_TIME_MSG, CHAT_INFO_PREFIX, awp_use_time[id]);
}
else if (awp_count_by_team[user_team[id]] >= awp_limit_by_team && !get_bit(awp_access, id)) {
engclient_cmd (id, DROP, WEAPON_AWP);
client_print_color (id, print_team_default, AWP_RESTRICT_BY_TEAM_MSG, CHAT_INFO_PREFIX, awp_limit_by_team);
}
else if (last_csw_id[id] == CSW_AWP || !is_primary_weapon(last_csw_id[id])) {
awp_use_time[id] += ctime - last_ctime[id];
}
}
else {
awp_use_time[id] -= ctime - last_ctime[id];
if (awp_use_time[id] < 0.0) {
awp_use_time[id] = 0.0;
need_block_awp_by_time[id] = 0;
}
}
}
last_ctime[id] = ctime;
last_csw_id[id] = csw_id;
}
public player_Spawn_Post(id)
{
last_ctime[id] = get_gametime();
}
public player_Killed_Post(id, attacker, should_gib)
{
if (awp_use_time[id] > awp_timelimit) {
awp_use_time[id] = awp_timelimit;
need_block_awp_by_time[id] = 1;
client_print_color (id, print_team_default, AWP_RESTRICT_BY_TIME_MSG, CHAT_INFO_PREFIX, awp_timelimit);
}
}
public AddPlayerItem (id, entity)
{
if (get_pdata_int (entity, OFFSET_WEAPONID, EXTRAOFFSET_WEAPONS) == CSW_AWP) {
static team; team = user_team[id];
if (awp_count_by_team[team] < awp_limit_by_team) {
set_bit(awp_access, id);
++awp_count_by_team[team];
}
else {
++awp_count_by_team[team];
}
}
}
public RemovePlayerItem (id, entity)
{
if (get_pdata_int (entity, OFFSET_WEAPONID, EXTRAOFFSET_WEAPONS) == CSW_AWP) {
static team; team = user_team[id];
if (awp_count_by_team[team] > 0) {
--awp_count_by_team[team];
clr_bit(awp_access, id);
}
}
}
public msg_TeamInfo ()
{
static id, team_name_tmp[11];
id = get_msg_arg_int(1);
get_msg_arg_string(2, team_name_tmp, charsmax(team_name_tmp));
switch (team_name_tmp[0]) {
case 'T': {
if (awp_count_by_team[user_team[id]] && get_bit(awp_access, id)) {
--awp_count_by_team[user_team[id]];
user_team[id] = TEAM_TERRORIST;
++awp_count_by_team[user_team[id]];
}
else {
user_team[id] = TEAM_TERRORIST;
}
}
case 'C': {
if (awp_count_by_team[user_team[id]] && get_bit(awp_access, id)) {
--awp_count_by_team[user_team[id]];
user_team[id] = TEAM_CT;
++awp_count_by_team[user_team[id]];
}
else {
user_team[id] = TEAM_CT;
}
}
case 'S': user_team[id] = TEAM_SPECTATOR;
case 'U': user_team[id] = TEAM_UNASSIGNED;
}
}
Здравствуйте уважаемые форумчане! помогите пожалуйста исправить данный плагин. сам не в силах. не работает на рехлд почемуто. амхмод 1.8.2. другие плагины авп лимита не интересует. в этом плагине есть ограничение авп по времени то что мне очень нужно. помогите пожалуйста
В этой теме было размещено решение! Перейти к решению.