Hello. Could somene say to me, whats wrong with this part of the code?
Code:
public checkpoint(id) {
if(get_pcvar_num(kz_checkpoints) == 1) {
if(is_user_alive(id)) {
if(entity_get_int(id,EV_INT_flags)&FL_ONGROUND) {
for(new i=MAX_CPS-1;i>0;i--) {
checkpoints[id-1][i][0] = checkpoints[id-1][i-1][0]
checkpoints[id-1][i][1] = checkpoints[id-1][i-1][1]
checkpoints[id-1][i][2] = checkpoints[id-1][i-1][2]
}
new Float:origin[3]
entity_get_vector(id,EV_VEC_origin,origin)
checkpoints[id-1][0][0] = origin[0]
checkpoints[id-1][0][1] = origin[1]
checkpoints[id-1][0][2] = origin[2]
if(checkpointnum[id-1] > 0) {
//client_print(id,print_chat,"[TJ] Checkpoint no. %d created, distance to the previous one: %dm",checkpointnum[id-1]+1,floatround(get_distance_f(checkpoints[id-1][1],origin) / 20,floatround_round))
set_hudmessage(id, 138, 232, 0.03, 0.5, 0, 6.0, 3.0)
show_hudmessage(id, "Checkpoint nr. %d created",checkpointnum[id-1]+1)
} else {
set_hudmessage(id, 138, 232, 0.03, 0.5, 0, 6.0, 3.0)
show_hudmessage(id, "Checkpoint nr. 1 created")
}
checkpointnum[id-1]++
} else {
set_hudmessage(id, 138, 232, 0.03, 0.5, 0, 6.0, 3.0)
show_hudmessage(id, "You must be alive")
}
} else {
set_hudmessage(id, 138, 232, 0.03, 0.5, 0, 6.0, 3.0)
show_hudmessage(id, "Checkpoints are disabled")
}
return PLUGIN_HANDLED
}
It gives a lot of loose identitation and undefined symbol in the other parts or the plugin, but if i remove this part, it doesnt.