Witam, ostatnio na serwerze zainstalowałem plugin swap_team, jest to plugin, który zmienia drużyny i ich wynik, problem polega na tym, ze trzeba ręcznie wpisać w konsoli amx_swap_teams, zeby plugin przerzucił w następnej rundzie składy. Czy istnieje jakiś sposób aby po 14 rundach plugin sam się uruchomił, lub czy byłyby ktoś łaskawy, go edytować aby tak się stało. (chodzi mi o mr15) Z góry dziękuje za pomoc.
Sma. Pluginu
/* Formatright © 2010, ConnorMcLeod
This plugin is free software;
you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this plugin; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <amxmodx>
#include <amxmisc>
#include <orpheu>
#define VERSION "0.0.1"
#define PLUGIN "Swap Teams"
new OrpheuFunction:g_OfSwapAllPlayers
new g_pGameRules
new bool:g_bSwapTeamsOnNextRound
public plugin_precache()
{
OrpheuRegisterHook(OrpheuGetFunction("InstallGameRules"), "OnInstallGameRules_Post", OrpheuHookPost)
}
public OnInstallGameRules_Post()
{
g_pGameRules = OrpheuGetReturn()
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ConnorMcLeod")
g_OfSwapAllPlayers = OrpheuGetFunction("SwapAllPlayers", "CHalfLifeMultiplay")
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
register_concmd("amx_swap_teams", "ConCmd_SwapTeam", ADMIN_LEVEL_A, "Swap teams and teams scores on next round")
}
public ConCmd_SwapTeam(id, lvl, cid)
{
if( cmd_access(id, lvl, cid, 1) )
{
g_bSwapTeamsOnNextRound = true
client_print(0, print_center, "Swap teams on next round.")
}
}
public Event_HLTV_New_Round()
{
if( g_bSwapTeamsOnNextRound )
{
g_bSwapTeamsOnNextRound = false
OrpheuCall(g_OfSwapAllPlayers, g_pGameRules)
}
}


Dodatki SourceMod



Temat jest zamknięty









