16.12.2013, 18:19
You would do something like this:
So this code searches for the nearest business that the player is from.
pawn Код:
for(new idx=1; idx<MAX_BIZ; idx++)
{
if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ])) // these are the coordinates from your business enum
{
// set player position to the interior of the business and the rest
}
}