←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Problem ze zmianami teamów

  • +
  • -
kejot - zdjęcie kejot 14.08.2013

Witam

Otóż tutaj na forum znalazłem plugin zmiany teamów po 12 wygranych rundach autorstwa DarkGL.

Ale niestety jest mały problem z tym pluginem ponieważ de facto plugin działa ale jedynym problemem jest to że nie przenosi graczy z ct do drużyny tt, ale odwrotnie działa. W skrócie plugin przenosi graczy TT do CT ale graczy z CT nie przenosi do TT.

 

Tutaj zamieszam kod .sma tego pluginu i proszę was o pomoc.

#include <amxmodx>

#include <amxmisc>

#include <cstrike>

#define PLUGIN "New Plug-In"

#define VERSION "1.0"

#define AUTHOR "home"



new ile_rund = 0;

new kto_w_ct[33];

new kto_w_tt[33];

new ile_ct,ile_tt;



public plugin_init() {

	register_plugin(PLUGIN, VERSION, AUTHOR)

	register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0") 

	

}



public Nowa_Runda()

{

	ile_rund++;

	ile_ct = 0;

	for(new asd = 1;asd<33;asd++){

		if(is_user_alive(asd)){

			if(get_user_team(asd) == 2){

				kto_w_ct[ile_ct] = asd;

				ile_ct++;

			}

			else if(get_user_team(asd) == 1){

				kto_w_tt[ile_tt] = asd;

				ile_tt++;

			}

		}

	}

	if(ile_rund == 12){

		zmien_druzyny();

	}

}



public zmien_druzyny(){

	for(new a = 0;a<ile_ct;a++){

		cs_set_user_team(kto_w_ct[a],CS_TEAM_T,CS_T_LEET);

	}

	for(new a = 0;a<ile_tt;a++){

		cs_set_user_team(kto_w_tt[a],CS_TEAM_CT,CS_CT_GIGN);

	}

	server_cmd("sv_restartround 1");

}

Pomocy.

Odpowiedz