03.09.2016, 23:16
Heya, this is from a bank system im creating, is there a way to make the for & pos var checking shorter somehow ?
PHP код:
CMD:deposit(playerid, params[])
{
#if REQUIRE_POSITION == 1
new pos;
for(new i = 0; i < MAX_ATMs; i++) if(IsPlayerInRangeOfPoint(playerid, 3, ATMInfo[i][xPos], ATMInfo[i][yPos], ATMInfo[i][zPos])) pos = 1;
if(!pos) return SendClientMessage(playerid, -1, "You must be near an ATM to perform this command.");
#endif
return 1;
}