19.05.2013, 18:29
O BUG ИO SEGUINTE : MESMO EU ESTANDO DENTRO DO TERRITORIO ELE NВO DOMINA DIZ QUE ESTOU FORA DO TERRITORIO, И NO IsPlayerInMata
Formato : MinX , MinY, MaxX, MaxY
Alguem ai pode me ajudar??
[COLOR="rgb(255, 140, 0)"]Fiz isso baseado neste tutorial :https://sampforum.blast.hk/showthread.php?tid=279168[/COLOR]
pawn Код:
if(PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23)// FARC
{
if(IsPlayerInMata(playerid))
{
if(Dominando[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
return true;
}
if(GuerranoMata == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
return true;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s e a FARC estгo dominando a Mata!",playername);
SendClientMessageToAll(COR_FARC, string);
SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, os Terroristas Foram Avisados!");
SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area .");
GangZoneFlashForAll(GZMata,COR_FARC);
Dominando[playerid] = 1;
ProvocoMata[playerid] = 1;
GuerranoMata = 1;
TempoGuerraMata = SetTimerEx("GuerraMata", 60000, 0, "i", playerid);
return true;
}
else
{
SendClientMessage(playerid, COR_EXE, "Vocк nгo estб em nenhum territуrio!");
}
return true;
}
Codigo do IsPlayerInMata
pawn Код:
stock IsPlayerInMata(playerid){new Float:x,Float:y,Float:z;GetPlayerPos(playerid, x, y, z);if(x >= -641.8458 && y >= -2062.1047 && x <= -803.8917 && y <= -1927.3007) return true;else return 0;}
[COLOR="rgb(255, 140, 0)"]GZMata[/COLOR]
pawn Код:
GZMata = GangZoneCreate(-641.8458,-2062.1047,-803.8917,-1927.3007);
[COLOR="rgb(255, 140, 0)"]Fiz isso baseado neste tutorial :https://sampforum.blast.hk/showthread.php?tid=279168[/COLOR]