[Ajuda] Bug -
Lipe_Stronda - 22.04.2012
porra to quebrando a cabeзa com essa porra de guerra no morro, eu criei essa budega do 0 so que ai quando inicia tudo direitin, os pontos vai rolando, ai eu to testando por enquanto e deixei pra qando chegar a 20 pontos a pessoa ganhar a guerra, so que nao ta indo pqp, e eu nao sei mais oque fazer.
pawn Код:
forward AtualizarGuerra2(playerid);
public AtualizarGuerra2(playerid)
{
if(Pontos[playerid] == 20)
{
GuerraMorro[playerid] = 0;
SendClientMessageToAll(0x7A7A7AFF, "|______________________|Guerra Terminada|______________________|");
SendClientMessageToAll(-1, "|. : : | Guerra no morro foi finalizada");
format(Celula, sizeof(Celula),"|. : : | Organizaзгo Vencedora: {7A7A7A}%s",GetTeam(playerid));
SendClientMessageToAll(-1, Celula);
SendClientMessageToAll(-1, "|. : : | Havera outra guerra daqui a uma hora");
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw9);
SetTimer("TempoGuerra",60*1000*60,false);
if(Team[playerid] == Policia)
{
GangZoneShowForAll(GZMorro, 0x0099FFAA);
DonoMorro = 1;
GangZoneStopFlashForAll(GZMorro);
return 1;
}
if(Team[playerid] == Groove)
{
GangZoneShowForAll(GZMorro, 0x00A816AA);
DonoMorro = 2;
GangZoneStopFlashForAll(GZMorro);
return 1;
}
if(Team[playerid] == Ballas)
{
GangZoneShowForAll(GZMorro, 0xE600CBAA);
DonoMorro = 3;
GangZoneStopFlashForAll(GZMorro);
return 1;
}
if(Team[playerid] == Vagos)
{
GangZoneShowForAll(GZMorro, 0xE5FF00AA);
DonoMorro = 4;
GangZoneStopFlashForAll(GZMorro);
return 1;
}
if(Team[playerid] == Aztecas)
{
GangZoneShowForAll(GZMorro, 0x0800FFAA);
DonoMorro = 5;
GangZoneStopFlashForAll(GZMorro);
return 1;
}
for(new i = 0; i <= MAX_PLAYERS; i++)
{
GuerraMorro[i] = 0;
return 1;
}
return 1;
}
return 0;
}
Re: [Ajuda] Bug -
RoacH` - 22.04.2012
Poste a public "TempoGuerra".
Re : [Ajuda] Bug -
Lipe_Stronda - 22.04.2012
pawn Код:
forward TempoGuerra();
public TempoGuerra()
{
Guerra = false;
return 1;
}
Re: [Ajuda] Bug -
RoacH` - 22.04.2012
pawn Код:
forward AtualizarGuerra2 ( playerid ) ;
public AtualizarGuerra2 ( playerid )
{
if(Pontos [ playerid ] == 20 )
{
GuerraMorro [ playerid ] = 0 ;
SendClientMessageToAll ( 0x7A7A7AFF , "|______________________|Guerra Terminada|______________________|" ) ;
SendClientMessageToAll (-1 , "|. : : | Guerra no morro foi finalizada" ) ;
format ( Celula , sizeof ( Celula ) , "|. : : | Organizaзгo Vencedora: {7A7A7A}%s" , GetTeam ( playerid ) ) ;
SendClientMessageToAll ( -1 , Celula ) ;
SendClientMessageToAll ( -1, "|. : : | Havera outra guerra daqui a uma hora" ) ;
TextDrawHideForPlayer ( playerid , Textdraw4 ) ;
TextDrawHideForPlayer ( playerid , Textdraw5 ) ;
TextDrawHideForPlayer ( playerid , Textdraw6 ) ;
TextDrawHideForPlayer ( playerid , Textdraw7 ) ;
TextDrawHideForPlayer ( playerid , Textdraw8 ) ;
TextDrawHideForPlayer ( playerid , Textdraw9 ) ;
SetTimer ( "TempoGuerra" , 60*1000*60 , false ) ;
if ( Team [ playerid ] == Policia )
{
GangZoneShowForAll ( GZMorro , 0x0099FFAA ) ;
DonoMorro = 1 ;
GangZoneStopFlashForAll ( GZMorro ) ;
}
if ( Team [ playerid ] == Groove )
{
GangZoneShowForAll ( GZMorro , 0x00A816AA ) ;
DonoMorro = 2 ;
GangZoneStopFlashForAll ( GZMorro ) ;
}
if ( Team [ playerid ] == Ballas )
{
GangZoneShowForAll ( GZMorro , 0xE600CBAA ) ;
DonoMorro = 3 ;
GangZoneStopFlashForAll ( GZMorro ) ;
}
if ( Team [ playerid ] == Vagos )
{
GangZoneShowForAll ( GZMorro , 0xE5FF00AA ) ;
DonoMorro = 4 ;
GangZoneStopFlashForAll ( GZMorro ) ;
}
if ( Team [ playerid ] == Aztecas )
{
GangZoneShowForAll ( GZMorro , 0x0800FFAA ) ;
DonoMorro = 5 ;
GangZoneStopFlashForAll ( GZMorro ) ;
}
for ( new i = 0; i <= MAX_PLAYERS ; i++ )
{
GuerraMorro [ i ] = 0 ;
}
}
return 1;
}
forward TempoGuerra ( ) ;
public TempoGuerra ( ) return Guerra = false ;
Re : [Ajuda] Bug -
Lipe_Stronda - 22.04.2012
funcionou, so que fica flodando toda hora isso:
pawn Код:
SendClientMessageToAll ( 0x7A7A7AFF , "|______________________|Guerra Terminada|______________________|" ) ;
SendClientMessageToAll (-1 , "|. : : | Guerra no morro foi finalizada" ) ;
format ( Celula , sizeof ( Celula ) , "|. : : | Organizaзгo Vencedora: {7A7A7A}%s" , GetTeam ( playerid ) ) ;
SendClientMessageToAll ( -1 , Celula ) ;
SendClientMessageToAll ( -1, "|. : : | Havera outra guerra daqui a uma hora" ) ;
e nao para de flodar, voce digita e oque voce digito some
Re: [Ajuda] Bug -
RoacH` - 22.04.2012
Creio que a public "AtualizarGuerra2" й atualizada por um timer, poste-o.
Re : [Ajuda] Bug -
Lipe_Stronda - 22.04.2012
pawn Код:
SetTimer("AtualizarGuerra2", 1000, true);
e quando reloga, o negocio nao para de floodar
Re: [Ajuda] Bug -
RoacH` - 22.04.2012
pawn Код:
new Update ;
Update = SetTimerEx ( "AtualizarGuerra2" , 1000 , true , "i" , playerid ) ;
//public AtualizarGuerra2 e OnPlayerDisconnect
KillTimer ( Update ) ;
Re : [Ajuda] Bug -
Lipe_Stronda - 22.04.2012
ae mais se gamemodeinit nao tem parametros playerid, como ficara?
pawn Код:
Update = SetTimerEx ( "AtualizarGuerra2" , 1000 , true , "i" , playerid ) ;
Re: [Ajuda] Bug -
RoacH` - 22.04.2012
OnPlayerConnect