14.01.2011, 13:24
You can simply do your function that would check if player is near atm:
And then use it like this:
pawn Код:
stock IsPlayerNearATM(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,[ATM1_X],[ATM1_Y],[ATM1_Z])) return 1;
if(IsPlayerInRangeOfPoint(playerid,2.0,[ATM2_X],[ATM2_Y],[ATM2_Z])) return 1;
//And so on, changing [ATM1/2_X/Y/Z] to your ATMs position
return 0;
}
pawn Код:
if(IsPlayerNearATM(playerid))
{
//My code!
}