From 52925e169dc99b454e3b8daa7fcba05b56369f55 Mon Sep 17 00:00:00 2001 From: PerfectScrash Date: Sun, 13 Feb 2022 22:47:20 -0300 Subject: [PATCH] Otimized functions --- .../scripting/examples/zpsp_special_class_alien.sma | 11 ++--------- .../examples/zpsp_special_class_morpheus.sma | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/addons/amxmodx/scripting/examples/zpsp_special_class_alien.sma b/addons/amxmodx/scripting/examples/zpsp_special_class_alien.sma index acdb163..fb7dcf0 100644 --- a/addons/amxmodx/scripting/examples/zpsp_special_class_alien.sma +++ b/addons/amxmodx/scripting/examples/zpsp_special_class_alien.sma @@ -225,19 +225,12 @@ public zp_round_started_pre(game) { if(zp_get_alive_players() < get_pcvar_num(cvar_minplayers)) return ZP_PLUGIN_HANDLED - // Start our new mode - start_alien_mode() - return PLUGIN_CONTINUE } -public zp_game_mode_selected(gameid, id) { - // Check if our game mode was called - if(gameid == g_gameid) +public zp_round_started(gameid) { + if(gameid == g_gameid) // Check if it is our game mode start_alien_mode() - - // Make the compiler happy again =) - return PLUGIN_CONTINUE } // This function contains the whole code behind this game mode diff --git a/addons/amxmodx/scripting/examples/zpsp_special_class_morpheus.sma b/addons/amxmodx/scripting/examples/zpsp_special_class_morpheus.sma index ca068cf..3affddc 100644 --- a/addons/amxmodx/scripting/examples/zpsp_special_class_morpheus.sma +++ b/addons/amxmodx/scripting/examples/zpsp_special_class_morpheus.sma @@ -196,19 +196,12 @@ public zp_round_started_pre(game) { if(zp_get_alive_players() < get_pcvar_num(cvar_minplayers)) return ZP_PLUGIN_HANDLED - // Start our new mode - start_morpheus_mode() - return PLUGIN_CONTINUE } -public zp_game_mode_selected(gameid, id) { - // Check if our game mode was called - if(gameid == g_gameid) +public zp_round_started(gameid) { + if(gameid == g_gameid) // Check if our game mode was called start_morpheus_mode() - - // Make the compiler happy again =) - return PLUGIN_CONTINUE } // This function contains the whole code behind this game mode