11.04.2012, 00:01
Quando dou /territorio, ao invez de dominar sу na area que ele ta, aparece que ele ta dominando as 3 gzs!
Код:
CMD:territorio(playerid, params[])
{
if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009) || IsPlayerInArea(playerid,-2553.053, 1130.577, -2313.566, 1319.935) || IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
{
if(PlayerInfo[playerid][pCV] >= 3)
{
SendClientMessage(playerid, VERDE_LIMA,"Vocк deve ficar na бrea por 30 segundos para poder dominб-la");
SetTimerEx("funcaogz", 1000, 0,"e",playerid);
return 1;
}
}
return SendClientMessage(playerid, VERDE_LIMA,"Vocк nгo й um Gerente Geral para dominiar esta favela!");
}
Код:
public funcaogz(playerid)
{
if(PlayerInfo[playerid][pCV] >= 3)
{
GetPlayerName(playerid, Jogador, sizeof(Jogador));//PEGA O NOME DO CARA QUE TБ DOMINANDO
format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Rocinha!",Jogador);//mostra a mensagem
SendClientMessageToAll(VERMELHO,Celula);//envia a msg a todos
GangZoneFlashForAll(gzada,VERMELHO);//a cor da gangzone quando ele estiver dominando
SetTimerEx("cvdominou", 30000, 0,"e",playerid);// o tempo de domнnio
}
if(PlayerInfo[playerid][pCV] >= 3)
{
GetPlayerName(playerid, Jogador, sizeof(Jogador));
format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Chatuba!",Jogador);
SendClientMessageToAll(VERMELHO,Celula);
GangZoneFlashForAll(gztcp,VERMELHO);
SetTimerEx("cvdominou", 30000, 0,"e",playerid);
}
if(PlayerInfo[playerid][pCV] >= 3)
{
GetPlayerName(playerid, Jogador, sizeof(Jogador));
format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Paraisуpolis!",Jogador);
SendClientMessageToAll(VERMELHO,Celula);
GangZoneFlashForAll(gzpcc,VERMELHO);
SetTimerEx("cvdominou", 30000, 0,"e",playerid);
}
}
Код:
public cvdominou(playerid)
{
if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))//verifica se o player estб dentro da gz
{
GangZoneStopFlashForAll(gzada);
GangZoneHideForAll(gzada);
GangZoneShowForAll(gzada,gzcv);
SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Rocinha!");
}
if(IsPlayerInArea(playerid,-2553.053, 1130.577, -2313.566, 1319.935))
{
GangZoneStopFlashForAll(gztcp);
GangZoneHideForAll(gztcp);
GangZoneShowForAll(gztcp,gzcv);
SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Chatuba!");
}
if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
{
GangZoneStopFlashForAll(gzpcc);
GangZoneHideForAll(gzpcc);
GangZoneShowForAll(gzpcc,gzcv);
SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Paraisуpolis!");
}
return 1;
}
Код:
stock IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x >= minx && y >= miny && x <= maxx && y <= maxy) return true;
else return false;
}



: