Code:
// Check if its the first time before a map change a player connects
// and if the player has already triggered the goal.
public client_authorized(id) {
new authid[32]
get_user_authid(id,authid,31)
// Loop through the array of id's
new reconnected = 0
// Check if a player who finished is coming back
for (new loopId = 1; loopId <= curId; loopId++) {
if (equali(finishContainer[loopId],authid) == 1) {
set_task(30.0, "msgToReconnect",id)
reconnected = 1
hasFinished[id] = true
}
}
if (reconnected == 0)
set_task(30.0, "msgToNewPlayer",id)
return PLUGIN_CONTINUE
}
Solved
Changed the for loop. Slot 0 of finishContainer[loopId] was empty. The for loop never reached 1. Probably something I should know with arrays, but well, i learned now.