27.03.2015, 02:50
You can use simply
and whats is wrong with this?
if nothing near so problem is in range
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);
}
pawn Код:
for(new i = 0; i < sizeof(myObjArray); i++)
{
if(IsPlayerNearObject(playerid, myObjArray[i]))
{
...
}
}