OldMix

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
EDwardddd.
Membru, skill +2
Membru, skill +2
Posts: 810
Joined: 18 Jun 2010, 09:30
Detinator Steam: Da
SteamID: edwarddwd
Reputatie: Membru Club eXtreamCS (trei luni)
Fost Moderator ajutator
Nume anterioare: Elk, eDward /R/
Has thanked: 16 times
Been thanked: 49 times

17 Aug 2015, 08:51

Descriere: Plugin folosit pentru serverele de MIX-uri

Descarcare:
- GirlShare
- Pastebin
sursa plugin | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <regex>
#include <cstrike>
#include <colorchat>
#include <hamsandwich>

#define SEMI_ACE 4
#define MAX_PLAYERS 32
#define MAXINPUT 7
#define SANITARY "abcdefg"
#define LAST_MAPS_SAVE 3
#define MAX_NAME_LENGTH 32
#define MAX_TEXT_LENGTH 192
new bool:g_restart_attempt[MAX_PLAYERS + 1]
new amx_show_activity
new hitbox_bit
new g_max_players, g_sync_creat_statustext, g_sync_creat_list
new bool:g_teammate[33]
new cvar_plugin_on
new cvar_status_on
new szName[ 32 ];


static const

TAG[ ] =		"[MIX]"


new teamA = 0
new teamA1 = 0
new teamB = 0
new teamB1 = 0
new mixon = 0
new schimbate = 0
new roundnumber = 0
new Atsround
new adminId
new bool:g_bUsersCanChat = true;
new maxscreens
new screeninterval
new design;
new player
new ip[32]
new finish
new g_iFrags[33]
new iForward
new gSaveFile[64];
new gLastMapName[LAST_MAPS_SAVE][32];
new gLastMapTime[LAST_MAPS_SAVE];
new gNumLastMaps;
new authid[32]
new name[32]




public plugin_init()
{
	/// Setarile
	register_clcmd("say .setari", "setari", ADMIN_KICK)
	register_clcmd("say !setari", "setari", ADMIN_KICK)
	register_clcmd("say /setari", "setari", ADMIN_KICK)
	register_clcmd("say_team .setari", "setari", ADMIN_KICK)
	register_clcmd("say_team !setari", "setari", ADMIN_KICK)
	register_clcmd("say_team /setari", "setari", ADMIN_KICK)
	
	/// cvar_result_func	
	register_clcmd "say .setari", "cvar_result_func", ADMIN_KICK
	
	/// Demo
	register_concmd("amx_demo","demo",ADMIN_BAN,"<name> - takes a demo of a client")
	register_concmd("amx_stopdemo","stopdemo",ADMIN_BAN,"<name> - stops the demo taken")
	
	// Warm
	register_clcmd("say !warm", "warm", ADMIN_KICK)
	register_clcmd("say .warm", "warm", ADMIN_KICK)
	register_clcmd("say /warm", "warm", ADMIN_KICK)
	register_clcmd("say_team /warm", "warm", ADMIN_KICK)
	register_clcmd("say_team !warm", "warm", ADMIN_KICK)
	register_clcmd("say_team .warm", "warm", ADMIN_KICK)
	
	
	/// PRELUNGIRI
	register_clcmd("say !prelungiri", "prelungiri", ADMIN_KICK)
	register_clcmd("say .prelungiri", "prelungiri", ADMIN_KICK)
	register_clcmd("say /prelungiri", "prelungiri", ADMIN_KICK)
	register_clcmd("say .extra", "prelungiri", ADMIN_KICK)
	register_clcmd("say /extra", "prelungiri", ADMIN_KICK)
	register_clcmd("say !extra", "prelungiri", ADMIN_KICK)
	register_clcmd("say_team /extra", "prelungiri", ADMIN_KICK)
	register_clcmd("say_team !extra", "prelungiri", ADMIN_KICK)
	register_clcmd("say_team .extra", "prelungiri", ADMIN_KICK)
	register_clcmd("say_team !prelugniri", "prelungiri", ADMIN_KICK)
	register_clcmd("say_team /prelungiri", "prelungiri", ADMIN_KICK)
	register_clcmd("say_team .prelungiri", "prelungiri", ADMIN_KICK)
	
	
	
	/// RESTART
	register_clcmd("say .rr", "restart", ADMIN_KICK)
	register_clcmd("say /rr", "restart", ADMIN_KICK)
	register_clcmd("say !rr", "restart", ADMIN_KICK)
	register_clcmd("say /restart", "restart", ADMIN_KICK)
	register_clcmd("say !restart", "restart", ADMIN_KICK)
	register_clcmd("say .restart", "restart", ADMIN_KICK)
	register_clcmd("say_team /rr", "restart", ADMIN_KICK)
	register_clcmd("say_team !rr", "restart", ADMIN_KICK)
	register_clcmd("say_team .rr", "restart", ADMIN_KICK)
	
	
	/// KNIFE
	register_clcmd("say /knife", "knife", ADMIN_KICK)
	register_clcmd("say !knife", "knife", ADMIN_KICK)
	register_clcmd("say .knife", "knife", ADMIN_KICK)
	register_clcmd("say /cutite", "knife", ADMIN_KICK)
	register_clcmd("say !cutite", "knife", ADMIN_KICK)
	register_clcmd("say .cutite", "knife", ADMIN_KICK)
	register_clcmd("say_team .knife", "knife", ADMIN_KICK)
	register_clcmd("say_team /knfie", "knife", ADMIN_KICK)
	register_clcmd("say_team !knife", "knife", ADMIN_KICK)
	register_clcmd("say_team .cutite", "knife", ADMIN_KICK)
	register_clcmd("say_team !cutite", "knife", ADMIN_KICK)
	register_clcmd("say_team /cutite", "knife", ADMIN_KICK)
	
	
	/// blocare
	register_clcmd( "say .blocare", "ClCmdSayBlocare" );
	register_clcmd( "say /off", "ClCmdSayBlocare" );
	register_clcmd( "say /blocare", "ClCmdSayBlocare" );
	register_clcmd( "say .deblocare", "ClCmdSayDeBlocare" );
	register_clcmd( "say /on", "ClCmdSayDeBlocare" );
	register_clcmd( "say !blocare", "ClCmdSayBlocare" );
	register_clcmd( "say !deblocare", "ClCmdSayDeBlocare" );
	register_clcmd( "say /deblocare", "ClCmdSayDeBlocare" );
	register_clcmd( "say_team /on", "ClCmdSayDeBlocare" );
	register_clcmd( "say_team !on", "ClCmdSayDeBlocare" );
	register_clcmd( "say_team !off", "ClCmdSayDeBlocare" );
	register_clcmd( "say_team /off", "ClCmdSayDeBlocare" );
	register_clcmd( "say", "ClCmdSay" );
	
	///Ss
	register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>")
	register_clcmd("say /ip", "show_ip")
	maxscreens = register_cvar("amx_ss_max", "5")
	screeninterval = register_cvar("amx_ss_interval", "1.0")
	design = register_cvar("amx_ss_design", "3")
	
	
	/// Hitbox
	register_event("ResetHUD", "event_hud_reset", "be")
	register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")
	register_clcmd("fullupdate", "clcmd_fullupdate") 
	register_concmd("amx_hsonly", "admin_set_hitbox", ADMIN_KICK, "<0|a|b|c|d|e|f|g> - Set hitboxes. Letters equal the body part, can combine letters.")
	hitbox_bit = register_cvar("hitbox_bit", "255")
	amx_show_activity = get_cvar_pointer("amx_show_activity")
	
	
	
	// Start Mix
	register_clcmd("say !live", "startmix", ADMIN_KICK)
	register_clcmd("say .live", "startmix", ADMIN_KICK)
	register_clcmd("say /live", "startmix", ADMIN_KICK)
	register_clcmd("say !start", "startmix", ADMIN_KICK)
	register_clcmd("say .start", "startmix", ADMIN_KICK)
	register_clcmd("say /start", "startmix", ADMIN_KICK)
	register_clcmd("say !startmix", "startmix", ADMIN_KICK)
	register_clcmd("say .startmix", "startmix", ADMIN_KICK)
	register_clcmd("say /startmix", "startmix", ADMIN_KICK)
	register_clcmd("say_team /start", "startmix", ADMIN_KICK)
	register_clcmd("say_team !start", "startmix", ADMIN_KICK)
	
	
	
	
	
	
	
	/// STOP MIX
	register_clcmd("say !stop", "stopmix", ADMIN_KICK)
	register_clcmd("say .stop", "stopmix", ADMIN_KICK)
	register_clcmd("say /stop", "stopmix", ADMIN_KICK)
	register_clcmd("say !stopmix", "stopmix", ADMIN_KICK)
	register_clcmd("say .stopmix", "stopmix", ADMIN_KICK)
	register_clcmd("say /stopmix", "stopmix", ADMIN_KICK)
	register_clcmd("say_team /stop", "stopmix", ADMIN_KICK)
	register_clcmd("say_team !stop", "stopmix", ADMIN_KICK)
	register_clcmd("say_team .stop", "stopmix", ADMIN_KICK)
	
	
	
	//Autoswitch teams
	register_logevent( "roundend", 2, "1=Round_End" );
	register_event( "TextMsg","restart","a","2&#Game_C", "2&#Game_W" ); // Event for "Game Commencing" TextMsg and "Game Will Restart in X Seconds" TextMsg
	
	Atsround = register_cvar( "amx_atsrounds", "15" );
	
	
	
	
	// Score
	register_clcmd("say !score", "scor", ADMIN_KICK)
	register_clcmd("say .score", "scor", ADMIN_KICK)
	register_clcmd("say /score", "scor", ADMIN_KICK)
	register_clcmd("say_team !score", "scor", ADMIN_KICK)
	register_clcmd("say_team .score", "scor", ADMIN_KICK)
	register_clcmd("say_team /score", "scor", ADMIN_KICK)
	
	/// Interp
	register_clcmd("say !interp", "interp", ADMIN_KICK)
	register_clcmd("say .interp", "interp", ADMIN_KICK)
	register_clcmd("say /interp", "interp", ADMIN_KICK)
	register_clcmd("say_team /interp", "interp", ADMIN_KICK)
	register_clcmd("say_team !interp", "interp", ADMIN_KICK)
	register_clcmd("say_team .interp", "interp", ADMIN_KICK)
	
	
	register_event("HLTV", "new_round", "a", "1=0", "2=0")  
	register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
	register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")  
	
	
	/// comenzi
	register_clcmd("say comenzi", "comenzi", ADMIN_KICK)
	register_clcmd("say !comenzi", "comenzi", ADMIN_KICK)
	register_clcmd("say /comenzi", "comenzi", ADMIN_KICK)
	register_clcmd("say_team /comenzi", "comenzi", ADMIN_KICK)
	register_clcmd("say_team !comenzi", "comenzi", ADMIN_KICK)
	register_clcmd("say_team .comenzi", "comenzi", ADMIN_KICK)
	
	
	
	//// ACE
	
	register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
	register_event( "DeathMsg", "EventDeathMsg", "a" );
	
	register_logevent( "LogEventRoundEnd", 2, "1=Round_End" );
	
	iForward  = CreateMultiForward( "FwdPlayerDidAceOrSemi", ET_STOP, FP_CELL, FP_CELL );
	
	//// TEAM MONEY
	
	
	RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
	
	register_clcmd("say /money", "clcmd_money")
	register_clcmd("say !money", "clcmd_money")
	register_clcmd("say /bani", "clcmd_money")
	register_clcmd("say !bani", "clcmd_money")
	
	register_event("StatusValue", "show_teammate_money", "be", "1=2", "2!0")
	register_event("StatusValue", "set_team", "be", "1=1")
	
	cvar_plugin_on = register_cvar("stm_on", "1")
	cvar_status_on = register_cvar("stm_st_on", "1")
	
	g_max_players = get_maxplayers()
	g_sync_creat_statustext = CreateHudSyncObj()
	g_sync_creat_list = CreateHudSyncObj()
	
	////////////Specall
	register_concmd("amx_ct", "cmdct", ADMIN_SLAY, "NUME : Transfera jucatorul la echipa Counter/Terror");
	register_concmd("amx_t", "cmdt", ADMIN_SLAY, "NUME : Transfera jucatorul la echipa Terror");
	register_concmd("amx_spec", "cmdspec", ADMIN_SLAY, "NUME : Transfera jucatorul la Spectator");
	register_clcmd("say .specall", "cmd_spec", ADMIN_KICK, "All players spec");
	register_clcmd("say /specall", "cmd_spec", ADMIN_KICK, "All players spec");
	register_clcmd("say !specall", "cmd_spec", ADMIN_KICK, "All players spec");
	
	
	
	////// amx chat
	register_clcmd("say","admin_slash",0,"say /command < params >")
	register_clcmd("say_team","admin_slash",0,"say /command < params >")
	
	/////PASS SI NOPASS
	register_concmd("amx_pass", "pass", ADMIN_BAN, "- Sets a server password")
	register_concmd("amx_password", "pass", ADMIN_BAN, "- Sets a server password")
	register_concmd("amx_parola", "pass", ADMIN_BAN, "- Sets a server password")
	register_concmd("amx_nopass", "nopass", ADMIN_BAN, "- Removes the server password")
	register_concmd("amx_removepassword", "nopass", ADMIN_BAN, "- Removes the server password")
	
	
	
	/////HARTI
	register_clcmd("say /last", "CmdLastMaps");
	register_clcmd("say !last", "CmdLastMaps");
	register_clcmd("say /harti", "CmdLastMaps");
	register_clcmd("say !harti", "CmdLastMaps");
	
	get_datadir(gSaveFile, charsmax(gSaveFile));
	add(gSaveFile, charsmax(gSaveFile), "lastmaps.txt");
	
	new f = fopen(gSaveFile, "rt");
	
	if(f) {
		new line[64], minutes[12];
		
		while(!feof(f) && gNumLastMaps < LAST_MAPS_SAVE) {
			fgets(f, line, charsmax(line));
			trim(line);
			
			if(line[0]) {
				parse(line, gLastMapName[gNumLastMaps], charsmax(gLastMapName[]), minutes, charsmax(minutes));
				gLastMapTime[gNumLastMaps++] = str_to_num(minutes);
			}
		}
		
		fclose(f);
	}
	
	
}


public t_win() {
	if ( schimbate == 0 ) {
		teamA = teamA+1
	}
	else {
		teamB = teamB +1	
	}
}

public ct_win() {
	if ( schimbate == 0 ) {
		teamB  = teamB +1
	}
	else {
		teamA = teamA +1
	}
	
}

public new_round(){
	if ( mixon == 1)
	{
		if (schimbate == 0) {
			
			if ( teamA > teamB ) {
				
				ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d pentru echipa T", teamA,teamB );
			}
			if ( teamB > teamA ) {
				ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d pentru CT", teamB ,teamA);
			}
			if ( teamB == teamA ) {
				ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d (egalitate)", teamB ,teamA);
			}	
		}
		
		if ( schimbate == 1 )
		{			
			if ( teamA == 16 || teamB == 16) {
				if ( teamA > teamB ) {
					
					ColorChat(0, RED, "[MIX]^x01 Mix-ul a fost castigat de echipa ^x04 CT");
					ColorChat(0, RED, "[MIX]^x01 Scorul fiind: ^x04 %d - %d ",teamA, teamB);
					ColorChat(0, RED, "[MIX]^x01 Tasteaza !harti in chat pentru a vedea ultimele 3 harti jucate.",teamA, teamB);
					
					
					
					mixon = 0
					schimbate = 0
					set_cvar_string ( "sv_restart", "1" );
				}
				
				if ( teamB > teamA ) {
					ColorChat(0, RED, "[MIX]^x01 Mix-ul a fost castigat de echipa ^x04 T");
					ColorChat(0, RED, "[MIX]^x01 Scorul fiind: ^x04 %d - %d ",teamB,teamA);
					ColorChat(0, RED, "[MIX]^x01 Tasteaza !harti in chat pentru a vedea ultimele 3 harti jucate.",teamA, teamB);
					
					
					
					mixon = 0
					schimbate = 0
					set_cvar_string ( "sv_restart", "1" );
					set_cvar_string ( "mp_freezetime", "0");
					set_cvar_string ( "mp_startmoney", "16000");
				}
				} else {
				if ( teamA > teamB ) {
					ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d pentru CT",teamA,teamB );
				}
				if ( teamB > teamA ) {
					ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d pentru T",teamB ,teamA);
				}
				if ( teamB == teamA ) {
					ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d (egalitate)",teamB ,teamA);
				}
			}
			
		}
	}
}


public client_disconnect(id){
	if (get_playersnum() == 0)
		set_cvar_string("sv_password", "");
}

public warm(id){
	
	
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
		
		return PLUGIN_HANDLED
	}
	else {
		
		
		
		set_cvar_string ( "sv_restart", "2" );
		set_cvar_string ( "mp_freezetime", "0" );
		set_cvar_string ( "mp_startmoney", "16000" );
		set_cvar_string ( "mp_friendlyfire", "0" );
		set_cvar_string ( "amx_atsrounds", "100" );
		
		
		mixon = 0;
		schimbate = 0;
		teamA = 0
		teamB = 0
		teamA1 = 0
		teamB1= 0
		roundnumber = 0
		
		
		get_user_name( id, szName, sizeof ( szName ) -1 );
		ColorChat(0, RED, "[!warm]^x01Rundele de incalzire au fost pornite. -^x04%s^x01 ", szName );
		
		
		
		
		
		
	}
	return PLUGIN_HANDLED
}

public stopmix(id){
	
	
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
		
		return PLUGIN_HANDLED
	}
	else {
		
		
		
		set_cvar_string ( "sv_restart", "1" );
		set_cvar_string ( "mp_freezetime", "0" );
		set_cvar_string ( "mp_startmoney", "16000" );
		set_cvar_string ( "mp_friendlyfire", "0" );
		set_cvar_string ( "amx_atsrounds", "100" );
		
		
		mixon = 0;
		schimbate = 0;
		teamA = 0
		teamB = 0
		teamA1 = 0
		teamB1= 0
		roundnumber = 0
		
		get_user_name( id, szName, sizeof ( szName ) -1 );		
		ColorChat(0, RED, "[!stop]^x01 Mix-ul a fost oprit. -^x04%s^x01", szName );
		
		
		
		
		
		
	}
	return PLUGIN_HANDLED
}

public prelungiri(id){
	
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
		
		return PLUGIN_HANDLED
	}
	else {
		
		
		
		set_cvar_string ( "sv_restart", "5" );
		set_cvar_string ( "mp_freezetime", "8" );
		set_cvar_string ( "mp_startmoney", "10000" );
		set_cvar_string ( "mp_friendlyfire", "1" );
		set_cvar_string ( "amx_atsrounds", "3" );
		
		
		mixon = 1;
		if (schimbate == 0) 
		{
			teamA = teamA1
			teamB = teamB1
			roundnumber = 0
			} else {
			schimbate = 0;
			teamA = 0
			teamB = 0
			teamA1 = 0
			teamB1= 0
			roundnumber = 0
		}
		
		
		get_user_name( id, szName, sizeof ( szName ) -1 );		
		ColorChat(0, RED, "[!prelungiri]^x01 Prelungirile vor porni in 5 secunde. -^x04%s^x01 ", szName );
	}
	return PLUGIN_HANDLED
}




public restart( id ){
	
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Tasteaza !comenzi in chat pentru mai multe informatii!")
		
		roundnumber = 0;
		return PLUGIN_HANDLED
	}
	else {
		set_cvar_string ( "sv_restart", "1" );
		mixon = 1;
		if (schimbate == 1) 
		{
			teamA = teamA1
			teamB = teamB1
			roundnumber = 0
			} else {
			schimbate = 0;
			teamA = 0
			teamB = 0
			teamA1 = 0
			teamB1= 0
			roundnumber = 0
		}
		
	}
	return PLUGIN_HANDLED
}

public knife(id){
	
	
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")	
		
		return PLUGIN_HANDLED
	}
	else {
		
		
		
		set_cvar_string ( "sv_restart", "2" );
		set_cvar_string ( "mp_freezetime", "0" );
		set_cvar_string ( "mp_startmoney", "16000" );
		set_cvar_string ( "mp_friendlyfire", "0" );
		set_cvar_string ( "amx_atsrounds", "100" );
		
		
		mixon = 0;
		schimbate = 0;
		teamA = 0
		teamB = 0
		teamA1 = 0
		teamB1= 0
		roundnumber = 0
		
		get_user_name( id, szName, sizeof ( szName ) -1 );		
		ColorChat(0, RED, "[!knife]^x01 Rundele de cutite au fost pornite. -^x04%s^x01 ", szName );
		
		
		
		
		
		
	}
	return PLUGIN_HANDLED
}

public startmix(id){
	
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
		
		
		return PLUGIN_HANDLED
	}
	else {
		
		
		set_cvar_string ( "sv_restart", "5" );
		set_cvar_string ( "mp_freezetime", "9" );
		set_cvar_string ( "mp_startmoney", "800" );
		set_cvar_string ( "mp_friendlyfire", "1" );
		set_cvar_string ( "mp_roundtime", "1.75" );
		set_cvar_string ( "mp_timelimit", "0" );
		set_cvar_string ( "mp_forchasecam", "2" );
		set_cvar_string ( "mp_buytime", "1.5" );
		set_cvar_string ( "mp_c4timer", "35" );
		set_cvar_string ( "amx_atsrounds", "15" );
		
		
		
		
		
		mixon = 1;
		if (schimbate == 1) 
		{
			teamA = teamA1
			teamB = teamB1
			roundnumber = 0
			} else {
			schimbate = 0;
			teamA = 0
			teamB = 0
			teamA1 = 0
			teamB1= 0
			roundnumber = 0
		}
		
		
		get_user_name( id, szName, sizeof ( szName ) -1 );		
		ColorChat(0, RED, "[!start]^x01 Mix-ul va porni in 5 secunde. -^x04%s^x01 ", szName );
		
		
		
		
	}
	return PLUGIN_HANDLED
}

public interp(id){
	
	if(!is_user_admin(id) && ADMIN_BAN)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru a avea acces la aceasta comanda.")
		
		
		return PLUGIN_HANDLED
		} else {
		client_cmd(0, "ex_interp 0.01");
		client_cmd(0, "rate 25000");
		client_cmd(0, "cl_updaterate 101");
		client_cmd(0, "cl_cmdrate 101");
		client_cmd(0, "fps_max 101");
		
		ColorChat(0,RED, "[!interp] ^x01S-a setat interp-ul. Jucatorii pot verifica tastand !setari in chat (consola)")
		
	}
	return PLUGIN_HANDLED
}

public roundend()
{
	roundnumber++;
	
	if (schimbate == 1 && roundnumber == 31)
	{
		ColorChat(0, RED, "[MIX] ^x01Echipele au reusit sa aduca scorul la egal ^x04 15 - 15 ");
		
		
		mixon = 0
		schimbate = 0
		set_cvar_string ( "sv_restart", "1" );
	}
	else if( roundnumber >= get_pcvar_num( Atsround ) )
	{
		new players[32], num;
		get_players( players, num );
		
		for( new i; i < num; i++ )
			add_delay( players ); // Prevent Server Crash with a lot of people.
		
	}
}

add_delay( id )
{
switch( id )
{
	case 1..7: set_task( 0.1, "changeTeam", id );
		case 8..15: set_task( 0.2, "changeTeam", id );
			case 16..23: set_task( 0.3, "changeTeam", id );
			case 24..32: set_task( 0.4, "changeTeam", id );
		}
}

public changeTeam( id )
{
	switch( cs_get_user_team( id ) )
	{
		case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );
			
		case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT );
		}
	
	roundnumber = 0;
	schimbate = 1
	teamA1 = teamA
	teamB1 = teamB
	
	ColorChat(0, RED, "[!comenzi] ^x01 Echipele s-au schimbat intre ele ");
	set_cvar_string ( "sv_restart", "1" );
	
}




public scor(id){
	
	if ( mixon == 1 )
	{
		if (schimbate == 0) {
			
			if ( teamA > teamB ) {
				ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04 T",teamA,teamB );
			}
			if ( teamB > teamA ) {
				ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04 CT",teamB ,teamA);
			}
			if ( teamB == teamA ) {
				ColorChat(id, RED, "^x03 Scorul este %d - %d ^x04 (EGAL)",teamB ,teamA);
			}	
			} else {
			if ( teamA > teamB ) {
				ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04CT",teamA,teamB );
			}
			if ( teamB > teamA ) {
				ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04T",teamB ,teamA);
			}
			if ( teamB == teamA ) {
				ColorChat(id, RED, "^x03 Scorul este %d - %d ^x04 (EGAL)",teamB ,teamA);
			}
		}
	}
	else
	{
		ColorChat(id,RED, "[!comenzi] ^x01 Momentan nu ruleaza niciun mix. Un admin va scrie !start pentru pornire.")
	}
	
	return PLUGIN_HANDLED
}

public clcmd_fullupdate() {
	return PLUGIN_HANDLED
}
public event_restart_attempt(){
	new players[32], num
	get_players(players, num, "a")
	for ( new i; i < num; ++i )
		g_restart_attempt[players] = true
}
public event_hud_reset(id){
	if (g_restart_attempt[id]) {
		g_restart_attempt[id] = false
		return
	}
	set_properties(id)
}
public set_properties(id){ 
	set_user_hitzones(0, 0, get_pcvar_num(hitbox_bit))
}
public admin_set_hitbox(id, level, cid){
	new flags[MAXINPUT+1], name[32], error[128], result_code, bit = 1
	if ( !cmd_access(id, level, cid, 2) )
		return PLUGIN_HANDLED 
	read_argv(1, flags, MAXINPUT)
	strtolower(flags)
	new Regex:re = regex_match(flags, "0", result_code, error, 127)
	if (re >= REGEX_OK) { //This if/else will detect strange syntax, even if it doesn't need to
		regex_free(re)
		if (flags[0] == '0') {
			if (flags[1] == '^0'){
				bit = 0;
				} else {
				bit = 0; //they have a 0 followed by unnecessary characters
			}
			} else{
			bit =  1 // there is a 0 mixed in with other characters
		}
		} else {
		new buf[2] = {0,0}
		for (new i = 0; i<MAXINPUT; i++){ 
			buf[0] = flags;
			re = regex_match(SANITARY, buf[0], result_code, error, 127)
			if (re >= REGEX_OK){
				regex_free(re)
				} else {
				flags = 0 //They have weird characters in here
			}
		}
	}
	if (bit) {
		new buf2[2] = {97,0} //97 = a.
		for (new j = 2; j <= 128; j*=2, buf2[0]++){
			re = regex_match(flags, buf2, result_code, error, 127)
			if (re >= REGEX_OK){
				regex_free(re)
				bit += j
			}
		}
	}
	if (bit == 1){
		//They didn't type any valid flags at all
	}
	set_pcvar_num(hitbox_bit, bit)
	get_user_name(id, name, 31)
	switch ( get_pcvar_num(amx_show_activity) ){
		case 2:	ColorChat(0, RED, "[OLD!]  ^x01 Admin-ul ^x04 %s ^x01 a pornit/oprit modul HS ONLY ", name)
			
	}
	set_properties(0)
	log_amx("[AMXX] ADMIN %s: set hitboxes to %d", name, bit)
	return PLUGIN_HANDLED
}

public concmd_screen(id, level, cid)
{
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		return PLUGIN_HANDLED
	}
	
	new arg1[24], arg2[4]
	read_argv(1, arg1, 23)
	read_argv(2, arg2, 3)
	
	new screens = str_to_num(arg2)
	new maxss = get_pcvar_num(maxscreens)
	
	if(screens > maxss)   //too many ss?
	{
		console_print(id, "Ai depasit limita pozelor.")
		
		return PLUGIN_HANDLED
	}
	
	player = cmd_target(id, arg1, 1) 
	if (!player)   //the player has exited the sv or he didnt existed
	{
		return PLUGIN_HANDLED
	}
	finish = screens
	
	new Float:interval = get_pcvar_float(screeninterval)	//a set_task for each "amx_ss nickname nr_of_ss"
	new array[2]
	array[0] = id //save usefull data in a vector so it can be reused
	array[1] = player
	set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)
	
	return PLUGIN_HANDLED
}

public ss_propriuzis(array[2])
{
	//take data and set them accordingly
	new player = array[1]
	new id = array[0]
	
	//save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!
	new timestamp[32], name[32], adminname[32]
	get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31)
	get_user_name(player, name, 31)
	get_user_name(id, adminname, 31)
	get_user_ip(player, ip, 31)
	
	//Clasic Design
	if(get_pcvar_num(design) == 0)
	{
		
		client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
		client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
		client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
		client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
		ColorChat(id, RED, "[SS] ^x01 Ai executat cu succes comanda amx_ss pe jucatorul ^x03 %s", name);
		client_cmd(player, "snapshot") //ss
	}
	//Doar Playerului
	else if(get_pcvar_num(design) == 1)
	{
		
	}
	//HUD Message doar Playerului
	else if(get_pcvar_num(design) == 2)
	{
		
		
	}
	//Full
	else if(get_pcvar_num(design) == 3)
	{
		ColorChat(id, RED, " ^x01 Poza executata asupra lui ^x03 %s  ^x01 de admin-ul ^x04 %s ^x01 (%s) ", name, adminname, timestamp)
		ColorChat(player, RED, " ^x01 Poza executata asupra lui ^x03 %s  ^x01 de admin-ul ^x04 %s ^x01 (%s) ", name, adminname, timestamp)
		client_cmd(player, "snapshot") //ss
		
		
	}
	console_print(id, "%s 's ip-ul este %s!",name,ip)
	console_print(id, "%s 's ip-ul este %s!",name,ip)
	console_print(id, "%s 's ip-ul este %s!",name,ip)
	finish = finish - 1;
	
	if(finish == 0)
	{
		
		
	}
	
	return PLUGIN_CONTINUE;
}

public show_ip(id)
{
	console_print(id, "Ultimul IP este: %s!",ip)
}


public demo(id,level,cid){
	if(!cmd_access(id,level,cid,1))
		return 0;
	
	new cmd[32], mapname[32], name[32], time[32], name2[32]
	read_argv(1, cmd, 31);
	new player = cmd_target(id, cmd, 5);
	
	if (!player)
		return 0;
	get_time("%m/%d/%Y - %H:%M:%S",time,31)
	get_user_name(player,name,31)
	get_user_name(id,name2,31)
	get_mapname(mapname,31)
	client_cmd(player,"record %s_%s.dem",name,mapname)
	client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
	ColorChat(id, RED, "^x01 Ai pornit demo-ul jucatorului ^x03 %s. ^x01 Doar tu vezi acest mesaj.", name)
	log_amx("%s Started The Demo On %s, Time %s",name, name2,time)
	return 0;
}

public stopdemo(id,level,cid){
	if(!cmd_access(id,level,cid,1))
		return 0;
	
	new cmd[32], name[32], time[32], name2[32]
	read_argv(1, cmd, 31);
	new player = cmd_target(id, cmd, 5);
	
	if (!player)
		return 0;
	get_time("%m/%d/%Y - %H:%M:%S",time,31)
	get_user_name(player,name,31)
	get_user_name(id,name2,31)
	client_cmd(player,"stop")
	client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
	client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
	ColorChat(id, RED, "^x01 Ai oprit demo-ul jucatorului ^x03 %s. ^x01 Doar tu vezi acest mesaj.", name)
	log_amx("%s Started The Demo On %s, Time %s",name, name2,time)
	return 0;
}

public ClCmdSay( id )
{
	
	static szArgs[ 192 ];
	read_args( szArgs, sizeof ( szArgs ) -1 );
	
	if( !szArgs[ 0 ] )	return PLUGIN_CONTINUE;
	
	if( !g_bUsersCanChat )
	{
		
	}
	
	return g_bUsersCanChat ? PLUGIN_CONTINUE : PLUGIN_HANDLED;
}

public ClCmdSayBlocare( id )
{
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
		return PLUGIN_HANDLED;
	}
	
	if( !g_bUsersCanChat )
	{
		client_print(id, print_chat, "Chat-ul a fost deja blocat.")
		return PLUGIN_HANDLED;
	}
	
	new szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
	
	ColorChat(0, RED, "[!blocare] ^x01 Chat-ul a fost blocat. -^x04%s^x01", szName );
	
	g_bUsersCanChat = false;
	
	return PLUGIN_CONTINUE;
}

public ClCmdSayDeBlocare( id )
{
	if(!is_user_admin(id) && ADMIN_KICK)
	{
		client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
		return PLUGIN_HANDLED;
	}
	
	if( g_bUsersCanChat )
	{
		client_print(0, print_chat, "Chat-ul este deja deblocat.")
		return PLUGIN_HANDLED;
	}
	
	new szName[ 32 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
	
	ColorChat(0, RED, "[!deblocare] ^x01 Chat-ul a fost deblocat. -^x04%s^x01", szName );
	g_bUsersCanChat = true;
	return PLUGIN_CONTINUE;
}

public setari(id)
{
	adminId = id;
	console_print(id, "Nume     -     IP     -     SteamID     -     INTERP");
	console_print(id, " --------------------------------------------------------");
	
	new players[32], num;
	get_players(players, num);
	
	for(new i = 0 ; i < num ; i++)
	{
		
		query_client_cvar(players, "ex_interp", "cvar_result_func")
		
	}
	console_print(id, "----------------------------------------------");
	ColorChat(id, RED, "[!setari] ^x01 Deschide consola. Ordinea informatiilor: NUME-IP-STEAMID-INTERP.")
	
	return 1;
}

public cvar_result_func(playerId, const cvar[], const value[]) {
	
	new name[32];
	new ipeki[32];
	new authid[32];
	get_user_name(playerId, name, 31)
	get_user_ip(playerId, ipeki, 31, 1)
	get_user_authid(playerId, authid, 31) 
	
	console_print(adminId, "%s  -  %s   -   %s   -   %s", name, ipeki, authid, value);
	return PLUGIN_CONTINUE
}

public comenzi(id)
{
	ColorChat(id, RED, "[!comenzi] ^x01 Deschide consola pentru a vedea comenzile pentru administrare.");
	console_print(id, "Comenzile de consola ale server-ului:");
	console_print(id, "-----------------------------------------------");
	console_print(id, "amx_hsonly a (pentru a seta server-ul pe HEADSHOT ONLY)")
	console_print(id, "amx_hsonly abcdefgh (pentru a seta server-ul pe clasic)")
	console_print(id, "amx_ss OLD 1 (face poze jucatorului OLD , de la 1 la 5)")
	console_print(id, "amx_demo OLD! (porneste demo jucatorului, fara ca el sa stie)")
	console_print(id, "amx_stopdemo OLD! (opreste demo-ul jucatorului")
	console_print(id, "demo (jucatorul primeste demo, chiar daca in consola scrie ca nu exista comanda)")
	console_print(id, "amx_stopdemo OLD! (opreste demo-ul jucatorului)")
	console_print(id, "amx_spec OLD (transfera jucatorul la spectaotri)")
	console_print(id, "amx_t OLD (transfera jucatorul la teroristi)")
	console_print(id, "amx_ct OLD (transfera jucatorul la contrateroristi)")
	console_print(id, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
	console_print(id, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
	console_print(id, "Mai sus vei gasi comenzile cu prefixul amx_")
	console_print(id, "Comenzile publice ale server-ului:");
	console_print(id, "URMATOARELE COMENZI MERG SCRISE CU / . !");
	console_print(id, "EX: !start  /start   .start");
	console_print(id, "---------------------------------------------");
	console_print(id, "/specall - transfera jucatorii la spectatori ");
	console_print(id, "/live - pentru pornirea mix-ului ");
	console_print(id, "/stop - pentru oprirea mix-ului ");
	console_print(id, "/warm - pentru pornirea rundelor de incalzire");
	console_print(id, "/knife - pentru pornirea rundelor de cutite");
	console_print(id, "/money - pentru situatia financiara");
	console_print(id, "/setari- pentru afisarea interp-ului,steamid-ului si ip-ului");
	console_print(id, "/interp - pentru setarea interp-ului");
	console_print(id, "/score - pentru afisarea scorului" );
	console_print(id, "/blocare sau /off - pentru blocarea chat-ului" );
	console_print(id, "/deblocare sau /on - pentru deblocarea chat-ului")
	console_print(id, "/prleungiri pentru rundele de prelungire (scor 15-15)")
	console_print(id, "/map - pentru schimbarea hartii (/map de_dust2)" );
	console_print(id, "TOATE COMENZILE AMX SE POT FOLOSI DIRECT DE PE CHAT! EX: /ban old 0 wall")
	
	
	
	
	
	
}


public plugin_end( )
{
	DestroyForward( iForward );
}

public client_connect( id )
{
	g_iFrags[ id ] = 0;
}

public EventNewRound( )
{
	arrayset( g_iFrags, 0, sizeof g_iFrags );
}

public EventDeathMsg( )
{
	new iKiller = read_data( 1 );
	new iVictim = read_data( 2 );
	
	CheckAce( iVictim );
	
	if( !iKiller || iKiller == iVictim || cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
	{
		return PLUGIN_CONTINUE;
	}
	
	g_iFrags[ iKiller ]++;
	
	return PLUGIN_CONTINUE;
}

public LogEventRoundEnd( )
{
	new iPlayers[ 32 ], iNum, player;
	
	get_players( iPlayers, iNum, "ch" );
	
	for( new i = 0; i < iNum; i++ )
	{
		player = iPlayers[ i ];
		
		if( g_iFrags[ player ] >= SEMI_ACE )
		{
			DidAceOrSemi( player );
			
			if( g_iFrags[ player ] == SEMI_ACE + 1 )
			{
				return PLUGIN_CONTINUE;
			}
		}
	}
	
	return PLUGIN_CONTINUE;
}

public CheckAce( id )
{
	if( g_iFrags[ id ] >= SEMI_ACE )
	{
		DidAceOrSemi( id );
	}
	
	g_iFrags[ id ] = 0;
}

public DidAceOrSemi( id )
{
	new iReturn = PLUGIN_CONTINUE;
	
	ExecuteForward( iForward, iReturn, id, g_iFrags[ id ] );
	
	if( iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
	{
		return PLUGIN_HANDLED;
	}
	
	new szName[ 32 ];
	
	get_user_name( id, szName, sizeof szName - 1 );
	
	ColorChat( 0, GREEN, "%s^x03 %s^x01 a realizat un a%s ^x03%sACE! ^x01 Felicitari!",
	TAG, szName, g_iFrags [ id ] == SEMI_ACE ? "" : "n", g_iFrags [ id ] == SEMI_ACE ? "SEMI-" : "" );
	
	client_cmd( 0, "spk vox/buzwarn" );
	
	return PLUGIN_HANDLED
}
public clcmd_money(client)
{
	if (!get_pcvar_num(cvar_plugin_on))
	{
		client_print(client, print_chat, "[AMXX]: Show Teammate's Money was off.")
		return PLUGIN_HANDLED
	}
	show_money(client)
	return PLUGIN_CONTINUE
}

public player_spawn(client)
{
	remove_task(client)
	if (is_user_alive(client) && get_pcvar_num(cvar_plugin_on))
	{
		set_task(1.0, "show_money", client)
	}
}

public show_money(client)
{
	static message[1024];
	static name[32];
	
	new money, id, len;
	
	len = format(message, charsmax(message), "Situatia financiara a coechipierilor:^n^n");
	for (id = 1; id <= g_max_players; id++)
	{
		if (id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
		{
			money = cs_get_user_money(id);
			get_user_name(id, name, 31);
			len += format(message[len], charsmax(message) - len, "%-22.22s: %d^n", name, money);
		}
	}
	set_hudmessage(18, 113, 255, 0.05, 0.35, 0, 0.02, 5.0, 0.1, 0.2, 2);
	ShowSyncHudMsg(client, g_sync_creat_list, message);
}

public set_team(id)
	g_teammate[id] = bool:(read_data(2) == 1);

public show_teammate_money(id)
{
	if (!get_pcvar_num(cvar_plugin_on))
		return PLUGIN_HANDLED
	if(!is_user_bot(id) && is_user_connected(id) && get_pcvar_num(cvar_status_on))
	{
		static name[32]
		
		new pid = read_data(2)
		new red = 0, blue = 0
		
		if (cs_get_user_team(pid) == CS_TEAM_T)
			red = 255
		else if(cs_get_user_team(pid) == CS_TEAM_CT)
			blue = 255
		
		get_user_name(pid, name, charsmax(name))
		new money = cs_get_user_money(pid)
		if (g_teammate[id])
		{
			set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8)
			ShowSyncHudMsg(id, g_sync_creat_statustext, "Friend:%s -- Money:%d", name, money)
		}
		else {
			set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8)
			ShowSyncHudMsg(id, g_sync_creat_statustext, "Enemy:%s", name)
		}
	}
	return PLUGIN_CONTINUE
}

public client_disconnect2(client){
	
	remove_task(client)
}


public cmdct(id, level, cid)
{ 
	if (!cmd_access(id, level, cid, 2))
	{
		return PLUGIN_HANDLED;
	}
	
	new arg[32], cmd[32];
	read_argv(0,cmd,31);
	read_argv(1,arg,31);
	new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);
	
	if (!player)
	{
		return PLUGIN_HANDLED;
	}
	
	if (cs_get_user_team(player) == CS_TEAM_CT)
	{
		console_print(id, "Jucatorul este deja in echipa CT");
		return PLUGIN_HANDLED;
	}
	
	new name[32], name2[32];
	get_user_name(id,name,31);
	get_user_name(player,name2, 31);
	
	if (is_user_alive (player) )
	{
		user_silentkill(player);
	}
	
	cs_set_user_team(player,CS_TEAM_CT);
	log_amx("Admin %s: Task amx_ct/t %s",name, name2);
	ColorChat(0, RED, "[/ct] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la CONTRA-TERORISTI -^x04%s", name2, name);
	
	return PLUGIN_HANDLED;
}

public cmdt(id, level, cid)
{ 
	if (!cmd_access(id, level, cid, 2))
	{
		return PLUGIN_HANDLED;
	}
	
	new arg[32], cmd[32];
	read_argv(0,cmd,31);
	read_argv(1,arg,31);
	new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);
	
	if (!player)
	{
		return PLUGIN_HANDLED;
	}
	
	if (cs_get_user_team(player) == CS_TEAM_T)
	{
		console_print(id, "Jucatorul este deja in echipa T");
		return PLUGIN_HANDLED;
	}
	
	new name[32], name2[32];
	get_user_name(id,name,31);
	get_user_name(player,name2, 31);
	
	if (is_user_alive (player) )
	{
		user_silentkill(player);
	}
	
	cs_set_user_team(player,CS_TEAM_T);
	log_amx("Admin %s: Task amx_t %s",name, name2);
	ColorChat(0, RED, "[/t] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la TERORISTI -^x04%s", name2, name);
	
	return PLUGIN_HANDLED;
}

public cmdspec(id, level, cid)
{ 
	if (!cmd_access(id, level, cid, 2))
	{
		return PLUGIN_HANDLED;
	}
	
	new arg[32], cmd[32];
	read_argv(0,cmd,31);
	read_argv(1,arg,31);
	new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);
	
	if (!player)
	{
		return PLUGIN_HANDLED;
	}
	
	if (cs_get_user_team(player) == CS_TEAM_SPECTATOR)
	{
		console_print(id, "Jucatorul este deja in spectatori");
		return PLUGIN_HANDLED;
	}
	
	new name[32], name2[32];
	get_user_name(id,name,31);
	get_user_name(player,name2, 31);
	
	if (is_user_alive (player) )
	{
		user_silentkill(player);
	}
	
	cs_set_user_team(player,CS_TEAM_SPECTATOR);
	log_amx("Admin %s: Task amx_spec %s",name, name2);
	ColorChat(0, RED, "[/spec] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la SPECTATORI -^x04%s", name2, name);
	
	return PLUGIN_HANDLED;
}

public cmd_spec (id, level, cid) {               /////////ASTA ESTE PROBLEMA PLUGIN-ULUI
	//Verificam daca are acces la comanda
	if(!cmd_access(id, level, cid, 2)) {
		//Mesajul care ii apare
		client_print(id,print_console,"Nu ai acces la aceasta comanda");
		return PLUGIN_HANDLED;
	}
	
	new arg[32], cmd[32];
	read_argv(0,cmd,31);
	read_argv(1,arg,31);
	new iPlayers[ 32 ], iNum, iPlayer
	get_players( iPlayers, iNum )
	
	for ( new a = 0; a < iNum; a++ )
	{
		iPlayer = iPlayers[ a ];
		
		switch ( cs_get_user_team( iPlayer ) )
			
	{
		case CS_TEAM_T, CS_TEAM_CT:
		{
			if(is_user_alive( iPlayer ))
			user_silentkill( iPlayer );
			cs_set_user_team( iPlayer, CS_TEAM_SPECTATOR );
			set_cvar_string ( "sv_restart", "5" );
			}
		}
	}
	
	ColorChat(0,RED,"[!specall] ^x01Jucatorii au fost transferati la spectatori pentru runda alegerilor. -^x04%s^x01 ", szName );
	return 1;
}

public admin_slash(id)
{
	new sArg[MAX_NAME_LENGTH+1]
	
	read_argv(1,sArg,MAX_NAME_LENGTH)
	
	if ( sArg[0] == '/' ) {
		
		new sCommand[MAX_TEXT_LENGTH+1]
		new sMessage[MAX_TEXT_LENGTH+1]
		
		read_args(sMessage,MAX_TEXT_LENGTH)
		remove_quotes(sMessage)
		replace(sMessage,MAX_TEXT_LENGTH,"/","")
		
		
		
		format(sCommand,MAX_TEXT_LENGTH,"amx_%s",sMessage)
		client_cmd(id,sCommand)
		
	}
	return PLUGIN_CONTINUE
}

public plugin_end2() {
	new minutes = floatround(get_gametime() / 60.0, floatround_ceil);
	
	new map[32];
	get_mapname(map, charsmax(map));
	
	new f = fopen(gSaveFile, "wt");
	
	fprintf(f, "^"%s^" %d", map, minutes);
	
	if(gNumLastMaps == LAST_MAPS_SAVE) {
		gNumLastMaps--;
	}
	
	for(new i = 0; i < gNumLastMaps; i++) {
		fprintf(f, "^n^"%s^" %d", gLastMapName, gLastMapTime);
	}
	
	fclose(f);
}

public CmdLastMaps(id) {
	if(gNumLastMaps) {
		new maps[192], len;
		for(new i = 0; i < gNumLastMaps; i++) {
			len += formatex(maps[len], charsmax(maps) - len, "%s%s (%dmin)", len ? ", " : "", gLastMapName, gLastMapTime);
		}
		
		ColorChat(id, RED, "[!harti] ^x01 Ultimele 3 harti jucate: ^x04 %s", maps);
		} else {
		client_print(id, print_chat, "Nu este nicio harta anterioara.");
	}
}

public pass(id, level, cid)
{
	if(!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	new cmd[32], password[128]
	
	read_argv(0, cmd, 31)
	read_args(password, 127)
	replace(password, 127, cmd, "")
	format(password, 127, "%s", password)
	
	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	switch (get_cvar_num("amx_show_activity")) {
		case 2: ColorChat(0,RED,"[/pass] ^x01 Parola a fost setata pe server. Tasteaza /nopass pentru a o scoate. - ^x04 %s",name)
			case 1: ColorChat(0,RED,"Este deja o parola pe server.")
		}
	log_amx("Cmd: ^"%s<%d><%s>^" set the server password to %s",name,get_user_userid(id),authid,password)
	set_cvar_string("sv_password", password)
	
	return PLUGIN_HANDLED
}

public nopass(id, level, cid)
{
	if(!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	get_user_name(id, name, 31)
	get_user_authid(id, authid, 31)
	switch (get_cvar_num("amx_show_activity")) {
		case 2: ColorChat(0,RED,"[/nopass]^x01 Parola a fost scoasa de pe server. - ^x04 %s",name)
			case 1: client_print(0,print_chat,"A fost scoasa deja parola de pe server.")
		}
	log_amx("Cmd: ^"%s<%d><%s>^" removed server password", name,get_user_userid(id),authid)
	set_cvar_string("sv_password", "")
	
	return PLUGIN_HANDLED
}


UPDATE:
| Afiseaza codul
[code]    Absolut toate comenzile amx se vor putea folosi direct de pe chat! ex: /ban jucator 0 wall  (bara inlocuind AMX)
    Toate mesajele au fost editate, iar acum nu vor mai consuma decât o linie de chat la fiecare comandă.
    Ora şi data la care se porneşte mix-ul au fost scoase, considerându-le inutile pentru desfăşurarea unui mix.
    Prefixul fiecărei comenzi va fi comanda executată, sufix-ul urmând să fie admin-ul care o execută. ex: [!interp] Interp-ul a fost setat. -Frozen
    comanda !rr adăugată. (în prima repriză dacă se execută /rr, scorul se va reseta la 0. în a doua repriză scorul va rămâne acelaşi).
    comanda !prelungiri adăugată (se vor schimba echipele la 3 runde de joc, iar scorul va fi evidenţiat, anunţat pe chat).
    comanda !knife adăugată .
    comanda !harti adăugată (arată ultimele 3 hărţi şi minutele jucate pe respectivele hărţi).
    comanda !pass adăugată
    comanda !nopass adăugată
    comanda /map adăugată (/map de_dust2 în chat).
[/code]
Nume: OldMix
Versiune: //
Link oficial: InDungi

Instalare:
1. Fisierul MixOriginalOLD.amxx il puneti in addons/amxmodx/plugins
2. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

MixOriginalOLD.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
  • Nu are //
Functii:
  • Comenzi pentru chat
    Comenzi pentru consolă
    Situaţia financiară
    Desfăşurarea mix-ului automată (după pornirea mix-ului nu mai este necesară absolut nicio comandă).
    Afişarea scorului în fiecare rundă.
    Ace
    Screenshot
    Demo
    Setarea parolei
    Headshot only (activare/dezactivare)
Desfăşurarea unui mix folosind plugin-ul oldmix:
  • 1. Se tastează !warm în chat până se vor strânge 10 jucători.
    2. După ce s-au strâns 10 jucători pe server, se tastează comanda !specall
    3. După formarea echipelor se tastează comanda !start
    -situaţia financiară, mai exact banii coechipierilor vor fi afişaţi printr-un mesaj hud în stânga ecranului timp de 6 secunde. Se poate solicita !money
    -scorul va fi afişat în fiecare rundă, dar se poate solicita tastând !score
    -interp-ul jucătorilor dar şi alte informaţii se pot afla chiar şi de jucător, tastând în chat !setari
    -de asemenea, interp-ul se poate seta tastând !interp
    -poze unui jucator se fac tastand pe chat /ss 2 freedom (2 = nr. de poze)
    -demo unui jucator se porneste tastand pe chat /demo freedom (sau amx_demo)
    -pentru mai multe comenzi se tastează !comenzi
    4. Dacă scorul ajunge la 15-15 se tastează !prelungiri şi se va juca până ce o echipă atinge scorul de 3
    5. La atingerea scorului 16, mix-ul se termină şi este afişat un mesaj pe chat cu echipa câştigătoare.
    6. Pentru lista ultimelor 3 hărţi jucate pe server se tastează !harti
    7. Pentru schimbarea hartii se tasteaza /map si harta (/map de_dust2)
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
  • amx_ss "nume "nr." - execută un număr de poze ales jucătorului
    amx_demo "nume" - porneşte un demo jucătorului ales, fără a-l anunţa.
    amx_stopdemo "nume" - opreşte demo.
    amx_hsonly a - activează modul headshot only
    amx_hsonly abcdefg - dezactivează modul headshot only
Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
  • !specall pentru mutarea tuturor jucatorilor la spectator
    !live pentru pornirea mix-ulu
    !warm pentru pornirea rundelor de incalzire
    !rr pentru restart
    !prelungiri pentru pornirea rundelor de departajare
    !setari pentru afisarea interp-ului,steamid-ului si ip-ului
    !interp pentru setarea interp-ului
    !score pentru afisarea scorului
    !pass pentru setarea parolei
    !nopass pentru scoaterea parolei
    !blocare pentru blocarea chat-ului
    !deblocare pentru deblocarea chat-ului
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
//

Imagini:
Nu am imagini //
Last edited by Laurentiu P. on 15 Jan 2019, 20:31, edited 1 time in total.
Reason: Actualizat
User avatar
iNdio
Membru, skill +4
Membru, skill +4
Posts: 1611
Joined: 28 Jan 2015, 17:42
Detinator Steam: Da
SteamID: iNdioPGL
Reputatie: Fost Membru Club eXtreamCS (6 luni)
Castigator Membru Club eXtream @ Ganduri de sub dus (25 OCT - 25 FEB)
Fond eXtream: 0

30 Oct 2016, 20:58

Where Cs had no value, amxx, sometimes, had its price...
User avatar
Manutza*
Membru, skill 0
Membru, skill 0
Posts: 54
Joined: 10 Nov 2018, 11:47
Detinator Steam: Nu
CS Status: RS6 Showtime tati
Fond eXtream: 0
Been thanked: 2 times
Contact:

10 Jan 2019, 17:09

pacat ca nu merge sma :') :')
phpBB [media]
User avatar
THEKING.
Manager CS
Manager CS
Posts: 3419
Joined: 21 Apr 2012, 16:24
Detinator Steam: Da
CS Status: Away
Detinator server CS: cs.extreamcs.com
SteamID: divinsx
Reputatie: Super moderator
Manager CS
Nume anterior: CLAU.
1/3
Location: Romania
Has thanked: 84 times
Been thanked: 72 times
Contact:

10 Jan 2019, 17:36

Manutza* wrote:pacat ca nu merge sma :') :')
Mai exact ce nu merge??
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2241
Joined: 10 Jul 2013, 20:26
Detinator Steam: Nu
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 12 times
Been thanked: 30 times

11 Jan 2019, 09:46

Manutza* wrote:pacat ca nu merge sma :') :')
Linkul de download este bun : http://www.girlshare.ro/3489571246.7
Image
Lux0R^
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1223
Joined: 13 Jul 2013, 15:31
Detinator Steam: Da
Reputatie: Scripter eXtreamCS
Moderator ajutator
Has thanked: 15 times
Been thanked: 9 times

15 Jan 2019, 20:20

Laurentiu P. wrote:
Manutza* wrote:pacat ca nu merge sma :') :')
Linkul de download este bun : http://www.girlshare.ro/3489571246.7
nu pentru toti, mai bine pune sursa aici :p
Pauza pana in iulie... licenta ^^

Fara pm-uri pentru pluginuri de zm/furien + tot ce tine de vip.

Codul Scripterului: scripting/codul-scripterului-t362300.html#p2754224
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2241
Joined: 10 Jul 2013, 20:26
Detinator Steam: Nu
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 12 times
Been thanked: 30 times

15 Jan 2019, 20:28

Adaugat sursa pluginului in primul post.

+ https://pastebin.com/ym3PHEsN
Image
X-Tream2019
Membru, skill 0
Membru, skill 0
Posts: 2
Joined: 07 Jan 2019, 14:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

14 Aug 2019, 07:48

Are cineva sma-ul fara bug-uri?
OLD!
Membru, skill 0
Membru, skill 0
Posts: 3
Joined: 22 Jan 2015, 00:08
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

20 Aug 2019, 17:09

X-Tream2019 wrote:
14 Aug 2019, 07:48
Are cineva sma-ul fara bug-uri?
uite aici varianta fara bug-uri:
http://www.girlshare.ro/3769773429.4
https://www81.zippyshare.com/v/W0l8FIdD/file.html


[*]ti-am rezolvat suprapunerea respawn-ului + functiei specall
[*]am scos acces-ul jucatorilor la ip din functia interp
[*]ti-am adaugat un meniu din care poti sa executi mai usor comenzile:
mComenziMIX = menu_create("\wComenzile pentru administrarea mix-ului \r2019", "mh_ComenziMIX")
menu_additem(mComenziMIX, "\wPorneste mix-ul \r/start", "1", ADMIN_KICK)
menu_additem(mComenziMIX, "\wOpreste mix-ul \r/stop", "2" , ADMIN_KICK)
menu_additem(mComenziMIX, "\wPorneste rundele de incalzire \r/warm", "3", ADMIN_KICK)
menu_additem(mComenziMIX, "\wPorneste runda de cutite \r/knife", "4", ADMIN_KICK)
menu_additem(mComenziMIX, "\wRestarteaza rundele \r/rr", "5", ADMIN_KICK)
menu_additem(mComenziMIX, "\wBlocheaza chat-ul \r/off", "6", ADMIN_KICK)
menu_additem(mComenziMIX, "\wDeblocheaza chat-ul \r/on", "7", ADMIN_KICK)
menu_additem(mComenziMIX, "\wPorneste/Opreste rundele AWP \r/awp", "8", ADMIN_KICK)
menu_additem(mComenziMIX, "\wPentru a porni HEADSHOT ONLY, tasteaza: \r/hsonly a", "9", ADMIN_KICK)
menu_additem(mComenziMIX, "\wPentru a opri HEADSHOT ONLY, tasteaza: \r/hsonly abcdefgh", "10", ADMIN_KICK)
menu_setprop ( mComenziMIX, MPROP_EXIT, MEXIT_ALL );

insa ti-as recomanda sa cauti alte plugin-uri actualizate, deoarece n-am mai umblat considerabil de prin 2014 la respectivul plugin.
gasesti. internetul e mare.
X-Tream2019
Membru, skill 0
Membru, skill 0
Posts: 2
Joined: 07 Jan 2019, 14:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

02 Sep 2019, 06:07

Merci frumos :)
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests