#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fakemeta> #define PLUGIN "HalfTime TeamSwap" #define VERSION "1.1" #define AUTHOR "SHUSTAS" #define fm_DispatchSpawn(%1) dllfunc(DLLFunc_Spawn, %1) public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) set_task(float(get_cvar_num("mp_timelimit"))/2.0, "SwapTeams", 0); } public SwapTeams() { new players[32], num get_players(players, num) new player for(new i = 0; i < num; i++) { player = players[i] cs_set_user_team(player, cs_get_user_team(player) == CS_TEAM_T ? CS_TEAM_CT:CS_TEAM_T) fm_DispatchSpawn(player) } client_print(0, print_center, "TEAMS ARE BEING SWAPPED"); }
Niestety plugin nie dziala tak jak bym tego chcial. Nie zamienia stron po polowie czasu; po zmianie mapy, zamienia strony nie dajac mozliwosci wyboru po czym trace kontrole nad postacia.