One life per round.
#5

I am not professional at this, thats why i post here...
Код:
forward Segundo(playerid);
public Segundo(playerid)
{
	new timestr[32];
	SegundosRestantes--;
	if(SegundosRestantes <= 0)
	{
		if(MinutosRestantes <= 0)
		{
  			KillTimer(TiempoRonda);
	 		SegundosRestantes = 0;
			MinutosRestantes = 0;
 	    	CongelarTodos();
 	    	//aqui pongo el puntaje de la partida
            ContadorTop();
 	    	DialogTop(playerid);
 	    	//
			TiempoDelMapa = SetTimer("CambiarMapa",10000,false);
			for(new i = 0; i < MAX_PLAYERS; i++)
			if (Iniciado[i] == 1)
            {
                if (Spawneado[i] == 1)
				{
            	DatosUsuario[i][MapasJugados]++;
            	}
			}
			if(BajasPolicias == BajasTerroristas) //Cuando es un empate
			{
                if (Iniciado[playerid] == 1)
                {
				    if (Spawneado[playerid] == 1)
            	    {
                 	for(new i = 0; i < MAX_PLAYERS; i++)
			    	DatosUsuario[i][MapasEmpatados]++;
  	            }
			}
			GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~y~ Empate",10000,3);
			for(new i = 0; i < MAX_PLAYERS; i++)
			if (Iniciado[playerid] == 1)
                {
		    	if (Spawneado[playerid] == 1)
                {
				GivePlayerMoney(i, 500);
				GivePlayerScore(i, 5);
				PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/g6i270t9a2/Good_job_team_Get_ready_for_the_next_round.mp3");
				SendClientMessage(i, Amarillo, "{FFF940}[Empate] {FFFFFF}Esforzaros para la prуxima vez, es hora de cobrar [5 puntos | 500$]");
				}
			  }
			}
			if(BajasPolicias > BajasTerroristas) //Cuando los Policias ganan
            {
			GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~b~ Los Policias han ganado",10000,3);
			for(new i = 0; i < MAX_PLAYERS; i++)
			PlayAudioStreamForPlayer(i, "http://main.get4mobile.net/ringtone/ringtone/_HrWoiI52-_kl9Gr7IdzHg/1459210248/3100d8174fb3fc2f5ffd45e5bdba8496/unknown_artist-counter_terrorists_win.mp3");
            for(new i = 0; i < MAX_PLAYERS; i++)
			if(gTeam[i] == Policias) //Mensaje para Policias cuando ganan
         	{
                if (Iniciado[playerid] == 1)
                {
         		    if (Spawneado[playerid] == 1)
           	        {
         	    	DatosUsuario[i][MapasGanados]++;
         	    	SendClientMessage(i, Verde, "[Victoria] {FFFFFF}Buen trabajo, es hora de cobrar [10 puntos | 2500$]");
        	    	GivePlayerMoney(i, 2500);
        	    	GivePlayerScore(i, 10);
        	    	}
        		}
         	}
            for(new i = 0; i < MAX_PLAYERS; i++)
         	if(gTeam[i] == Terroristas) //Mensaje para Terroristas cuando pierden
         	{
                if (Iniciado[playerid] == 1)
                {
   		            if (Spawneado[playerid] == 1)
                 	{
         	     	DatosUsuario[i][MapasPerdidos]++;
       		        SendClientMessage(i, Rojo, "[Derrota] {FFFFFF}ЎHabйis fracasado, esforzaros para la prуxima vez!");
				    }
				  }
               }
			}
			if(BajasPolicias < BajasTerroristas) //Cuando los Terroristas ganan
			{
			GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~r~ Los Terroristas han ganado",10000,3);
			for(new i = 0; i < MAX_PLAYERS; i++)
			PlayAudioStreamForPlayer(i, "http://soundfxcenter.com/video-games/counter-strike/8d82b5_Counter_Strike_Terrorists_Win_Sound_Effect.mp3");
			for(new i = 0; i < MAX_PLAYERS; i++)
			if(gTeam[i] == Terroristas) //Mensaje para Terroristas cuando ganan
         	{
                if (Iniciado[playerid] == 1)
                {
         		    if (Spawneado[playerid] == 1)
            	    {
         		    DatosUsuario[i][MapasGanados]++;
                	SendClientMessage(i, Verde, "[Victoria] {FFFFFF}Buen trabajo, es hora de cobrar [10 puntos | 2500$]");
        	    	GivePlayerMoney(i, 2500);
        	    	GivePlayerScore(i, 10);
        	    	}
         		}
         	}
         	for(new i = 0; i < MAX_PLAYERS; i++)
         	if(gTeam[i] == Policias) //Mensaje para Terroristas cuando pierden
         	{
                if (Iniciado[playerid] == 1)
                {
         	    	if (Spawneado[playerid] == 1)
                	{
                	SendClientMessage(i, Rojo, "[Derrota] {FFFFFF}ЎHabйis fracasado, esforzaros para la prуxima vez!");
                	DatosUsuario[i][MapasPerdidos]++;
                	}
            	 }
       	      }
           }
		}
		else
  		{
	    	SegundosRestantes = 59;
			MinutosRestantes--;
		}
	}
	format(timestr,sizeof(timestr),"~w~      %02d:%02d",MinutosRestantes,SegundosRestantes);
	TextDrawSetString(Tiempo_restante,timestr);
	return 1;
}
forward CambiarMapa(playerid);
public CambiarMapa(playerid)
{
	KillTimer(TiempoDelMapa);
	KillTimer(TiempoRonda);
	SegundosRestantes = 0;
 	BajasPolicias=0;
  	BajasTerroristas=0;
   	ActualizarPuntuaje();
	if(Mapa == 0)
	{
	    Mapa = 1;
	    MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Jefferson Motel");
		SendRconCommand("mapname Jefferson Motel");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 2/23]");
		print("[Informaciуn] Mapa cambiado a Jeffersons Motel. [Mapa 2/23]");
	}
	else if(Mapa == 1)
	{
		Mapa = 2;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Compound");
		SendRconCommand("mapname Compund");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 3/23]");
		print("[Informaciуn] Mapa cambiado a Compound. [Mapa 3/23]");
	}
	else if(Mapa == 2)
	{
		Mapa = 3;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Canal");
		SendRconCommand("mapname Canal");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 4/23]");
		print("[Informaciуn] Mapa cambiado a Canal. [Mapa 4/23]");
	}
	else if(Mapa == 3)
	{
	    Mapa = 4;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Crack Factory");
		SendRconCommand("mapname Crack Factory");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 5/23]");
		print("[Informaciуn] Mapa cambiado a Crack Factory. [Mapa 5/23]");
	}
	else if(Mapa == 4)
	{
 		Mapa = 5;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Medieval Village");
		SendRconCommand("mapname Medieval Village");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 6/23]");
		print("[Informaciуn] Mapa cambiado a Medieval Village. [Mapa 6/23]");
	}
    else if(Mapa == 5)
	{
		Mapa = 6;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Italy");
		SendRconCommand("mapname Italy");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 7/23]");
		print("[Informaciуn] Mapa cambiado a Italy. [Mapa 7/23]");
	}
	else if(Mapa == 6)
	{
		Mapa = 7;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Maddog Mansion");
		SendRconCommand("mapname Maddog Mansion");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 8/23]");
		print("[Informaciуn] Mapa cambiado a Maddog Mansion. [Mapa 8/23]");
	}
	else if(Mapa == 7)
	{
		Mapa = 8;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Las Venturas PD");
		SendRconCommand("mapname LVPD");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 9/23]");
		print("[Informaciуn] Mapa cambiado a LVPD. [Mapa 9/23]");
	}
	else if(Mapa == 8)
	{
		Mapa = 9;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Liberty City");
		SendRconCommand("mapname Liberty City");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 10/23]");
        print("[Informaciуn] Mapa cambiado a Liberty City. [Mapa 10/23]");
	}
	else if(Mapa == 9)
	{
		Mapa = 10;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Meat Factory");
		SendRconCommand("mapname Meat Factory");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 11/23]");
		print("[Informaciуn] Mapa cambiado a Meat Factory. [Mapa 11/23]");
	}
	else if(Mapa == 10)
	{
		Mapa = 11;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Planning Department");
		SendRconCommand("mapname Planning dept");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 12/23]");
		print("[Informaciуn] Mapa cambiado a Planning dept. [Mapa 12/23]");
	}
	else if(Mapa == 11)
	{
		Mapa = 12;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: San Fierro PD");
		SendRconCommand("mapname SFPD");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 13/23]");
		print("[Informaciуn] Mapa cambiado a SFPD. [Mapa 13/23]");
	}
	else if(Mapa == 12)
	{
		Mapa = 13;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Aircraft");
		SendRconCommand("mapname Aircraft");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 14/23]");
		print("[Informaciуn] Mapa cambiado a Aircraft. [Mapa 14/23]");
	}
	else if(Mapa == 13)
	{
		Mapa = 14;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Area 51");
		SendRconCommand("mapname Area 51");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 15/23]");
		print("[Informaciуn] Mapa cambiado a Area 51. [Mapa 15/23]");
	}
	else if(Mapa == 14)
	{
		Mapa = 15;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Catigula's basement");
		SendRconCommand("mapname Catigula's basement");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 16/23]");
		print("[Informaciуn] Mapa cambiado a Catigula's basement. [Mapa 16/23]");
	}
	else if(Mapa == 15)
	{
		Mapa = 16;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Castle");
		SendRconCommand("mapname Farm");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 17/23]");
		print("[Informaciуn] Mapa cambiado a Farm. [Mapa 17/23]");
	}
	else if(Mapa == 16)
	{
		Mapa = 17;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Military Fuels");
		SendRconCommand("mapname Military Fuels");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 18/23]");
		print("[Informaciуn] Mapa cambiado a Farm. [Mapa 18/23]");
	}
	else if(Mapa == 17)
	{
		Mapa = 18;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Ocean Docks");
		SendRconCommand("mapname Ocean Docks");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 19/23]");
		print("[Informaciуn] Mapa cambiado a Ocean Docks. [Mapa 19/23]");
	}
	else if(Mapa == 18)
	{
		Mapa = 19;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: The Farm");
		SendRconCommand("mapname The Farm");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 20/23]");
		print("[Informaciуn] Mapa cambiado a The Farm. [Mapa 20/23]");
	}
	else if(Mapa == 19)
	{
		Mapa = 20;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Las Barrancas");
		SendRconCommand("mapname Las Barrancas");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 21/23]");
		print("[Informaciуn] Mapa cambiado a Las Barrancas. [Mapa 21/23]");
	}
	else if(Mapa == 20)
	{
		Mapa = 21;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: El Quebrados");
		SendRconCommand("mapname El Quebrados");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 22/23]");
		print("[Informaciуn] Mapa cambiado a El Quebrados. [Mapa 22/23]");
	}
	else if(Mapa == 21)
	{
		Mapa = 22;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Cargo");
		SendRconCommand("mapname Cargo");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 23/23]");
		print("[Informaciуn] Mapa cambiado a Cargo.");
	}
	else if(Mapa == 22)
	{
		Mapa = 0;
 		MinutosRestantes = Tiempo_Ronda;
        TiempoRonda = SetTimer("Segundo",1000,true);
        if (Spawneado[playerid] == 1)
        {
        ReaparecerLosJugadores();
		}
        DescongelarTodos();
		TextDrawSetString(MapaActual,"Mapa: Farm");
		SendRconCommand("mapname Farm");
		SendRconCommand("hostname [0.3.7] Batalla de Contrabando TDM [Mapa 1/23]");
		print("Todos los mapas han sido jugados,");
		print("reiniciando mapas de nuevo.");
		print("[Informaciуn] Mapa cambiado a Farm. [Mapa 1/23]");
	}
    DescongelarTodos();
}
Here is the Funcion when map finish and start new ones...
Reply


Messages In This Thread
One life per round. - by karoliko - 19.05.2016, 16:16
Re: One life per round. - by Micko123 - 19.05.2016, 17:26
Re: One life per round. - by karoliko - 19.05.2016, 17:31
Re: One life per round. - by luke49 - 19.05.2016, 17:45
Re: One life per round. - by karoliko - 19.05.2016, 17:56
Re: One life per round. - by luke49 - 19.05.2016, 18:13

Forum Jump:


Users browsing this thread: 1 Guest(s)