22.05.2018, 01:12
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:
Code estб certinho:
PHP код:
for(new i = 0; i < MAX_GZS; i ++)
{
GangZonas[i] = GangZoneCreate(GangZone[i][GZCoords][0], GangZone[i][GZCoords][1], GangZone[i][GZCoords][2], GangZone[i][GZCoords][3]);
ChecksDominio[i] = CreatePickup(19132, 1, GangZone[i][CheckCoords][0], GangZone[i][CheckCoords][1], GangZone[i][CheckCoords][2], -1);
ContagemDominio[i] = 0;
}
PHP код:
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, GangZone[playerid][CheckCoords][0], GangZone[playerid][CheckCoords][playerid], GangZone[playerid][CheckCoords][2]))
{
for(new i = 0; i < MAX_GZS; i ++)
{
if(GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i])
{
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pFrente] >= 1 || Player[playerid][pBOPE] >= 4 || Player[playerid][pPMRJ] >= 4 || Player[playerid][pCORE] >= 4)
{
if(ContagemDominio[i] != 0)
return true;
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!");
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;
}