[Ajuda] Gz nгo Aparece
#1

Tipo um amigo meu altero meu code de dominar no lugar da gz ele boto pickup ai quando aperta-se F comeзava a domina mais eu aperto F em cima da pickup й nгo domina

Code estб certinho:

PHP код:
for(new 0MAX_GZS++)
    {
    
GangZonas[i] = GangZoneCreate(GangZone[i][GZCoords][0], GangZone[i][GZCoords][1], GangZone[i][GZCoords][2], GangZone[i][GZCoords][3]);
    
ChecksDominio[i] = CreatePickup(191321GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], -1);
    
ContagemDominio[i] = 0;
    } 
PHP код:
if(newkeys == KEY_SECONDARY_ATTACK)
    {
    if(
IsPlayerInRangeOfPoint(playerid1.5GangZone[playerid][CheckCoords][0], GangZone[playerid][CheckCoords][playerid], GangZone[playerid][CheckCoords][2]))
    {
        for(new 
0MAX_GZS++)
        {
            if(
GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i])
            {
                if(
Player[playerid][pAdmin] >= || Player[playerid][pFrente] >= || Player[playerid][pBOPE] >= || Player[playerid][pPMRJ] >= || Player[playerid][pCORE] >= 4)
                {
                    if(
ContagemDominio[i] != 0)
                        return 
true;
                    if((
strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 10 || (strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 11 ||
                       (
strcmp(GZDono[i], "PM"true) == 0) && Player[playerid][pCORE] >= || (strcmp(GZDono[i], "BOPE"true) == 0) && Player[playerid][pBOPE] >= || (strcmp(GZDono[i], "PMRJ"true) == 0) && Player[playerid][pPMRJ] >= 1)
                    return 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Estб favela jб й da sua facзгo!");
                    
ChecksDominio[i] = SetPlayerCheckpoint(playeridGangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], 4.0);
                    
SetPVarInt(playerid"GZAtacada"i);
                    
ContagemDominio[i] = SetTimerEx("Contagem"10001"i"playerid);
                    
GangZoneFlashForAll(GangZonas[GetPVarInt(playerid"GZAtacada" )], GetPlayerColor(playerid));
                    
SendFormattedMessageToAll(COR_INFO"[NOTICIAS] %s estб dominando a favela '%s' da '%s'."getPName(playerid), GangZone[i][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
                    return 
true;
                }
            }
            else 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Vocк nгo tem permissгo para dominar!");
        }
    }
    return 
true;
    } 
Reply
#2

isso ta na OnPlayerPickuppickup? como vocк ta usando streamer OnPlayerPickUpDynamicPickup
Reply
#3

Quote:
Originally Posted by iSukrYlh0s
Посмотреть сообщение
isso ta na onplayerpickuppickup?
Nгo tб em

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)

Reply
#4

Quote:
Originally Posted by BrGabrielBr
Посмотреть сообщение
Nгo tб em

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)

pelo visto vai ter que trocar todos os checkpoints por pickups dinamicos e add essa funзгo na OnPlayerPickUpDynamicPickup
Reply
#5

Deve-se verificar se o jogador estб proximo de uma das gangzones e pra isso essa verificaзгo deveria estar dentro do loop.

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
    for(new i = 0; i < MAX_GZS; i ++)
    {
         if(IsPlayerInRangeOfPoint(playerid, 1.5, GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][playerid], GangZone[i][CheckCoords][2]))
        {
OBS: usando o operador '&' vocк consegue detectar se foi pressionada a tecla F enquanto o jogador pressiona outra tecla simultaneamente.
Reply
#6

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
Deve-se verificar se o jogador estб proximo de uma das gangzones e pra isso essa verificaзгo deveria estar dentro do loop.

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
    for(new i = 0; i < MAX_GZS; i ++)
    {
         if(IsPlayerInRangeOfPoint(playerid, 1.5, GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][playerid], GangZone[i][CheckCoords][2]))
        {
OBS: usando o operador '&' vocк consegue detectar se foi pressionada a tecla F enquanto o jogador pressiona outra tecla simultaneamente.
entгo vai fica assim nй o

PHP код:
if(newkeys KEY_SECONDARY_ATTACK)
    {
    for(new 
0MAX_GZS++)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][playerid], GangZone[i][CheckCoords][2]))
        {
        for(new 
0MAX_GZS++)
        {
            if(
GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i])
            {
                if(
Player[playerid][pAdmin] >= || Player[playerid][pFrente] >= || Player[playerid][pBOPE] >= || Player[playerid][pPMRJ] >= || Player[playerid][pCORE] >= 4)
                {
                    if(
ContagemDominio[i] != 0)
                        return 
true;
                    if((
strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 10 || (strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 11 ||
                       (
strcmp(GZDono[i], "PM"true) == 0) && Player[playerid][pCORE] >= || (strcmp(GZDono[i], "BOPE"true) == 0) && Player[playerid][pBOPE] >= || (strcmp(GZDono[i], "PMRJ"true) == 0) && Player[playerid][pPMRJ] >= 1)
                    return 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Estб favela jб й da sua facзгo!");
                    
ChecksDominio[i] = SetPlayerCheckpoint(playeridGangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], 4.0);
                    
SetPVarInt(playerid"GZAtacada"i);
                    
ContagemDominio[i] = SetTimerEx("Contagem"10001"i"playerid);
                    
GangZoneFlashForAll(GangZonas[GetPVarInt(playerid"GZAtacada" )], GetPlayerColor(playerid));
                    
SendFormattedMessageToAll(COR_INFO"[NOTICIAS] %s estб dominando a favela '%s' da '%s'."getPName(playerid), GangZone[i][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
                    return 
true;
                }
            }
            else 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Vocк nгo tem permissгo para dominar!");
        }
    }
    return 
true;
    } 
Reply
#7

Mano tentei aqui й nгo foi de novo
Reply
#8

ALGUЙM PODE ME AJUDA
Reply
#9

Veja quais sгo "printados" no console e mostre aqui caso nгo cosiga resolver isso.
PHP код:
if(newkeys KEY_SECONDARY_ATTACK
{
    print(
"chamado");

    for(new 
0MAX_GZS++) 
    {
        
printf("index: %d"i);
        if(
IsPlayerInRangeOfPoint(playerid1.5GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][playerid], GangZone[i][CheckCoords][2])) 
        {
            print(
"pickup");

            if(
GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i]) 
            {
                print(
"GetPlayerVisibleDynamicCP");
                if(
Player[playerid][pAdmin] >= || Player[playerid][pFrente] >= || Player[playerid][pBOPE] >= || Player[playerid][pPMRJ] >= || Player[playerid][pCORE] >= 4
                {
                    print(
"Verificaзгo de permissхes."); 

                    if(
ContagemDominio[i] != 0
                        return 
true
                    print(
"nгo sei que poura й essa.");

                    if((
strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || 
                       (
strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || 
                       (
strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || 
                       (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 10 || (strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 11 || 
                       (
strcmp(GZDono[i], "PM"true) == 0) && Player[playerid][pCORE] >= || (strcmp(GZDono[i], "BOPE"true) == 0) && Player[playerid][pBOPE] >= || (strcmp(GZDono[i], "PMRJ"true) == 0) && Player[playerid][pPMRJ] >= 1
                    return 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Estб favela jб й da sua facзгo!"); 
                    
                    print(
"Verificaзгo de facзгo.");

                    
ChecksDominio[i] = SetPlayerCheckpoint(playeridGangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], 4.0); 

                    
SetPVarInt(playerid"GZAtacada"i); 
                    
ContagemDominio[i] = SetTimerEx("Contagem"10001"i"playerid); 
                    
GangZoneFlashForAll(GangZonas[GetPVarInt(playerid"GZAtacada" )], GetPlayerColor(playerid)); 

                    
SendFormattedMessageToAll(COR_INFO"[NOTICIAS] %s estб dominando a favela '%s' da '%s'."getPName(playerid), GangZone[i][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]); 
                    return 
true
                } 
            }
            else 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Vocк nгo tem permissгo para dominar!"); 
        }
    } 
    return 
true;

Reply
#10

[QUOTE=SammyJ;4022301]Veja quais sгo "printados" no console e mostre aqui caso nгo cosiga resolver isso.
[php]
if(newkeys & KEY_SECONDARY_ATTACK)
{
print("chamado");

for(new i = 0; i < MAX_GZS; i ++)
{
printf("index: %d", i);
if(IsPlayerInRangeOfPoint(playerid, 1.5, GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][playerid], GangZone[i][CheckCoords][2]))
{
print("pickup");

if(GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i])
{
print("GetPlayerVisibleDynamicCP");
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pFrente] >= 1 || Player[playerid][pBOPE] >= 4 || Player[playerid][pPMRJ] >= 4 || Player[playerid][pCORE] >= 4)
{
print("Verificaзгo de permissхes.");

if(ContagemDominio[i] != 0)
return true;
print("nгo sei que poura й essa.");

if((strcmp(GZDono[i], "CMD", true) == 0) && Player[playerid][pFaccoes] == 1 || (strcmp(GZDono[i], "CMD", true) == 0) && Player[playerid][pFaccoes] == 2 || (strcmp(GZDono[i], "CMD", true) == 0) && Player[playerid][pFaccoes] == 3 ||
(strcmp(GZDono[i], "LLL", true) == 0) && Player[playerid][pFaccoes] == 4 || (strcmp(GZDono[i], "LLL", true) == 0) && Player[playerid][pFaccoes] == 5 || (strcmp(GZDono[i], "LLL", true) == 0) && Player[playerid][pFaccoes] == 6 ||
(strcmp(GZDono[i], "TD3", true) == 0) && Player[playerid][pFaccoes] == 7 || (strcmp(GZDono[i], "TD3", true) == 0) && Player[playerid][pFaccoes] == 8 || (strcmp(GZDono[i], "TD3", true) == 0) && Player[playerid][pFaccoes] == 9 ||
(strcmp(GZDono[i], "MLC", true) == 0) && Player[playerid][pFaccoes] == 10 || (strcmp(GZDono[i], "MLC", true) == 0) && Player[playerid][pFaccoes] == 11 ||
(strcmp(GZDono[i], "PM", true) == 0) && Player[playerid][pCORE] >= 1 || (strcmp(GZDono[i], "BOPE", true) == 0) && Player[playerid][pBOPE] >= 1 || (strcmp(GZDono[i], "PMRJ", true) == 0) && Player[playerid][pPMRJ] >= 1)
return SendClientMessage(playerid, COLOR_RED, ""TAG_ERRO" Estб favela jб й da sua facзгo!");

print("Verificaзгo de facзгo.");

ChecksDominio[i] = SetPlayerCheckpoint(playerid, GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], 4.0);

SetPVarInt(playerid, "GZAtacada", i);
ContagemDominio[i] = SetTimerEx("Contagem", 1000, 1, "i", playerid);
GangZoneFlashForAll(GangZonas[GetPVarInt(playerid, "GZAtacada" )], GetPlayerColor(playerid));

SendFormattedMessageToAll(COR_INFO, "[NOTICIAS] %s estб dominando a favela '%s' da '%s'.", getPName(playerid), GangZone[i][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
return true;
}
}
else SendClientMessage(playerid, COLOR_RED, ""TAG_ERRO" Vocк nгo tem permissгo para dominar!");
}
}
return true;
}

Nenhum funciono vo posta meu gangzone completo


PHP код:
// -=-=-=-=-=-= GangZones =-=-=-=-=-=-
#define     MAX_GZS                 14
new ChecksDominio[MAX_GZS];
new 
GangZonas[MAX_GZS];
new 
GZDono[MAX_GZS][50] = {
    
"CMD""CMD""CMD",
    
"LLL""LLL""LLL",
    
"TD3""TD3""TD3",
    
"MLC""MLC",
    
"PM""BOPE""PMRJ"
};
new 
ContagemDominio[MAX_GZS];
enum gz_info
{
    
GZName[50],
    
GZColor,
    
Float:GZCoords[4],
    
Float:CheckCoords[3]
};
new 
GangZone[MAX_GZS][gz_info] = {
    {
"Cidade Alta",         COLOR_RED,     {-0.00.0, -0.00.0}},
    {
"Jorge Turco",         COLOR_RED,     {0.0, -0.00.0, -0.0}, {0.0,-0.0,0.0}},
    {
"Rodo",                 COLOR_RED,     {0.00.00.00.0}, {0.0,0.0,0.0}},
    {
"Vila Vintem",         COLOR_BLUE,     {0.00.00.00.0}, {0.0,0.0,0.0}},
    {
"Urubu",                  COLOR_BLUE,     {-0.00.0, -0.00.0}, {-0.0,0.0,0.0}},
    {
"Pedreira",              COLOR_BLUE,     {-0.0, -0.0, -0.0, -0.0}, {-0.0,-0.0,0.0}},
    {
"Sгo Carlos",          COLOR_YELLOW,     {-1156.111377.989, -852.48491798.393}, {-1001.0131,1495.2463,45.4512}},
    {
"Mineira",              COLOR_YELLOW,     {-840.8071366.311, -653.9611623.225}, {-757.2054,1537.5605,26.9609}},
    {
"Parada de Lucas",     COLOR_YELLOW,     {0.00.00.00.0}, {0.0,0.0,0.0}},
    {
"Bateau Mouche",          COLOR_ORANGE,     {0.0, -0.00.00.0}, {0.0,-0.0,0.0}},
    {
"Tanque",              COLOR_ORANGE,     {0.00.00.00.0}, {0.0,0.0,0.0}},
    {
"PM",      -1,     {0.0,0.0,0.0}, {0.0,0.0,0.0}},
    {
"BOPE",      -1,     {-0.0,0.0,0.0}, {0.0,0.0,0.0}},
    {
"Complexo do Alemгo",  COR_PMRJ,     {1144.432, -1004.2971599.869, -490.4708}, {1527.7274,-813.3680,71.7173}}
}; 
PHP код:
public OnGameModeInit()
{
for(new 
0MAX_GZS++)
    {
    
GangZonas[i] = GangZoneCreate(GangZone[i][GZCoords][0], GangZone[i][GZCoords][1], GangZone[i][GZCoords][2], GangZone[i][GZCoords][3]);
    
ChecksDominio[i] = CreatePickup(191321GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], -1);
    
ContagemDominio[i] = 0;
    } 
PHP код:
public OnPlayerConnect(playerid)
{
for(new 
i=0;i<MAX_GZS;i++) { GangZoneShowForPlayer(playeridGangZonas[i], GangZone[i][GZColor]); } 
PHP код:
public OnPlayerLeaveCheckpoint(playerid)
{
    for(new 
0MAX_GZS++)
    {
        if(
GetPVarInt(playerid"GZAtacada") != -1)
        {
            
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Ataque cancelado!");
            
KillTimer(ContagemDominio[GetPVarInt(playerid"GZAtacada" )]);
            
ContagemDominio[GetPVarInt(playerid"GZAtacada" )] = 0;
            
GangZoneStopFlashForAll(GangZonas[GetPVarInt(playerid"GZAtacada" )]);
            
DisablePlayerCheckpoint(playerid);
            
SetPVarInt(playerid"GZAtacada", -1);
            
SetPVarInt(playerid"Tempo"0);
            return 
true;
        }
    }
    return 
true;

PHP код:
forward Contagem(playerid);
public 
Contagem(playerid)
{
    new 
string[128];
    if(
GetPVarInt(playerid,"Tempo") == 30)
    {
        if(
Player[playerid][pFaccoes] == || Player[playerid][pFaccoes] == || Player[playerid][pFaccoes] == 3) {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A facзгo 'CMD' dominou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COLOR_RED;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "CMD";
        }
        else if(
Player[playerid][pFaccoes] == || Player[playerid][pFaccoes] == || Player[playerid][pFaccoes] == 6) {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A facзгo 'LLL' dominou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COLOR_BLUE;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "LLL";
        }
        else if(
Player[playerid][pFaccoes] == || Player[playerid][pFaccoes] == || Player[playerid][pFaccoes] == 9) {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A facзгo 'TD3' dominou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COLOR_YELLOW;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "TD3";
        }
        else if(
Player[playerid][pFaccoes] == 10 || Player[playerid][pFaccoes] == 11) {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A facзгo 'MLC' dominou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COLOR_ORANGE;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "MLC";
        }
        else if(
Player[playerid][pCORE] >= 1)
        {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A 'CORE' pacificou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_CORE;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "CORE";
        }
        else if(
Player[playerid][pBOPE] >= 1)
        {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A 'BOPE' pacificou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_BOPE;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "BOPE";
        }
        else if(
Player[playerid][pPMRJ] >= 1)
        {
            
SendFormattedMessageToAll(COR_INFO"[GF - NOTICIAS] A 'PMRJ' pacificou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_PMRJ;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "PMRJ";
        }
        
GivePlayerMoney(playerid10000);
        
GangZoneHideForAll(GangZonas[GetPVarInt(playerid,"GZAtacada")]);
        
GangZoneShowForAll(GangZonas[GetPVarInt(playerid,"GZAtacada")], GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor]);
        
KillTimer(ContagemDominio[GetPVarInt(playerid,"GZAtacada")]);
        
ContagemDominio[GetPVarInt(playerid,"GZAtacada")] = 0;
        
SetPVarInt(playerid,"GZAtacada",-1);
        
SetPVarInt(playerid,"Tempo",0);
        return 
1;
    }
    else
    {
        
SetPVarInt(playerid,"Tempo",GetPVarInt(playerid,"Tempo")+1);
        
format(string,sizeof(string),"~w~%i / ~r~30"GetPVarInt(playerid,"Tempo"));
        
GameTextForPlayer(playeridstring25003);
    }
    return 
1;

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
if(
newkeys KEY_SECONDARY_ATTACK)
    {
    print(
"chamado");
    for(new 
0MAX_GZS++)
    {
        
printf("index: %d"i);
        if(
IsPlayerInRangeOfPoint(playerid1.5GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][playerid], GangZone[i][CheckCoords][2]))
        {
            print(
"pickup");
            if(
GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i])
            {
                print(
"GetPlayerVisibleDynamicCP");
                if(
Player[playerid][pAdmin] >= || Player[playerid][pFrente] >= || Player[playerid][pBOPE] >= || Player[playerid][pPMRJ] >= || Player[playerid][pCORE] >= 4)
                {
                    print(
"Verificaзгo de permissхes.");
                    if(
ContagemDominio[i] != 0)
                        return 
true;
                    print(
"nгo sei que poura й essa.");
                    if((
strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "CMD"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "LLL"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == || (strcmp(GZDono[i], "TD3"true) == 0) && Player[playerid][pFaccoes] == ||
                       (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 10 || (strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][pFaccoes] == 11 ||
                       (
strcmp(GZDono[i], "PM"true) == 0) && Player[playerid][pCORE] >= || (strcmp(GZDono[i], "BOPE"true) == 0) && Player[playerid][pBOPE] >= || (strcmp(GZDono[i], "PMRJ"true) == 0) && Player[playerid][pPMRJ] >= 1)
                    return 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Estб favela jб й da sua facзгo!");
                    print(
"Verificaзгo de facзгo.");
                    
ChecksDominio[i] = SetPlayerCheckpoint(playeridGangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], 4.0);
                    
SetPVarInt(playerid"GZAtacada"i);
                    
ContagemDominio[i] = SetTimerEx("Contagem"10001"i"playerid);
                    
GangZoneFlashForAll(GangZonas[GetPVarInt(playerid"GZAtacada" )], GetPlayerColor(playerid));
                    
SendFormattedMessageToAll(COR_INFO"[NOTICIAS] %s estб dominando a favela '%s' da '%s'."getPName(playerid), GangZone[i][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
                    return 
true;
                }
            }
            else 
SendClientMessage(playeridCOLOR_RED""TAG_ERRO" Vocк nгo tem permissгo para dominar!");
        }
    }
    return 
true;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)