19.01.2011, 12:48
Isto deve resolver o seu problema:
Coloque:
Espero ter ajudado
Coloque:
pawn Код:
//No Topo do GM:
new ArmasDetector[MAX_PLAYERS][14];
new ArmasBallasDetector[MAX_PLAYERS][14];
new bool:Checado[MAX_PLAYERS];
new PlayersOnline;
//No OnGameModeInit:
SetTimer("DetectorMetais", 1000, true);
//OnPlayerConnect:
PlayersOnline++;
//No OnPlayerDisconnect:
PlayersOnline--;
//No Final do GM:
forward DetectorMetais();
public DetectorMetais()
{
for(new x = 0; x <= PlayersOnline; x++)
{
if(IsPlayerInRangeOfPoint(x, 2.0, 100.00, 200.00, 350.00))//Troque essas coordenadas pelas da porta !
{
if(Checado[x])
{
GivePlayerWeapon(playerid, weaponid, ammo);
Checado[x] = false;
}
if(GetPlayerWeapon(x) > 0)
{
for(new i = 0; i < 13; i++)
{
GetPlayerWeaponData(x, i, ArmasDetector[x][i], ArmasBallasDetector[x][i]);
if(Checado[x])
{
GivePlayerWeapon(playerid, ArmasDetector[x][i], ArmasBallasDetector[x][i]);
SendClientMessage(playerid, 0xFFFF00AA, "[INFO] Suas armas foram devolvidas !");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "[INFO] Suas armas foram retiradas pelo detector de metais !");
ResetPlayerWeapons(x);
Checado[x] = true;
}
}
}
}
}
return 1;
}
Espero ter ajudado
