SA-MP Forums Archive
[Ajuda]SetTimer/SetTimerEx - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda]SetTimer/SetTimerEx (/showthread.php?tid=298982)



[Ajuda]SetTimer/SetTimerEx - Jimmy_Vilhena - 23.11.2011

Eai negada, seguinte. Tudo que se usa SetTimer no GM tб bugando, ja troquei as includes pra compila, baixei novas, troque de SetTimerEx pra SetTimer e vice versa. Tipo, ele comeзa a conta e nao para mais, tipo fica dominando o territorio pra sempre. O problema й que ele faz isso sу quando quer, e buga quando quer tambem, ai preciso dar gmx pra arruma ou kickar quem deu o ultimo /do.

Agradeзo desde jб.


Re: [Heelps]SetTimer/SetTimerEx - AppleX - 23.11.2011

https://sampwiki.blast.hk/wiki/KillTimer


Re: [Heelps]SetTimer/SetTimerEx - Pharrel - 23.11.2011

Mostre o codigo de dominar.


Re: [Heelps]SetTimer/SetTimerEx - Jimmy_Vilhena - 23.11.2011

Код:
	if(strcmp(cmd, "/dominar", true) == 0 || strcmp(cmd, "/do", true) == 0)
	{
	    	new carid = GetPlayerVehicleID(playerid);
       		if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)// Taliban
		{
			if(IsPlayerInRepresa(playerid))
			{
				if(Dominando[playerid] == 1)
    				{
	   				SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
	    				return 1;
    				}
    				if(GuerranaRepresa == 1)
    				{
	   				SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
	    				return 1;
	   			}
			    	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                		format(string, sizeof(string), "%s e o Taliban estгo dominando a Represa!",playername);
				SendClientMessageToAll(COR_TAL, string);
				 SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todos os Terroristas e o Exercito foram avisados!");
			    	SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
                		GangZoneFlashForAll(GZRepresa,COR_TAL);
                		Dominando[playerid] = 1;
               		 	ProvocoRepresa[playerid] = 1;
                		GuerranaRepresa = 1;
                		TempoGuerraRepresa = SetTimerEx("GuerraRepresa", 60000, 0, "i", playerid);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
			}
			return 1;
		}
		return 1;
	}
Public da SetTimer

Код:
public GuerraRepresa(playerid)
{
	new string[128];
	new playername[MAX_PLAYER_NAME];
	if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
	{
	    if(ProvocoRepresa[playerid] == 1)
		{
			if(IsPlayerInRepresa(playerid))
			{
			   	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                		ormat(string, sizeof(string), "%s e o Taliban Dominaram a Represa!",playername);
				SendClientMessageToAll(COR_TAL, string);
				SendClientMessage(playerid, COLOR_GRAD5, "Vocк dominou a Represa, a cada 5 minutos nela ganharб grana.");
				GangZoneStopFlashForAll(GZRepresa);
				GangZoneShowForAll(GZRepresa,COR_TAL);
				Dominando[playerid] = 0;
				ProvocoRepresa[playerid] = 0;
				GuerranaRepresa = 0;
				donoRepresa = 1;
				KillTimer(TempoGuerraRepresa);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COR_GRO, "Vocк nгo estб na Represa!");
				Dominando[playerid] = 0;
				GangZoneStopFlashForAll(GZRepresa);
				GangZoneShowForAll(GZRepresa, 0xFFFFFF96);
				ProvocoRepresa[playerid] = 0;
				GuerranaRepresa = 0;
				donoRepresa = 0;
				KillTimer(TempoGuerraRepresa);
				return 1;
			}
		}
		return 1;
	}
	return 1;
}
Mandei a parte de uma org sу, o cmd й mto grande.


Re: [Ajuda]SetTimer/SetTimerEx - Macintosh - 24.11.2011

Oi. Simples assim.

pawn Код:
KillTimer(TempoGuerraRepresa);



Re: [Ajuda]SetTimer/SetTimerEx - Jimmy_Vilhena - 24.11.2011

Onde? Zz


Re: [Ajuda]SetTimer/SetTimerEx - Jimmy_Vilhena - 28.11.2011

up..


Re: [Ajuda]SetTimer/SetTimerEx - Jimmy_Vilhena - 01.12.2011

Alguem?..


Re: [Ajuda]SetTimer/SetTimerEx - Jimmy_Vilhena - 09.12.2011

Reavivamento


Re: [Ajuda]SetTimer/SetTimerEx - DreeH - 09.12.2011

Aconselho refazer o sistema ou largar de godfather, e criar um gamemode do zero.
Bugs existentes no godfather sгo inъmeros, nunca irгo acabar, entгo nгo irб adiantar nada resolver este bug e depois de 1 mкs surgir outro e vocк vir pedir ajuda denovo.

Muitos scripters estгo largando GodFather, por isso os mais experientes nгo estгo mais ajudando os novatos com isso, pois irб complicar muito no aprendizado do novato.
Estude mais a linguagem PAWN, e crie seu prуprio gamemode.

Fica a minha dica.