public TempoDominarBase()
{
for(new B = 0; B < TOTALBASES; B ++)
{
if((X >= CoordenadasBases[B][0]) && (Y >= CoordenadasBases[B][1]) && (X <= CoordenadasBases[B][2]) && (Y <= CoordenadasBases[B][3]))
{
AchouX[I] = 1;
BaseXxX[I] = -1;
format(T, sizeof(T), "~g~~h~~h~~h~Base ~w~~h~ID %d ~b~~h~~h~/InfoBase ~y~- ~r~~h~~h~GC dono: ~w~%s", B, dini_Get(BasesFile(B),"Dono"));
TextDrawSetString(TextdrawBase1[I], T);
TextDrawShowForPlayer(I, TextdrawBase1[I]);
if(PrintON[I] == 1) TextDrawHideForPlayer(I, TextdrawBase1[I]);
if((BaseDono[B] != GetGCMember(I)) && (GetGCMember(I) != -1) && (IsPlayerInAnyVehicle(I)))
{
TempoBase[I] = TempoDefinido;
SendClientMessage(I, 0xFF5E35FF, "| ERRO | Vocк nгo pode dominar uma base dentro de um veнculo!");
if(DominandoBase[I] == 1)
{
SaiuBase(I, B);
}
}
else if((BaseDono[B] != GetGCMember(I)) && (GetGCMember(I) != -1) && (BaseSendoAtacada[B] != I) && (BaseSendoAtacada[B] != -1))
{
TempoBase[I] = TempoDefinido;
SendClientMessage(I, 0xFF5E35FF, "| ERRO | Essa base jб estб sendo atacada");
if(DominandoBase[I] == 1)
{
SaiuBase(I, B);
}
}
else if((BaseDono[B] != GetGCMember(I)) && (GetGCMember(I) != -1))
{
if(BaseSendoAtacada[B] == -1)
{
BaseSendoAtacada[B] = I;
}
if(BaseSendoAtacada[B] == I)
{
if(PiscaBaseX[B] == 1)
{
PiscaBaseX[B] = 0;
foreach (Player, P)
{
if(IsPlayerConnected(P))
{
if(dini_Int(GCsFile(GetGCMember(I)),"CorMapa") != 0)
{
ChangeColorOfGZBase(P, B, CoresGCs[dini_Int(GCsFile(GetGCMember(I)),"CorMapa") - 1]);
}
else
{
ChangeColorOfGZBase(P, B, 0xFFFFFFAA);
}
if(IsValidOwnerBase(B) == 1) ChangeMapIconOfBase(P, B, dini_Int(GCsFile(GetGCMember(I)),"Icone"));
//ChangeColorOfGZBase(P, B, GetPlayerColor(I));
}
}
}
else if(PiscaBaseX[B] == 0)
{
PiscaBaseX[B] = 1;
foreach (Player, P)
{
if(IsPlayerConnected(P))
{
RemoveGZOfBase(P, B);
AddGZOfBase(P, B);
if(IsValidOwnerBase(B) == 1) ChangeMapIconOfBase(P, B, dini_Int(GCsFile(BaseDono[B]),"Icone"));
}
}
}
if(EnviouMensagem[I] >= 5)
{
format(T, sizeof(T), "| INFO | Atacando Base ID %d dos %s! [%d segundos]", B, dini_Get(BasesFile(B),"Dono"), TempoBase[I]);
SendClientMessage(I, COR_ORKUT, T);
EnviouMensagem[I] = 0;
}
else
{
EnviouMensagem[I] ++;
}
if(IsValidOwnerBase(B) == 1)
{
if(TempoBase[I] > 1) format(T, sizeof(T), "~r~%d ~w~s", TempoBase[I]);
else format(T, sizeof(T), "~r~%d ~w~s", TempoBase[I]);
TextDrawBase2SetString(BaseDono[B], T);
TextDrawBase2ShowForMembersOfGC(BaseDono[B]);
if(VBase[B] >= 5)
{
format(T, sizeof(T), "| INFO | Base ID %d sendo atacada pelos %s! [%d segundos]", B, dini_Get(GCsFile(GetGCMember(I)),"Nome"), TempoBase[I]);
MessageToMembersOfGC(BaseDono[B], COR_ORKUT, T);
VBase[B] = 0;
}
else
{
VBase[B] ++;
}
}
BaseXxX[I] = B;
DominandoBase[I] = 1;
TempoBase[I] --;
if(TempoBase[I] > 1) format(T, sizeof(T), "~y~%d ~w~s", TempoBase[I]);
else format(T, sizeof(T), "~y~%d ~w~s", TempoBase[I]);
TextDrawSetString(TextdrawBase2[I], T);
TextDrawShowForPlayer(I, TextdrawBase2[I]);
if(PrintON[I] == 1) TextDrawHideForPlayer(I, TextdrawBase2[I]);
if(TempoBase[I] == 0)
{
if(IsValidOwnerBase(B) == 1) TextDrawBase2HideForMembersOfGC(BaseDono[B]);
BaseSendoAtacada[B] = -1;
TempoBase[I] = TempoDefinido;
if(IsValidOwnerBase(B) == 1) format(T, sizeof(T), "| INFO | A Base ID %d dos %s foi dominada pelos %s!", B, dini_Get(GCsFile(BaseDono[B]),"Nome"), dini_Get(GCsFile(GetGCMember(I)),"Nome"));
else format(T, sizeof(T), "| INFO | A Base ID %d dos Nenhum foi dominada pelos %s!",B, dini_Get(GCsFile(GetGCMember(I)),"Nome"));
MessageToAllMembersOfGCs(COR_ORKUT, T);
if(IsValidOwnerBase(B) == 1) TextDrawBase2HideForMembersOfGC(BaseDono[B]);
TextDrawHideForPlayer(I, TextdrawBase2[I]);
new ValorXB[128];
format(ValorXB, sizeof(ValorXB), "%d", dini_Int(BasesFile(B), "Dinheiro"));
ResetarConfiguracoesBase(B);
format(T, sizeof(T), "%s", dini_Get(GCsFile(GetGCMember(I)),"Nome"));
dini_Set(BasesFile(B), "Dono", T);
dini_Set(BasesFile(B), "Situacao", "1");
dini_Set(BasesFile(B), "Dinheiro", ValorXB);
BaseDono[B] = GetGCMember(I);
format(T, sizeof(T), "%d", GetGCMember(I));
dini_Set(BasesFile(B), "IDx", T);
format(T, sizeof(T), "| INFO | Vocк dominou a Base ID %d!", B);
SendClientMessage(I, COR_ORKUT, T);
DominandoBase[I] = 0;
/*for(new Mx = 0; Mx < MAX_MEMBERS; Mx ++)
{
new Tx[128];
format(Tx, sizeof(Tx), "Membro%d", (Mx));
foreach(Player, Xx)
{
if(!strcmp(Nomex(Xx), dini_Get(GCsFile(GetGCMember(I)), Tx), true))
{
Banco[Xx] += 300;
new Sx[128];
format(Sx, sizeof(Sx), "| INFO | Vocк ganhou R$ 300 por ser membro da GC que conquistou a Base ID %d!", dini_Get(GCsFile(GetGCMember(I))));
SendClientMessage(Xx, COR_ORKUT, Sx);
}
}
}*/
foreach (Player, P)
{
if(IsPlayerConnected(P))
{
if(dini_Int(GCsFile(GetGCMember(I)),"CorMapa") != 0)
{
ChangeColorOfGZBase(P, B, CoresGCs[dini_Int(GCsFile(GetGCMember(I)),"CorMapa") - 1]);
}
else
{
ChangeColorOfGZBase(P, B, 0xFFFFFFAA);
}
if(IsValidOwnerBase(B) == 1) ChangeMapIconOfBase(P, B, dini_Int(GCsFile(GetGCMember(I)),"Icone"));
//ChangeColorOfGZBase(P, B, GetPlayerColor(I));
}
}
if(AchouX[I] == 0)
{
if(DominandoBase[I] == 1)
{
SaiuBase(I, BaseXxX[I]);
}
EnviouMensagem[I] = 5;
if(MsgCartaoAtivada[I] == 0)TextDrawHideForPlayer(I, TextdrawBase1[I]);
TextDrawHideForPlayer(I, TextdrawBase2[I]);
TempoBase[I] = TempoDefinido;
BaseXxX[I] = -1;
}
}
}
return 1;
}
if((Jetpack[I] = 0))
{
SendClientMessage(I, 0xFF5E35FF, "| ERRO | Vocк nгo pode dominar uma base dentro de um veнculo!");
}
if((Jetpack[I] = -1))
{
SendClientMessage(I, 0xFF5E35FF, "| ERRO | Vocк nгo pode dominar uma base dentro de um veнculo!");
}
if((Jetpack[I] = 1))
{
SendClientMessage(I, 0xFF5E35FF, "| ERRO | Vocк nгo pode dominar uma base dentro de um veнculo!");
}
if((BaseDono[B] != GetGCMember(I)) && (GetGCMember(I) != -1) && (Jetpack(I)))
{
TempoBase[I] = TempoDefinido;
SendClientMessage(I, 0xFF5E35FF, "| ERRO | Vocк nгo pode dominar uma base dentro de um veнculo!");
if(DominandoBase[I] == 1)
{
SaiuBase(I, B);
}
}
if(GetPlayerSpecialAction(playerid) == 2) return SendClientMessage(playerid,-1,"Vocк nгo pode dominar um territorio em um veiculo !");
Tente adcionar isso aki
Code:
if(GetPlayerSpecialAction(playerid) == 2) return SendClientMessage(playerid,-1,"Vocк nгo pode dominar um territorio em um veiculo !"); |
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USE_JETPACK)