Despawning object.
#4

pawn Код:
new a,b;
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 1.0, 1207.0170, -1333.9816, 13.3984))
    {
       if(!IsValidObject(a)) a=CreateObject(18646, 1207.5631, -1334.1051, 13.5816);
       if(!IsValidObject(b)) b=CreateObject(18646, 1206.5031, -1334.1051, 13.5816);
    }
    else
    {
      if(IsValidObject(a)) DestroyObject(a);
      if(IsValidObject(b)) DestroyObject(b);
    }
    return 1;
}
this is just a fix for your code
if ANY player IS NOT near that point ,it will destroy the object for all.
Reply


Messages In This Thread
Checking if player is armed. - by Sam5513 - 24.08.2012, 16:42
Re: Despawning object. - by RedJohn - 24.08.2012, 17:10
Re: Despawning object. - by Sam5513 - 24.08.2012, 17:23
Re: Despawning object. - by HuSs3n - 24.08.2012, 17:28
Re: Despawning object. - by Shetch - 24.08.2012, 17:31
Re: Despawning object. - by Sam5513 - 24.08.2012, 17:40
Re: Despawning object. - by Sam5513 - 24.08.2012, 17:42
Re: Despawning object. - by Sam5513 - 24.08.2012, 19:17

Forum Jump:


Users browsing this thread: 1 Guest(s)