04.12.2009, 21:52
I think it needs to be like this.
But you may want to do like this to see if he's near any of them.
pawn Код:
if(GetDistanceToPoint(playerid,CashDispensers[0][0], CashDispensers[0][1], CashDispensers[0][2])>2)
{
SystemMessage(playerid, "You must be near a cash machine to withdraw money.");
return 1;
}
pawn Код:
for(new i; i<4; i++)
{
if(GetDistanceToPoint(playerid,CashDispensers[i][0], CashDispensers[i][1], CashDispensers[i][2])>2)
{
SystemMessage(playerid, "You must be near a cash machine to withdraw money.");
return 1;
}
}