You get index out of bounds either on iPtz or item_cost
If you can't find the error yourself only with looking at the code and you can't post more code then you should start debugging it like this:
PHP Code:
if(is_user_connected(id)) {
if(id >= sizeof iPtz)
log_amx("id value (%d) out of bounds, should be (0..%d)", id, sizeof iPtz -1)
if(get_info >= sizeof item_cost || get_info < 0)
log_amx("get_info value (%d) out of bounds, should be (0..%d)", get_info, sizeof item_cost -1)
iPtz[id] -= item_cost[get_info];
}
__________________