From aa70a42c5b2ec2e5dda26fd930a2786c35c7f4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yekta=20G=C3=BClery=C3=BCz?= <37214615+yek-ta@users.noreply.github.com> Date: Tue, 11 Jun 2019 08:33:43 +0300 Subject: [PATCH] Fixed tasks and 1.2 --- .../amxmodx/scripting/sctf_FlaggersController.sma | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Simple Capture the Flag/addons/amxmodx/scripting/sctf_FlaggersController.sma b/Simple Capture the Flag/addons/amxmodx/scripting/sctf_FlaggersController.sma index d0ae4e0..430b2d9 100644 --- a/Simple Capture the Flag/addons/amxmodx/scripting/sctf_FlaggersController.sma +++ b/Simple Capture the Flag/addons/amxmodx/scripting/sctf_FlaggersController.sma @@ -3,16 +3,19 @@ #include #include #include +#include new Float:pCvar_Flagger_Time; new Float:pCvar_BackToBase_Time; +new nMaxPlayers; public plugin_init() { - register_plugin("SCTF Flaggers Controller", "1.1", "Yek'-ta") + register_plugin("SCTF Flaggers Controller", "1.2", "Yek'-ta") register_clcmd("sctf_backtoflag", "move_back_flag_com" , ADMIN_BAN) register_dictionary("Simple_CTF.txt"); pCvar_Flagger_Time = get_pcvar_float(register_cvar("sctf_flagger_time", "90")) pCvar_BackToBase_Time = get_pcvar_float(register_cvar("sctf_flag_backtobase", "90")) + nMaxPlayers = get_member_game(m_nMaxPlayers); } public move_back_flag_com(id, level, cid){ if( !cmd_access( id, level, cid, 1 ) ) @@ -20,6 +23,12 @@ public move_back_flag_com(id, level, cid){ sctf_move_to_flag_back(sctf_ent_TEFlag()) sctf_move_to_flag_back(sctf_ent_CTFlag()) + + remove_task(sctf_ent_TEFlag()); + remove_task(sctf_ent_CTFlag()); + for (new i = 1; i <= nMaxPlayers; i++){ + remove_task(i); + } new name[MAX_NAME_LENGTH] get_user_name(id, name, charsmax(name)) client_print_color(0, id, "%L", LANG_PLAYER, "ADMIN_MOVED_FLAGS",name)