04.04.2014, 10:38
The code is placed @OnPlayerUpdate
The code complies fine. But when i test it,The object remains there and the player who goes near the object "Ammo Box" doesn't get the Weapon.
I have no idea whats wrong. Waiting for your help thanks
pawn Код:
GetObjectPos(AmmoBox,X,Y,Z);
foreach(Player,i)
{
if(IsPlayerInRangeOfPoint(i,0.5,X,Y,Z))
{
if(team[i] == A)
{
GivePlayerWeapon(playerid,23,60);
GivePlayerWeapon(playerid,29,30);
GivePlayerWeapon(playerid,33,30);
GivePlayerWeapon(playerid,25,20);
DestroyObject(AmmoBox);
}
}
}
I have no idea whats wrong. Waiting for your help thanks