30.06.2012, 00:11
Tenta:
pawn Код:
//topo do gm
new recebeuArFav[MAX_PLAYERS];
//substitui a public por essa
public Arenas() // << assumindo que vocк usa um timer pra ficar verificando toda hora, aqui nгo precisa de "playerid" pois vc usa um for ali abaixo.
{
for (new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInPlace(i, 2016.010986, -1161.922363, 2324.010986, -923.51831))
{
DMLiberado[i] = 1;
InFavela[i] = 1;
if(InFavela[i] == 1 && recebeuArFav[i] != 1)
{
TextDrawShowForPlayer(i, Textdrawfavela);
SendClientMessage(i, 0x408080FF,"Vocк entrou na favela e ganhou armas!");
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 28, 99999);
GivePlayerWeapon(i, 26, 99999);
GivePlayerWeapon(i, 24, 99999);
GivePlayerWeapon(i, 31, 99999);
GivePlayerWeapon(i, 31, 99999);
GivePlayerWeapon(i, 9, 99999);
recebeuArFav[i] = 1;
}
GangZoneFlashForAll(favela, 0xFFDFE6AA);
}
else if(DMLiberado[i] == 1)
{
DMLiberado[i] = 0;
InFavela[i] = 0;
recebeuArFav[i] = 0;
ResetPlayerWeapons(i);
TextDrawHideForPlayer(i, Textdrawfavela);
GangZoneStopFlashForAll(favela);
}
}
}
return 1;
}