Raised This Month: $51 Target: $400
 12% 

Extra rounds won't end.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xMihai
Junior Member
Join Date: Jan 2018
Old 01-17-2018 , 12:51   Extra rounds won't end.
Reply With Quote #1

Code:
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", "5" );
		set_cvar_string ( "mp_startmoney", "800" );
		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 = 3
		}
		
		
		get_user_name( id, szName, sizeof ( szName ) -1 );		
		ColorChat(0, RED, "[zeroHP.ro]^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
}

So there's the part code of !prelungiri ( !extra command in english ). After a mix is ended in 15-15 as score, an admin needs do to !prelungiri to start three more rounds. That means who wins two of them, get the game. The problem is... every time a team hit three points the server keeps changing team and going at infinite. What's wrong with it? All i want is only three extra rounds if needed at 15-15 then server stops the mix and announce the winner.

The other topic ( with i made either this day ) can be locked. I did marked it as solved already.


At request i can post the whole .sma.

Last edited by xMihai; 01-17-2018 at 12:52. Reason: At request i can post the whole sma if you think the error is somewhere else.
xMihai is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode