18.02.2014, 21:43
Nгo uso em nenhum outro lugar.
Toda a CallBack:
Toda a CallBack:
pawn Код:
forward ZoneUpdate();
public ZoneUpdate()
{
for(new z=0; z < MAX_ZONES; z++)
{
if(ZoneTakeOverTeam[z] == -1)
{
for(new t=0; t < MAX_TEAMS; t++)
{
if(t == ZoneInfo[z][z_team]) continue;
if(GetMembersInZone(z, t) >= MEMBROS_DOMINAR) //numero minimo de membros para comeзar a dominar
{
ZoneTakeOverTeam[z] = t;
GangZoneFlashForAll(ZoneInfo[z][z_id], GetTeamColor(t));
ZoneTakeOverTime[z] = 0;
}
}
}
else
{
if(GetMembersInZone(z, ZoneTakeOverTeam[z]) > 0)
{
ZoneTakeOverTime[z] ++;
if(ZoneTakeOverTime[z] >= SEGUNDOS_DOMINAR) //tempo para dominar a ganzone
{
GangZoneStopFlashForAll(ZoneInfo[z][z_id]);
GangZoneShowForAll(ZoneInfo[z][z_id], GetTeamColor(ZoneTakeOverTeam[z]));
ZoneInfo[z][z_team] = ZoneTakeOverTeam[z];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerZone(i) == z && pTeam[i] == ZoneTakeOverTeam[z])
{
GameTextForPlayer(i, "~r~] ~g~Gangzone dominada ~r~] ~w~~n~~n~+1 Score~n~+5.000$", 8000, 3);
SetPlayerScore(i, GetPlayerScore(i) + 1);
GivePlayerMoney(i, 5000);
}
}
}
ZoneTakeOverTeam[z] = -1;
ZoneTakeOverTime[z] = 0;
}
}
else
{
ZoneTakeOverTeam[z] = -1;
GangZoneStopFlashForAll(ZoneInfo[z][z_id]);
ZoneTakeOverTime[z] = 0;
}
}
}
}