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.