If whole array?
#4

You can use simply

pawn Код:
stock IsPlayerNearObject(playerid, objectid, Float:range = 2.0)
{
    new Float:X, Float:Y, Float:Z;
    GetDynamicObjectPos(objectid, X, Y, Z);
    return IsPlayerInRangeOfPoint(playerid, range, X, Y, Z);
}
and whats is wrong with this?

pawn Код:
for(new i = 0; i < sizeof(myObjArray); i++)
{
    if(IsPlayerNearObject(playerid, myObjArray[i]))
    {
        ...
    }
}
if nothing near so problem is in range
Reply


Messages In This Thread
If whole array? - by Professional_Programmer - 27.03.2015, 00:31
Re: If whole array? - by Jefff - 27.03.2015, 00:34
Re: If whole array? - by Professional_Programmer - 27.03.2015, 00:42
Re: If whole array? - by Jefff - 27.03.2015, 02:50
Re: If whole array? - by Professional_Programmer - 27.03.2015, 04:12
Re: If whole array? - by Misiur - 27.03.2015, 10:35
Re: If whole array? - by Jefff - 27.03.2015, 14:52
Re: If whole array? - by Professional_Programmer - 27.03.2015, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)