31.01.2015, 11:22
Use IsPlayerInRangeOfPoint in the callback.
WIKI: https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Example:
Set your range accordingly, 1.0 is appropriate though.
Also those x,y,z arrays are custom as you havent provided any code relative to those arrays.
WIKI: https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Example:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][x], HouseInfo[i][y], HouseInfo[i][z]))
{
//your code, this will run if the player is in range of the pickup
}
Also those x,y,z arrays are custom as you havent provided any code relative to those arrays.