I am trying edit Ava's plugin so the new ATMS in mecklenburg work, the code i put in was
Code:
new bankposX[3] = { -2504, 680, 275 };
new bankposY[3] = { 1072,-430, -430 };
new bankposZ[3] = { -400, -345, -345 };
new bankposA[3] = { 585, -778, 292 };
new bankposB[3] = { -2135, 2642, -344 };
new bankposC[3] = { -3605, 2645, -1179 };
Code:
}
new origin[3], checkorigin[3], validpos;
get_user_origin(id,origin);
// check if player is near an ATM
for(new i=0;i<sizeof(bankposX);i++) {
checkorigin[0] = bankposX[i];
checkorigin[1] = bankposY[i];
checkorigin[2] = bankposZ[i];
checkorigin[3] = bankposA[i];
checkorigin[4] = bankposB[i];
checkorigin[5] = bankposC[i];
if(get_distance(origin,checkorigin) <= 48) {
validpos = 1;
}
}
and i get array index out of bounds which is somehow being caused by the new backposA,B and C arrays, can someone please help my problem. thanks
__________________
the shirt covered her face, she screamed and clawed, so billy stomped on the bitch until he broke in her jaw.