07.12.2015, 20:24
Alright so the problem is quite simple, it wont detect when you are near some atm
Object creation
Then later on Ive created them under gamemode init (dynamicobjects)
PHP код:
format(string,sizeof(string),"You have withdrawn %i$ into your bank account. You have %i$ in your bank now",ammount,AccInfo[playerid][BankMoney]);
for(new i = 0; i < sizeof(Atm_Object); i++) {
if(IsValidDynamicObject(i)) {
GetDynamicObjectPos(Atm_Object[i],x,y,z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x,y,z)) {
GivePlayerCash(playerid,ammount);
AccInfo[playerid][BankMoney] -= ammount;
}
}
}
SendClientMessage(playerid,COLOR_GREEN,string);
PHP код:
new Atm_Object[8];