Skip to content

Commit

Permalink
Otimized functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfectScrash committed Feb 14, 2022
1 parent b40879b commit 52925e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
11 changes: 2 additions & 9 deletions addons/amxmodx/scripting/examples/zpsp_special_class_alien.sma
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52925e1

Please sign in to comment.