Auto Restart KNIFE мешает нормальной работе HLTV (поправить)

Сообщения
35
Реакции
1
Ошибка
f743f000-f7440000 rwxp 00053000 103:01 28180490 /lib32/libm-2.24.so
f7440000-f7461000 r-xp 00000000 103:01 11973019 /host/*****/*****/cstrike/hltv/libsteam_api_c.so
f7461000-f7463000 rwxp 00020000 103:01 11973019 /host/*****/*****/cstrike/hltv/libsteam_api_c.so
f7463000-f7468000 rwxp 00000000 00:00 0
f7468000-f74ba000 r-xp 00000000 103:01 11973026 /host/*****/*****/cstrike/hltv/proxy_i386.so
f74ba000-f74be000 rwxp 00052000 103:01 11973026 /host/*****/*****/cstrike/hltv/proxy_i386.so
f74be000-f74db000 rwxp 00000000 00:00 0
f74db000-f74f2000 r-xp 00000000 103:01 11972999 /host/*****/*****/cstrike/hltv/filesystem_stdio_i386.so
f74f2000-f74f9000 rwxp 00016000 103:01 11972999 /host/*****/*****/cstrike/hltv/filesystem_stdio_i386.so
f74f9000-f74fb000 rwxp 00000000 00:00 0
f74fb000-f76ac000 r-xp 00000000 103:01 28180486 /lib32/libc-2.24.so
f76ac000-f76ad000 ---p 001b1000 103:01 28180486 /lib32/libc-2.24.so
f76ad000-f76af000 r-xp 001b1000 103:01 28180486 /lib32/libc-2.24.so
f76af000-f76b0000 rwxp 001b3000 103:01 28180486 /lib32/libc-2.24.so
f76b0000-f76b3000 rwxp 00000000 00:00 0
f76b3000-f76cc000 r-xp 00000000 103:01 28180500 /lib32/libpthread-2.24.so
f76cc000-f76cd000 r-xp 00018000 103:01 28180500 /lib32/libpthread-2.24.so
f76cd000-f76ce000 rwxp 00019000 103:01 28180500 /lib32/libpthread-2.24.so
f76ce000-f76d0000 rwxp 00000000 00:00 0
f76d0000-f76d3000 r-xp 00000000 103:01 28180489 /lib32/libdl-2.24.so
f76d3000-f76d4000 r-xp 00002000 103:01 28180489 /lib32/libdl-2.24.so
f76d4000-f76d5000 rwxp 00003000 103:01 28180489 /lib32/libdl-2.24.so
f76da000-f76dd000 rwxp 00000000 00:00 0
f76dd000-f76df000 r--p 00000000 00:00 0 [vvar]
f76df000-f76e1000 r-xp 00000000 00:00 0 [vdso]
f76e1000-f7704000 r-xp 00000000 103:01 28180482 /lib32/ld-2.24.so
f7704000-f7705000 r-xp 00022000 103:01 28180482 /lib32/ld-2.24.so
f7705000-f7706000 rwxp 00023000 103:01 28180482 /lib32/ld-2.24.so
ffeec000-fff0d000 rwxp 00000000 00:00 0 [stack]
./hltv_run: line 6: 4014 Aborted ./hltv $*
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5294
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.776-dev
Build date: 19:37:50 Apr 20 2022 (2930)
ReGamedll
ReGameDLL version: 5.21.0.546-dev
Build date: 15:32:48 Dec 28 2021
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Список метамодулей
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.2 Beta 3 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5294 ini Start ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 8] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 9] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[10] MySQL RUN - mysql_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[11] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[15] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[16] CStrike RUN - cstrike_amxx_i386.so v1.9.0-dev+5210 pl5 ANY ANY
[17] CSX RUN - csx_amxx_i386.so v1.9.0-dev+5210 pl5 ANY ANY
[18] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl5 ANY ANY
[19] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[20] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl5 ANY Never
20 plugins, 20 running
Список плагинов
[ 1] FreshBans 1.4.6b kanagava fresh_bans_146- running
[ 2] AIM detector 0.9.4.3b kanagava aim_detector_09 running
[ 3] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 4] fb_forwards 0.1 kanagava & Renai fb_forwards.amx running
[ 5] DopBan 3.0.8b kanagava dop_ban308-(183 running
[ 6] Admin Loader 3.5 neygomon admin_loader_ne debug
[ 7] Aliases checker 1.0.3 kanagava alias_detector- running
[ 8] Prefix Manger 0.1 serfreeman1337 prefixManager.a running
[ 9] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 10] block_changelevel 0.2 MiXa block_changelev running
[ 11] Advanced MapChooser 1.1.1 neygomon map_chooser23.a debug
[ 12] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 13] Admin Help 1.8.3-Re AMXX Dev Team adminhelp.amxx running
[ 14] Slots Reservation 1.8.3-Re AMXX Dev Team adminslots.amxx running
[ 15] Multi-Lingual System 1.8.3-Re AMXX Dev Team multilingual.am running
[ 16] Menus Front-End 1.8.3-Re AMXX Dev Team menufront.amxx running
[ 17] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 18] Players Menu 1.8.3-Re AMXX Dev Team plmenu.amxx running
[ 19] Teleport Menu 1.8.3-Re AMXX Dev Team telemenu.amxx running
[ 20] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 21] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 22] Admin Chat 1.8.3-Re AMXX Dev Team adminchat.amxx running
[ 23] Anti Flood 1.8.3-Re AMXX Dev Team antiflood.amxx running
[ 24] Scrolling Message 1.8.3-Re AMXX Dev Team scrollmsg.amxx running
[ 25] Info. Messages 1.8.3-Re AMXX Dev Team imessage.amxx running
[ 26] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx running
[ 27] TimeLeft 1.8.3-Re AMXX Dev Team timeleft.amxx running
[ 28] Pause Plugins 1.8.3-Re AMXX Dev Team pausecfg.amxx running
[ 29] Stats Configuration 1.8.3-Re AMXX Dev Team statscfg.amxx running
[ 30] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags debug
[ 31] [ReAPI] No Team Flash 1.0 ReHLDS Team noteamflash.amx running
[ 32] WMC 0.1 Alienware wmc.amxx debug
[ 33] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 34] Admin Check 1.51 OneEyed admin_check.amx running
[ 35] c4 timer 1.1 cheap_suit c4timer.amxx running
[ 36] AdminListen 2.5 /dev/ urandom V amx_adminlisten debug
[ 37] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 38] Admin Screen 2 1.1 uTg | bigpapajig admin_screen2.a running
[ 39] Ping Control 1.31 neygomon Ping_Control3.a running
[ 40] Auto Restart KNIFE 1.6 Leo_[BH] & Finto rozminka2.amxx running
[ 41] AMX SSBan 2.6 God@Dorin\Fysiks amx_ssban.amxx running
[ 42] Descriptive 'Fire in t 0.1 VEN descriptive_fir running
[ 43] Vip_online 1.51 OneEyed Vip_online.amxx running
[ 44] VIP Is Coming 1.0 AndrewZ vipconnect.amxx running
[ 45] [ReAPI] IDEAL VIP by W 1.4.7 Wikiname (Remake reapi_ideal_vip debug
[ 46] SpartAAA KNife Kill 1.0 Shidla KNife_SpartAAA2 running
[ 47] Admin Player Name 1.5 Sutar admin_player_na running
[ 48] Steam_Grenade 0.1 Okorok bonus_za_st2.am running
[ 49] Parachute 1.4 for th KRoT@L/JTP10181 parachute.amxx running
[ 50] Advanced Gag 1.9.0 neygomon amx_gag5.amxx running
[ 51] Vampire 1.0c Shalfey & SKAJIb vampire.amxx running
[ 52] unknown unknown unknown dmg.amxx running
[ 53] Screen Fade 0.1 neygomon Screen_Fade.amx running
[ 54] Kills Counter 1.0 Safety1st killscounter.am running
[ 55] Smoke FIX 0.1 many smoke_fix.amxx running
[ 56] STEAM BONUS FIX 0.2 Leo_[BH] steam_bonus.amx running
[ 57] Key & Say Guardian 1.3b AndrewZ / noskil ksg.amxx running
[ 58] Say Admin 1.0 Ghost contact.amxx running
[ 59] Weapon Menu 0.1 Subb98 weaponmenu_cl.a debug
[ 60] Team Balancer 1.8b3 Ptahhotep ptb_rus.amxx running
[ 61] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 62] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 63] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 64] Advert Messages 1.2 neygomon adverts.amxx running
[ 65] Spect Bot 14.09 SKAJIbnEJIb & Bo SpectBot.amxx running
[ 66] MOTD 1.0 Unknown infomotd.amxx running
[ 67] Back Weapons 1.87 hoboman313/cheap backweapons.amx debug
[ 68] Mode 2x2 1.9 s1lent mode.amxx running
[ 69] Amx Four Messages 1.1 Stimul chelovechek_182 running
[ 70] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 71] ipb_bonus 2.3 ex3m777 | neugom bonus_system.am running
[ 72] Forum Presents 0.1 neygomon forum_presents. running
[ 73] SF Warn Menu 0.1.4f serfreeman1337 sf_admin_warns. running
[ 74] Five STARS 1.03 neygomon no_players_map. остановлен
[ 75] unknown unknown unknown adminfreelook.a running
[ 76] unknown unknown unknown ShowChangerName running
[ 77] WebHS 0.1 kanagava fb_web_online.a running
[ 78] StopSay 0.3 kanagava & Finto StopSay.amxx running
[ 79] unknown unknown unknown spam_block.amxx running
[ 80] SteamID Limiter 0.4 Mistrick steamid_limiter running
[ 81] BanIP Fakes 0.2 Safety1st banip_fakes.amx running
[ 82] Kick Spamers 0.5a gyxoBka KickSpamer.amxx running
[ 83] [ReAPI] Healthnade 0.0.4f F@nt0M + mx?! reapi_healthnad running
[ 84] [FB] CSBANS Tools 0.0.2 uMk0 csbans_tools.am running
[ 85] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 86] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 87] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 88] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 89] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 90] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
90 plugins, 89 running
Автор плагина
Leo_[BH] & Fintok!
Версия плагина
1.6
Исходный код
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN_NAME "Auto Restart KNIFE"
#define PLUGIN_VERSION "1.6"
#define PLUGIN_AUTHOR "Leo_[BH] & Fintok!"

const m_iMenu = 205
const m_iJoiningState = 121

const MENU_CHOOSEAPPEARANCE = 3
const JOIN_CHOOSEAPPEARANCE = 4

new Timer, SecondsCvar, szMapName[32]

public plugin_init()
{
register_plugin(PLUGIN_NAME , PLUGIN_VERSION, PLUGIN_AUTHOR)

register_dictionary("auto_rr.txt")

SecondsCvar = register_cvar("auto_rr_time", "45")

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)

register_clcmd("menuselect", "clcmd_MenuSelect_JoinClass")
register_clcmd("joinclass", "clcmd_MenuSelect_JoinClass")

register_event("CurWeapon", "ev_CurWeapon", "be", "1=1", "2!29")

get_mapname(szMapName, charsmax(szMapName))

Timer = get_pcvar_num(SecondsCvar)

set_task(1.0, "start_rr_timer", .flags="a", .repeat=get_pcvar_num(SecondsCvar))

server_cmd("amx_pausecfg pause vampire.amxx") // Приостановить работу определенного плагина
}

public start_rr_timer()
{
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.08, 0, 0.0, 0.01)
show_dhudmessage(0, "%L", LANG_PLAYER, "RR_TIME", Timer)

if(Timer == 1)
{
server_cmd("sv_restartround 1")

set_task(3.0, "rr_end")

server_cmd("amx_pausecfg enable vampire.amxx") // Возобновить работу определенного плагина
}

Timer -= 1
}

public rr_end()
{
set_dhudmessage(0, 128, 0, -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5)
show_dhudmessage(0, "%L", LANG_PLAYER, "RR_GG")
}

public fw_PlayerSpawn_Post(id)
{
if(!Timer || !is_user_alive(id))
return

if(!((containi(szMapName, "1hp") != -1) || (containi(szMapName, "35hp") != -1)))
set_user_health(id, 35)

cs_set_user_money(id, 0)
}

public fw_PlayerKilled_Post(id)
{
if(!Timer)
return

set_task(1.0, "playerRespawn", id)
}

public playerRespawn(id)
{
if(!is_user_connected(id)) return
switch(cs_get_user_team(id))
{
case CS_TEAM_T, CS_TEAM_CT:
{
if(!is_user_alive(id))
ExecuteHam(Ham_CS_RoundRespawn, id)
}
}
}

public clcmd_MenuSelect_JoinClass(id)
{
if(!Timer || !is_user_connected(id))
return PLUGIN_CONTINUE

if(get_pdata_int(id, m_iMenu) == MENU_CHOOSEAPPEARANCE && get_pdata_int(id, m_iJoiningState) == JOIN_CHOOSEAPPEARANCE)
{
new command[11], arg[32]

read_argv(0, command, charsmax(command))
read_argv(1, arg, charsmax(arg))

engclient_cmd(id, command, arg)

ExecuteHam(Ham_Player_PreThink, id)

if(!is_user_alive(id))
ExecuteHamB(Ham_Spawn, id)

return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}

public ev_CurWeapon(id)
{
if(!Timer)
return

engclient_cmd(id, "weapon_knife")
}
Всем доброе время суток! Столкнулся с проблемой HLTV, плагин мешает работе. После подключения HLTV, после смены карты он отключается и выдает такие вот ошибки в логах. Без плагина все гуд. Кто может поправить плагин для корректной работы?
 
Сообщения
35
Реакции
1
Алексеич, легче, но уже привык к нему и не хочется менять на другой. Если там просто поменять код в некоторых местах то почему бы не оставить?
 
Сообщения
673
Реакции
242
Помог
11 раз(а)
добавить проверку где надо на is_user_hltv || is_user_bot
 
Сообщения
35
Реакции
1
Limbooc, если бы я ещё шарил куда именно дописать. Куда попало не особо хочется вставлять.
 
Сообщения
673
Реакции
242
Помог
11 раз(а)
Код:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
 
#define PLUGIN_NAME "Auto Restart KNIFE"
#define PLUGIN_VERSION "1.6"
#define PLUGIN_AUTHOR "Leo_[BH] & Fintok!"
 
const m_iMenu = 205
const m_iJoiningState = 121
 
const MENU_CHOOSEAPPEARANCE = 3
const JOIN_CHOOSEAPPEARANCE = 4
 
new Timer, SecondsCvar, szMapName[32]
 
public plugin_init()
{
   register_plugin(PLUGIN_NAME , PLUGIN_VERSION, PLUGIN_AUTHOR)
 
   register_dictionary("auto_rr.txt")
 
   SecondsCvar = register_cvar("auto_rr_time", "45")
 
   RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
   RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
 
   register_clcmd("menuselect", "clcmd_MenuSelect_JoinClass")
   register_clcmd("joinclass", "clcmd_MenuSelect_JoinClass")
 
   register_event("CurWeapon", "ev_CurWeapon", "be", "1=1", "2!29")
 
   get_mapname(szMapName, charsmax(szMapName))
 
   Timer = get_pcvar_num(SecondsCvar)
 
   set_task(1.0, "start_rr_timer", .flags="a", .repeat=get_pcvar_num(SecondsCvar))
 
   server_cmd("amx_pausecfg pause vampire.amxx") // Приостановить работу определенного плагина
}
 
public start_rr_timer()
{
   set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.08, 0, 0.0, 0.01)
   show_dhudmessage(0, "%L", LANG_PLAYER, "RR_TIME", Timer)
 
   if(Timer == 1)
   {
      server_cmd("sv_restartround 1")
 
      set_task(3.0, "rr_end")
 
      server_cmd("amx_pausecfg enable vampire.amxx") // Возобновить работу определенного плагина
   }
 
   Timer -= 1
}
 
public rr_end()
{
   set_dhudmessage(0, 128, 0, -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5)
   show_dhudmessage(0, "%L", LANG_PLAYER, "RR_GG")
}
 
public fw_PlayerSpawn_Post(id)
{
    if(is_user_hltv(id))
        return
   if(!Timer || !is_user_alive(id))
      return
 
   if(!((containi(szMapName, "1hp") != -1) || (containi(szMapName, "35hp") != -1)))
       set_user_health(id, 35)
 
   cs_set_user_money(id, 0)
}
 
public fw_PlayerKilled_Post(id)
{
    if(is_user_hltv(id))
        return
   if(!Timer)
      return
 
   set_task(1.0, "playerRespawn", id)
}
 
public playerRespawn(id)
{
    if(is_user_hltv(id))
        return
   if(!is_user_connected(id)) return
   switch(cs_get_user_team(id))
   {
      case CS_TEAM_T, CS_TEAM_CT:
      {
         if(!is_user_alive(id))
            ExecuteHam(Ham_CS_RoundRespawn, id)
      }
   }
}
 
public clcmd_MenuSelect_JoinClass(id)
{
    if(is_user_hltv(id))
        return
   if(!Timer || !is_user_connected(id))
      return PLUGIN_CONTINUE
    
   if(get_pdata_int(id, m_iMenu) == MENU_CHOOSEAPPEARANCE && get_pdata_int(id, m_iJoiningState) == JOIN_CHOOSEAPPEARANCE)
   {
      new command[11], arg[32]
 
      read_argv(0, command, charsmax(command))
      read_argv(1, arg, charsmax(arg))
 
      engclient_cmd(id, command, arg)
 
      ExecuteHam(Ham_Player_PreThink, id)
 
      if(!is_user_alive(id))
         ExecuteHamB(Ham_Spawn, id)
 
      return PLUGIN_HANDLED
   }
   return PLUGIN_CONTINUE
}
 
public ev_CurWeapon(id)
{
    if(is_user_hltv(id))
        return
        
   if(!Timer)
      return
 
   engclient_cmd(id, "weapon_knife")
}
 
Сообщения
35
Реакции
1
Limbooc, спасибо, как будет возможность протестирую и отпишусь.
 
Сообщения
35
Реакции
1
Limbooc,
Код:
//// rozminka2.sma
//
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(71) : warning 217: loose indentation
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(84) : warning 217: loose indentation
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(94) : warning 217: loose indentation
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(109) : warning 209: function "clcmd_MenuSelect_JoinClass" should return a value
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(109) : warning 217: loose indentation
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(110) : error 078: function uses both "return" and "return <value>"
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(126) : error 078: function uses both "return" and "return <value>"
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(128) : error 078: function uses both "return" and "return <value>"
// C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\rozminka2.sma(136) : warning 217: loose indentation
//
// 3 Errors.
// Could not locate output file C:\Users\▐Ёшщ\OneDrive\╨рсюўшщ ёЄюы\amxmodx-1.9.0-git5294-base-windows\addons\amxmodx\scripting\compiled\rozminka2.amx (compile failed).
//
// Compilation Time: 0,52 sec
// ----------------------------------------

Press enter to exit ...
 
Сообщения
372
Реакции
47
Помог
6 раз(а)
qpi3ik
Попробуй это скомпилировать (я правда не знаю как потом будет работать, но компилируется без ошибок/предупреждений).
 

Вложения

  • 3.3 KB Просмотры: 71
Сообщения
673
Реакции
242
Помог
11 раз(а)
qpi3ik,
Код:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
 
#define PLUGIN_NAME "Auto Restart KNIFE"
#define PLUGIN_VERSION "1.6"
#define PLUGIN_AUTHOR "Leo_[BH] & Fintok!"
 
const m_iMenu = 205
const m_iJoiningState = 121
 
const MENU_CHOOSEAPPEARANCE = 3
const JOIN_CHOOSEAPPEARANCE = 4
 
new Timer, SecondsCvar, szMapName[32]
 
public plugin_init()
{
   register_plugin(PLUGIN_NAME , PLUGIN_VERSION, PLUGIN_AUTHOR)
 
   register_dictionary("auto_rr.txt")
 
   SecondsCvar = register_cvar("auto_rr_time", "45")
 
   RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
   RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
 
   register_clcmd("menuselect", "clcmd_MenuSelect_JoinClass")
   register_clcmd("joinclass", "clcmd_MenuSelect_JoinClass")
 
   register_event("CurWeapon", "ev_CurWeapon", "be", "1=1", "2!29")
 
   get_mapname(szMapName, charsmax(szMapName))
 
   Timer = get_pcvar_num(SecondsCvar)
 
   set_task(1.0, "start_rr_timer", .flags="a", .repeat=get_pcvar_num(SecondsCvar))
 
   server_cmd("amx_pausecfg pause vampire.amxx") // Приостановить работу определенного плагина
}
 
public start_rr_timer()
{
   set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.08, 0, 0.0, 0.01)
   show_dhudmessage(0, "%L", LANG_PLAYER, "RR_TIME", Timer)
 
   if(Timer == 1)
   {
      server_cmd("sv_restartround 1")
 
      set_task(3.0, "rr_end")
 
      server_cmd("amx_pausecfg enable vampire.amxx") // Возобновить работу определенного плагина
   }
 
   Timer -= 1
}
 
public rr_end()
{
   set_dhudmessage(0, 128, 0, -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5)
   show_dhudmessage(0, "%L", LANG_PLAYER, "RR_GG")
}
 
public fw_PlayerSpawn_Post(id)
{
   if(is_user_hltv(id))
       return PLUGIN_CONTINUE
   if(!Timer || !is_user_alive(id))
      return PLUGIN_CONTINUE
 
   if(!((containi(szMapName, "1hp") != -1) || (containi(szMapName, "35hp") != -1)))
       set_user_health(id, 35)
 
   cs_set_user_money(id, 0)
   return PLUGIN_CONTINUE
}
 
public fw_PlayerKilled_Post(id)
{
   if(is_user_hltv(id))
       return PLUGIN_CONTINUE
   if(!Timer)
      return PLUGIN_CONTINUE
 
   set_task(1.0, "playerRespawn", id)
   return PLUGIN_CONTINUE
}
 
public playerRespawn(id)
{
   if(is_user_hltv(id))
       return
        
   if(!is_user_connected(id)) return
   switch(cs_get_user_team(id))
   {
      case CS_TEAM_T, CS_TEAM_CT:
      {
         if(!is_user_alive(id))
            ExecuteHam(Ham_CS_RoundRespawn, id)
      }
   }
   return
}
 
public clcmd_MenuSelect_JoinClass(id)
{
   if(is_user_hltv(id))
       return PLUGIN_CONTINUE
   if(!Timer || !is_user_connected(id))
      return PLUGIN_CONTINUE
    
   if(get_pdata_int(id, m_iMenu) == MENU_CHOOSEAPPEARANCE && get_pdata_int(id, m_iJoiningState) == JOIN_CHOOSEAPPEARANCE)
   {
      new command[11], arg[32]
 
      read_argv(0, command, charsmax(command))
      read_argv(1, arg, charsmax(arg))
 
      engclient_cmd(id, command, arg)
 
      ExecuteHam(Ham_Player_PreThink, id)
 
      if(!is_user_alive(id))
         ExecuteHamB(Ham_Spawn, id)
 
      return PLUGIN_HANDLED
   }
   return PLUGIN_CONTINUE
}
 
public ev_CurWeapon(id)
{
   if(is_user_hltv(id))
       return
        
   if(!Timer)
      return
 
   engclient_cmd(id, "weapon_knife")
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
 
Сообщения
35
Реакции
1
Алексеич, спасибо не плохой плагин, но судя по сообщениям он не до конца сделан. Много багов, которые автор так и не пофиксил.
 
Сообщения
678
Реакции
56
Помог
16 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
qpi3ik, Ну тогда обратитсь в раздел https://dev-cs.ru/forums/90/ и за пару соток тебе сделают то, что тебе нужно, тем более плагин не сложный для написания, даже с добавлением чего-либо и учётом каких-то моментов на момент рр.
 

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

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