Advanced Mix System

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
EpsiloN
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 16 Sep 2013, 19:42
Detinator Steam: Da
CS Status: OnLine
Detinator server CS: EpsiloN's Server
SteamID: godskilled
Location: Brăila
Has thanked: 72 times
Been thanked: 5 times
Contact:

24 Jul 2014, 03:09

Toată viața mea am căutat un plugin de mix simplu și ușor de folosit, dar din păcate nu am găsit (ce poet am fost la faza asta :)) ) așa că m-am gândit să fac eu unul pe care să-l public și să se bucure toată lumea de el și se pare că am reușit (așa că SÂC! SÂC! SÂC! G-MIX)

Descriere: Un sistem de mix/war (5 vs 5, dar poate fi modificat) pe 2 reprize
SMA | Afiseaza codul
[code]#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Advanced Mix System"
#define VERSION "1.1"
#define AUTHOR "dystopiA"

#define TAG "MIX"

new mixon = 0
new schimbate = 0

new teamA[2] = 0
new teamB[2] = 0

new bool:user_can_speak = true
new bool:pwon = false
new bool:demo_on[33] = false

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /mix", "cmdMixMenu", ADMIN_LEVEL_G, "- Deschide meniul de mix")
	register_clcmd("say /scor", "cmdScor", ADMIN_ALL, "- Afiseaza scorul")
	register_clcmd("say /setari", "cmdSetari", ADMIN_LEVEL_G, "- Forteaza setari jucatorilor")
	register_clcmd("say /nopass", "cmdNoPass", ADMIN_PASSWORD, "- Scoate parola serverului")
	register_clcmd("say", "check")
	
	register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
	register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
	register_event("HLTV", "swap", "a", "1=0", "2=0")
	register_event("HLTV", "end_mix", "a", "1=0", "2=0")
	register_logevent("announce", 2, "1=Round_End")
	register_logevent("announce_winner", 2, "1=Round_End")
}

public cmdMixMenu(id)
{
	if(!get_user_flags(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
		return PLUGIN_HANDLED
	}
	
	new menu = menu_create("\wAdvanced Mix System^n", "menu_handler")
	menu_additem(menu, "\wDa restart rundei/reprizei", "1", 0)
	menu_additem(menu, "\wPorneste alegerile", "2", 0)
	menu_additem(menu, "\wPorneste prima repriza", "3", 0)
	menu_additem(menu, "\wPorneste a doua repriza", "4", 0)
	menu_additem(menu, "\wOpreste mix-ul", "5", 0)
	menu_display(id, menu, 0)
	
	return PLUGIN_HANDLED
}

public menu_handler(id, menu, item)
{
	new name[32]
	get_user_name(id, name, charsmax(name))
	
	if(!get_user_flags(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
		return PLUGIN_HANDLED
	}
	
	switch(item)
	{
		case 0:
		{
			switch(mixon)
			{
				case 0:
				{
					set_cvar_string("sv_restart", "1")
					set_cvar_string("mp_freezetime", "0")
					set_cvar_string("mp_startmoney", "16000")
					
					switch(get_cvar_num("amx_show_activity"))
					{
						case 1: client_print(0, print_chat, "[%s] Adminul a dat restart", TAG)
						case 2: client_print(0, print_chat, "[%s] Adminul %s a dat restart", TAG, name)
					}
					
					menu_destroy(menu)
				}
				case 1:
				{
					teamA[0] = 0
					teamB[0] = 0
					
					set_cvar_string("sv_restart", "1")
					
					switch(get_cvar_num("amx_show_activity"))
					{
						case 1: client_print(0, print_chat, "[%s] Adminul a dat restart primei reprize", TAG)
						case 2: client_print(0, print_chat, "[%s] Adminul %s a dat restart primei reprize", TAG, name)
					}
					
					menu_destroy(menu)
				}
				case 2:
				{
					set_cvar_string("sv_restart", "1")
					set_cvar_string("mp_startmoney", "16000")
					set_cvar_string("mp_freezetime", "0")
					set_cvar_string("mp_friendlyfire", "0")
					
					switch(get_cvar_num("amx_show_activity"))
					{
						case 1: client_print(0, print_chat, "[%s] Adminul a dat restart", TAG)
						case 2: client_print(0, print_chat, "[%s] Adminul %s a dat restart", TAG, name)
					}
					
					menu_destroy(menu)
				}
				case 3:
				{
					teamA[1] = 0
					teamB[1] = 0
					
					set_cvar_string("sv_restart", "1")
					
					switch(get_cvar_num("amx_show_activity"))
					{
						case 1: client_print(0, print_chat, "[%s] Adminul a dat restart celei de-a doua reprize", TAG)
						case 2: client_print(0, print_chat, "[%s] Adminul %s a dat restart celei de-a doua reprize", TAG, name)
					}
					
					menu_destroy(menu)
				}
			}
		}
		case 1:
		{
			switch(mixon)
			{
				case 0:
				{
							
					new players[32], num
					get_players(players, num, "h")
					
					if(num >= 10)
					{
						for(new i = 0; i < num; i++)
						{
							new team
							team = get_user_team(players)
							
							switch(team)
							{
								case 1:
								{
									if(!is_user_alive(players))
									{
										cs_set_user_team(players, CS_TEAM_SPECTATOR)
									}
									else
									{
										user_kill(players, 1)
										cs_set_user_team(players, CS_TEAM_SPECTATOR)
									}
								}
								case 2:
								{
									if(!is_user_alive(players))
									{
										cs_set_user_team(players, CS_TEAM_SPECTATOR)
									}
									else
									{
										user_kill(players, 1)
										cs_set_user_team(players, CS_TEAM_SPECTATOR)
									}
								}
							}
						}
								
						switch(get_cvar_num("amx_show_activity"))
						{
							case 1: client_print(0, print_chat, "[%s] Adminul a pornit alegerile", TAG)
							case 2: client_print(0, print_chat, "[%s] Adminul %s a pornit alegerile", TAG, name)
						}
						
						menu_destroy(menu)
					}
					else
					{
						client_print(id, print_chat, "[%s] Alegerile nu pot incepe deoarece nu sunt conectati 10 jucatori", TAG)
						
						menu_destroy(menu)
					}
				}
				case 1, 2, 3:
				{
					client_print(id, print_chat, "[%s] Mix-ul este deja pornit", TAG)
					
					menu_destroy(menu)
				}
			}
		}
		case 2:
		{
			switch(mixon)
			{
				case 0:
				{
					new players[32], num
					get_players(players, num, "h")
					
					if(num >= 10)
					{
						mixon = 1
						
						client_cmd(0, "cl_updaterate 101")
						client_cmd(0, "cl_cmdrate 101")
						client_cmd(0, "rate 100000")
						client_cmd(0, "fps_max 101")
						client_cmd(0, "ex_interp 0.01")
						
						set_cvar_string("sv_restart", "1")
						set_cvar_string("mp_freezetime", "10")
						set_cvar_string("mp_startmoney", "800")
						set_cvar_string("mp_friendlyfire", "1")
						set_cvar_string("mp_timelimit", "0")
						set_cvar_string("mp_roundtime", "1.75")
						set_cvar_string("mp_c4timer", "35")
						set_cvar_string("mp_buytime", "0.25")
						set_cvar_string("mp_forcecamera", "2")
						set_cvar_string("mp_fadetoblack", "0")
						set_cvar_string("mp_tkpunish", "0")
						
						switch(get_cvar_num("amx_show_activity"))
						{
							case 1: client_print(0, print_chat, "[%s] Adminul a pornit prima repriza. GL & HF!", TAG)
							case 2: client_print(0, print_chat, "[%s] Adminul %s a pornit prima repriza. GL & HF!", TAG, name)
						}
						
						menu_destroy(menu)
					}
					else
					{
						client_print(id, print_chat, "[%s] Mix-ul nu poate incepe deoarece nu sunt conectati 10 jucatori", TAG)
						
						menu_destroy(menu)
					}
				}
				case 1:
				{
					client_print(id, print_chat, "[%s] Prima repriza este deja pornita", TAG)
					
					menu_destroy(menu)
				}
				case 2:
				{
					client_print(id, print_chat, "[%s] Pirma repriza s-a sfarsit deja", TAG)
					
					menu_destroy(menu)
				}
				case 3:
				{
					client_print(id, print_chat, "[%s] A doua repriza este in desfasurare", TAG)
					
					menu_destroy(menu)
				}
			}
		}
		case 3:
		{
			switch(mixon)
			{
				case 0:
				{
					client_print(id, print_chat, "[%s] Mix-ul nu este pornit", TAG)
					
					menu_destroy(menu)
				}
				case 1:
				{
					client_print(id, print_chat, "[%s] Prima repriza este in desfasurare", TAG)
					
					menu_destroy(menu)
				}
				case 2:
				{
					mixon = 3
					
					client_cmd(0, "cl_updaterate 101")
					client_cmd(0, "cl_cmdrate 101")
					client_cmd(0, "rate 100000")
					client_cmd(0, "fps_max 101")
					client_cmd(0, "ex_interp 0.01")
					
					set_cvar_string("sv_restart", "1")
					set_cvar_string("mp_freezetime", "10")
					set_cvar_string("mp_startmoney", "800")
					set_cvar_string("mp_friendlyfire", "1")
					set_cvar_string("mp_timelimit", "0")
					set_cvar_string("mp_roundtime", "1.75")
					set_cvar_string("mp_c4timer", "35")
					set_cvar_string("mp_buytime", "0.25")
					set_cvar_string("mp_forcecamera", "2")
					set_cvar_string("mp_fadetoblack", "0")
					set_cvar_string("mp_tkpunish", "0")
					
					switch(get_cvar_num("amx_show_activity"))
					{
						case 1: client_print(0, print_chat, "[%s] Adminul a pornit a doua repriza. GL & HF!", TAG)
						case 2: client_print(0, print_chat, "[%s] Adminul %s a pornit a doua repriza. GL & HF!", TAG, name)
					}
					
					menu_destroy(menu)
				}
				case 3:
				{
					client_print(id, print_chat, "[%s] A doua repriza este deja pornita", TAG)
					
					menu_destroy(menu)
				}
			}
		}
		case 4:
		{
			switch(mixon)
			{
				case 0:
				{
					client_print(id, print_chat, "[%s] Mix-ul nu este pornit", TAG)
					
					menu_destroy(menu)
				}
				case 1, 2, 3:
				{
					mixon = 0
					teamA[0] = 0
					teamB[0] = 0
					teamA[1] = 0
					teamB[1] = 0
					schimbate = 0
					
					set_cvar_string("sv_restart", "1")
					set_cvar_string("mp_freezetime", "0")
					set_cvar_string("mp_startmoney", "800")
					set_cvar_string("mp_friendlyfire", "0")
					
					switch(get_cvar_num("amx_show_activity"))
					{
						case 1: client_print(0, print_chat, "[%s] Adminul a oprit mix-ul", TAG)
						case 2: client_print(0, print_chat, "[%s] Adminul %s a oprit mix-ul", TAG, name)
					}
					
					menu_destroy(menu)
				}
			}
		}
		case MENU_EXIT:
		{
			menu_destroy(menu)
			
			return PLUGIN_HANDLED
		}
	}
	
	return PLUGIN_HANDLED
}

public cmdScor(id)
{
	switch(mixon)
	{
		case 0: client_print(id, print_chat, "[%s] Mix-ul nu este pornit", TAG)
		case 1, 2, 3:
		{
			switch(schimbate)
			{
				case 0:
				{
					if(teamA[0] + teamA[1] > teamB[0] + teamB[1])
					{
						client_print(id, print_chat, "[%s] Echipa celor de la T conduce echipa celor de la CT cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
					else if(teamA[0] + teamA[1] < teamB[0] + teamB[1])
					{
						client_print(id, print_chat, "[%s] Echipa celor de la CT conduce echipa celor de la T cu %d - %d", TAG, teamB[0] + teamB[1], teamA[0] + teamA[1])
					}
					else if(teamA[0] + teamA[1] == teamB[0] + teamB[1])
					{
						client_print(id, print_chat, "[%s] Echipele sunt la egalitate cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
				}
				case 1:
				{

					if(teamA[0] + teamA[1] > teamB[0] + teamB[1])
					{
						client_print(id, print_chat, "[%s] Echipa celor de la CT conduce echipa celor de la T cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
					else if(teamA[0] + teamA[1] < teamB[0] + teamB[1])
					{
						client_print(id, print_chat, "[%s] Echipa celor de la T conduce echipa celor de la CT cu %d - %d", TAG, teamB[0] + teamB[1], teamA[0] + teamA[1])
					}
					else if(teamA[0] + teamA[1] == teamB[0] + teamB[1])
					{
						client_print(id, print_chat, "[%s] Echipele sunt la egalitate cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
				}
			}
		}
	}
	
	return PLUGIN_HANDLED
}

public cmdSetari(id)
{
	new name[32]
	get_user_name(id, name, charsmax(name))
	
	if(!get_user_flags(id) && ADMIN_KICK)
		return PLUGIN_HANDLED
	
	client_cmd(0, "cl_updaterate 101")
	client_cmd(0, "cl_cmdrate 101")
	client_cmd(0, "rate 100000")
	client_cmd(0, "fps_max 101")
	client_cmd(0, "ex_interp 0.01")
	
	return PLUGIN_HANDLED
}

public cmdNoPass(id)
{
	new name[32]
	get_user_name(id, name, charsmax(name))
	
	if(!get_user_flags(id) && ADMIN_PASSWORD)
	{
		client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
		return PLUGIN_HANDLED
	}
	
	switch(pwon)
	{
		case false: client_print(id, print_chat, "[%s] Serverul nu are parola", TAG)
		case true:
		{
			pwon = false
			
			set_cvar_string("sv_password", "")
			
			switch(get_cvar_num("amx_show_activity"))
			{
				case 1: client_print(0, print_chat, "[%s] Adminul a scos parola serverului", TAG)
				case 2: client_print(0, print_chat, "[%s] Adminul %s a scos parola serverului", TAG, name)
			}
		}
	}
	
	return PLUGIN_HANDLED
}

public check(id)
{
	new said[192], name[32]
	read_args(said, charsmax(said))
	remove_quotes(said)
	get_user_name(id, name, charsmax(name))
	
	if(equal(said, "/say off"))
	{
		if(!get_user_flags(id) && ADMIN_LEVEL_G)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		switch(user_can_speak)
		{
			case true:
			{
				user_can_speak = false
				
				switch(get_cvar_num("amx_show_activity"))
				{
					case 1: client_print(0, print_chat, "[%s] Adminul a blocat canalul SAY", TAG)
					case 2: client_print(0, print_chat, "[%s] Adminul %s a blocat canalul SAY", TAG, name)
				}
			}
			case false: client_print(id, print_chat, "[%s] Canalul SAY este deja blocat", TAG)
		}
		
		return PLUGIN_HANDLED
	}
	else if(equal(said, "/say on"))
	{
		if(!get_user_flags(id) && ADMIN_LEVEL_G)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		switch(user_can_speak)
		{
			case false:
			{
				user_can_speak = true
				
				switch(get_cvar_num("amx_show_activity"))
				{
					case 1: client_print(0, print_chat, "[%s] Adminul a deblocat canalul SAY", TAG)
					case 2: client_print(0, print_chat, "[%s] Adminul %s a deblocat canalul SAY", TAG, name)
				}
			}
			case true: client_print(id, print_chat, "[%s] Canalul SAY nu este blocat", TAG)
		}
		
		return PLUGIN_HANDLED
	}
	else if(equal(said, "/pass") || equal(said, "/pass "))
	{
		if(!get_user_flags(id) && ADMIN_PASSWORD)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		client_print(id, print_chat, "[%s] Comanda: /pass <parola> - Seteaza parola serverului", TAG)
		return PLUGIN_HANDLED
	}
	else if(said[0] == '/' && said[1] == 'p' && said[2] == 'a' && said[3] == 's' && said[4] == 's')
	{
		if(!get_user_flags(id) && ADMIN_PASSWORD)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		switch(pwon)
		{
			case false:
			{
				pwon = true
				
				new password[50], name[32]
				strbreak(said, said, 6, password, charsmax(password))
				get_user_name(id, name, charsmax(name))
				
				set_cvar_string("sv_password", password)
				
				switch(get_cvar_num("amx_show_activity"))
				{
					case 1: client_print(0, print_chat, "[%s] Adminul a schimbat parola serverului in ^"%s^"", TAG, password)
					case 2: client_print(0, print_chat, "[%s] Adminul %s a schimbat parola serverului in ^"%s^"", TAG, name, password)
				}
			}
			case true:
			{
				new password[50], name[32]
				strbreak(said, said, 6, password, charsmax(password))
				get_user_name(id, name, charsmax(name))
				
				set_cvar_string("sv_password", password)
				
				switch(get_cvar_num("amx_show_activity"))
				{
					case 1: client_print(0, print_chat, "[%s] Adminul a schimbat parola serverului in ^"%s^"", TAG, password)
					case 2: client_print(0, print_chat, "[%s] Adminul %s a schimbat parola serverului in ^"%s^"", TAG, name, password)
				}
			}
		}
		
		return PLUGIN_HANDLED
	}
	else if(equal(said, "/demo") || equal(said, "/demo "))
	{
		if(!get_user_flags(id) && ADMIN_KICK)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		client_print(id, print_chat, "[%s] Comanda: /demo <nume sau #userid> - Inregistreaza un demo jucatorului", TAG)
		return PLUGIN_HANDLED
	}
	else if(said[0] == '/' && said[1] == 'd' && said[2] == 'e' && said[3] == 'm' && said[4] == 'o')
	{
		if(!get_user_flags(id) && ADMIN_KICK)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		new arg[32]
		read_argv(1, arg, charsmax(arg))
		copy(arg, charsmax(arg), said[6])
		
		new player = cmd_target(id, arg, CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
		
		if(!player)
			return PLUGIN_HANDLED
		
		new name[32], name2[32]
		get_user_name(id, name, charsmax(name))
		get_user_name(player, name2, charsmax(name2))
		
		switch(demo_on[player])
		{
			case false:
			{
				demo_on[player] = true
				
				client_cmd(player, "record ^"demo@%s^"", name2)
				
				client_print(id, print_chat, "[%s] Inregistrez un demo jucatorului %s", TAG, name2)
			}
			case true: client_print(id, print_chat, "[%s] Un demo este deja pornit pe jucatorul %s", TAG, name2)
		}
		
		return PLUGIN_HANDLED
	}
	else if(equal(said, "/stopdemo") || equal(said, "/stopdemo "))
	{
		if(!get_user_flags(id) && ADMIN_KICK)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		client_print(id, print_chat, "[%s] Comanda: /stopdemo <nume sau #userid> - Opresti demo-ul jucatorului", TAG)
		return PLUGIN_HANDLED
	}
	else if(said[0] == '/' && said[1] == 's' && said[2] == 't' && said[3] == 'o' && said[4] == 'p' && said[5] == 'd' && said[6] == 'e' && said[7] == 'm' && said[8] == 'o')
	{
		if(!get_user_flags(id) && ADMIN_KICK)
		{
			client_print(id, print_chat, "[%s] Nu ai acces la aceasta comanda", TAG)
			return PLUGIN_HANDLED
		}
		
		new arg[32]
		read_argv(1, arg, charsmax(arg))
		copy(arg, charsmax(arg), said[10])
		
		new player = cmd_target(id, arg, CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
		
		if(!player)
			return PLUGIN_HANDLED
		
		new name[32], name2[32]
		get_user_name(id, name, charsmax(name))
		get_user_name(player, name2, charsmax(name2))
		
		switch(demo_on[player])
		{
			case true:
			{
				demo_on[player] = false
				
				client_cmd(player, "stop")
				
				client_print(id, print_chat, "[%s] Am oprit demo-ul jucatorului %s", TAG, name2)
			}
			case false: client_print(id, print_chat, "[%s] Nici un demo nu este pornit pe jucatorul %s", TAG, name2)
		}
		
		return PLUGIN_HANDLED
	}
	
	switch(user_can_speak)
	{
		case false:
		{
			client_print(id, print_chat, "[%s] Canalul SAY este dezactivat pe parcursul meciului. Foloseste say_team", TAG)
			return PLUGIN_HANDLED
		}
	}
	
	return PLUGIN_CONTINUE
}

public t_win()
{
	switch(mixon)
	{
		case 1: teamA[0] += 1
		case 3: teamB[1] += 1
	}
}

public ct_win()
{
	switch(mixon)
	{
		case 1: teamB[0] += 1
		case 3: teamA[1] += 1
	}
}			

public announce()
{
	switch(mixon)
	{
		case 1, 3:
		{
			switch(schimbate)
			{
				case 0:
				{
					if(teamA[0] + teamA[1] > teamB[0] + teamB[1])
					{
						client_print(0, print_chat, "[%s] Echipa celor de la T conduce echipa celor de la CT cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
					else if(teamA[0] + teamA[1] < teamB[0] + teamB[1])
					{
						client_print(0, print_chat, "[%s] Echipa celor de la CT conduce echipa celor de la T cu %d - %d", TAG, teamB[0] + teamB[1], teamA[0] + teamA[1])
					}
					else if(teamA[0] + teamA[1] == teamB[0] + teamB[1])
					{
						client_print(0, print_chat, "[%s] Echipele sunt la egalitate cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
				}
				case 1:
				{
					if(teamA[0] + teamA[1] > teamB[0] + teamB[1])
					{
						client_print(0, print_chat, "[%s] Echipa celor de la CT conduce echipa celor de la T cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
					else if(teamA[0] + teamA[1] < teamB[0] + teamB[1])
					{
						client_print(0, print_chat, "[%s] Echipa celor de la T conduce echipa celor de la CT cu %d - %d", TAG, teamB[0] + teamB[1], teamA[0] + teamA[1])
					}
					else if(teamA[0] + teamA[1] == teamB[0] + teamB[1])
					{
						client_print(0, print_chat, "[%s] Echipele sunt la egalitate cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
				}
			}
		}
	}
}

public announce_winner()
{
	switch(mixon)
	{
		case 3:
		{
			switch(schimbate)
			{
				case 0:
				{
					if(teamA[0] + teamA[1] == 16)
					{
						client_print(0, print_chat, "[%s] Echipa celor de la T castiga mix-ul cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
					else if(teamB[0] + teamB[1] == 16)
					{
						client_print(0, print_chat, "[%s] Echipa celor de la CT castiga mix-ul cu %d - %d", TAG, teamB[0] + teamB[1], teamA[0] + teamA[1])
					}
				}
				case 1:
				{
					if(teamA[0] + teamA[1] == 16)
					{
						client_print(0, print_chat, "[%s] !cEchipa celor de la CT castiga mix-ul cu %d - %d", TAG, teamA[0] + teamA[1], teamB[0] + teamB[1])
					}
					else if(teamB[0] + teamB[1] == 16)
					{
						client_print(0, print_chat, "[%s] Echipa celor de la T castiga mix-ul cu %d - %d", TAG, teamB[0] + teamB[1], teamA[0] + teamA[1])
					}
				}
			}
		}
	}
}

public swap()
{
	switch(mixon)
	{
		case 1:
		{
			if(teamA[0] + teamB[0] == 15)
			{
				switch(schimbate)
				{
					case 0:
					{
						mixon = 2
						schimbate = 1
						
						set_cvar_string("sv_restart", "1")
						set_cvar_string("mp_friendlyfire", "0")
						set_cvar_string("mp_freezetime", "0")
						set_cvar_string("mp_startmoney", "16000")
						
						new players[32], num
						get_players(players, num, "h")
						
						for(new i = 0; i < num; i++)
						{
							switch(cs_get_user_team(players))
							{
								case CS_TEAM_T: cs_set_user_team(players[i], CS_TEAM_CT)
								case CS_TEAM_CT: cs_set_user_team(players[i], CS_TEAM_T)
							}
						}
						
						client_print(0, print_chat, "[%s] Prima repriza s-a incheiat. A doua repriza poate incepe", TAG)
					}
				}
			}
		}
	}
}

public end_mix()
{
	switch(mixon)
	{
		case 3:
		{
			if(teamA[0] + teamA[1] == 16 || teamB[0] + teamB[1] == 16)
			{
				mixon = 0
				schimbate = 0
				teamA[0] = 0
				teamB[0] = 0
				teamA[1] = 0
				teamB[1] = 0
				
				if(pwon == true)
				{
					pwon = false
					
					set_cvar_string("sv_password", "")
					
					client_print(0, print_chat, "[%s] Parola serverului a fost scoasa automat", TAG)
				}
				
				if(user_can_speak == false)
				{
					user_can_speak = true
					
					client_print(0, print_chat, "[%s] Canalul SAY a fost deblocat automat", TAG)
				}
				
				set_cvar_string("sv_restart", "1")
				set_cvar_string("mp_friendlyfire", "0")
				set_cvar_string("mp_freezetime", "0")
				set_cvar_string("mp_startmoney", "800")
			}
		}
	}
}

public client_disconnect(id)
{
	if(demo_on[id] == true)
	{
		demo_on[id] = false
	}
}

[/code]


Nume: Advanced Mix System
Versiune: 1.1
Autor: EpsiloN
Link oficial: Aici
Link download: Aici

Instalare:
1. Fișierul advanced_mix_system.sma îl puneti în addons/amxmodx/scripting
2. Fișierul advanced_mix_system.amxx îl puneti in addons/amxmodx/plugins
3. Intrati în fisierul addons/amxmodx/configs/plugins.ini și adăugati la urma:

Code: Select all

advanced_mix_system.amxx
Cvar-uri (se adaugă în fisierul amxmodx\configs\amxx.cfg):
- Nu are


Comenzi administrative (se tastează în consola și trebuie să fiți administrator):
say /mix - Deschide meniul cu comenzi pentru mix
say /pass <parolă> - Pune parolă serverului
say /nopass - Scoate parola serverului
say /say off - Blochează canalul SAY
say /say on - Deblochează canalul SAY
say /setari - Forțează setări jucătorilor (ex: ex_interp 0.01, cl_updaterate 101, cl_cmdrate 101 etc)


Comenzi publice (se tastează în joc prin apasarea tastei Y):
say /scor - Afișează scorul (doar dacă mix-ul este pornit)


Module necesare (se şterge ";" din faţa modulului de mai jos; acestea le găsiţi în fişierul amxmodx\configs\modules.ini):
- cstrike


Imagini:
- Vă las să descoperiți singuri :) ;)
Last edited by EpsiloN on 30 Jan 2016, 12:16, edited 3 times in total.
RoyalServer 2
M. GOMEZ
Membru, skill 0
Membru, skill 0
Posts: 63
Joined: 23 Jul 2014, 15:39
Detinator Steam: Da
CS Status: Bayern München leben
Fond eXtream: 0
Location: Berlin
Been thanked: 4 times
Contact:

24 Jul 2014, 10:42

Este foarte ok, se mai pot adauga 1-2 pluginuri (unul de interp si unul pentru a inregistra demo atuomat unui player)
Vezi ca linkul de download nu merge, adica nu e deloc.
User avatar
THEKING.
Manager CS
Manager CS
Posts: 3339
Joined: 21 Apr 2012, 17:24
Detinator Steam: Da
CS Status: Away
Detinator server CS: cs.extreamcs.com
SteamID: divinsx
Reputatie: Fost super moderator
Manager CS
Nume anterior: CLAU.
1/3
Location: Romania
Has thanked: 84 times
Been thanked: 74 times

24 Jul 2014, 10:46

M. GOMEZ wrote:Este foarte ok, se mai pot adauga 1-2 pluginuri (unul de interp si unul pentru a inregistra demo atuomat unui player)
Vezi ca linkul de download nu merge, adica nu e deloc.
Ai SURSA pusa uita-te mai bine.
User avatar
EpsiloN
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 16 Sep 2013, 19:42
Detinator Steam: Da
CS Status: OnLine
Detinator server CS: EpsiloN's Server
SteamID: godskilled
Location: Brăila
Has thanked: 72 times
Been thanked: 5 times
Contact:

24 Jul 2014, 13:46

La următorul update (curând) îi voi pune şi comanda /demo
Cât despre interp, comamda /setari ii schimba ex_interp la 0.01 (în caz că n-ai observat în descriere)

Vă mulţumesc foarte mult pentru păreri, mă bucur că vă place şi să-l folosiţi cu plăcere
User avatar
EpsiloN
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 16 Sep 2013, 19:42
Detinator Steam: Da
CS Status: OnLine
Detinator server CS: EpsiloN's Server
SteamID: godskilled
Location: Brăila
Has thanked: 72 times
Been thanked: 5 times
Contact:

30 Jul 2014, 23:24

Update la versiunea 1.1 (am modificat in primul post)

Modificări
:

- Am inlăturat comanda /info (părea cam inutilă)
- Am schimbat comenzile /blocare și /deblocare în /say off și /say on
- Am adaugat comenzile /demo <nume sau #userid> și /stopdemo <nume sau #userid>
danstefan1996
Membru, skill 0
Membru, skill 0
Posts: 6
Joined: 08 Oct 2015, 18:10
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Jan 2016, 11:14

Link upload ?
User avatar
EpsiloN
Membru, skill 0
Membru, skill 0
Posts: 88
Joined: 16 Sep 2013, 19:42
Detinator Steam: Da
CS Status: OnLine
Detinator server CS: EpsiloN's Server
SteamID: godskilled
Location: Brăila
Has thanked: 72 times
Been thanked: 5 times
Contact:

30 Jan 2016, 11:49

danstefan1996 wrote:Link upload ?
Despre ce vorbesti?
Nu am pus nici un link nicaieri.
Codul sursa este in primul post.
O sa editez post-ul si voi pune o arhiva cu tot cu plugin-ul compilat pentru cei care nu pot sau nu stiu sau le este lene sa compileze sursa.

EDIT: Am editat primul post si am pus link de download.
User avatar
CAHULMD
Membru, skill 0
Membru, skill 0
Posts: 41
Joined: 27 Sep 2015, 11:27
Detinator Steam: Da
SteamID: STEAM_0:0:857918
Fond eXtream: 0
Location: MD, or. Cahul
Contact:

03 Mar 2016, 17:35

Poti sa mai adaugi comenzi din chat in acest plugin:
/spec <nume> - treansera jucator la SPEC's
/t <nume> - treansera jucator la T's
/ct <nume> - treansera jucator la CT's

+
/knife - incepe runda de lame
/map <denumirea> - scvhimba mapa ex: /map de_dust2
User avatar
Lally
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 27 Jan 2016, 20:24
Detinator Steam: Da
Fond eXtream: 0

16 Sep 2016, 20:11

Wow! Omule esti o comoara dar daca ai pune si un plugin sau sa adaugi un scos la vedere care sa nu se reseteze daca dai restart la runda sau cand schimbi echipele sa se schimbe si scorul.
Ar fi ceva bestial
User avatar
CAHULMD
Membru, skill 0
Membru, skill 0
Posts: 41
Joined: 27 Sep 2015, 11:27
Detinator Steam: Da
SteamID: STEAM_0:0:857918
Fond eXtream: 0
Location: MD, or. Cahul
Contact:

15 Feb 2017, 18:45

Am incercat plugin si nu e bun. Fiecare jucator are acces.
User avatar
alexz24
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 06 Oct 2016, 16:43
Detinator Steam: Da
CS Status: a-mix.ro
Detinator server CS: DA
SteamID: ---
Fond eXtream: 0
Has thanked: 1 time
Contact:

22 Feb 2017, 23:59

:') Doamne acest addons nu e g-mix este putin din el mesajele in chat sunt la fel vad :thinking:

:') Sa vedem poti sa bagi si hltv pe le :stuck_out_tongue_winking_eye:
My steam :hand_over_mouth:
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests