29.12.2018, 21:50
Look, i make this:
But i have a problem... get all the debugs, it's okay. But after the timer - OneSecTimer no longer works(after he passed the 60 seconds - NewbieCount) why??
Код HTML:
function OneSecTimer() { foreach(Helpers, h) { new playerid = HelperOccupied[h]; foreach(NewbiesReports, p) { new helperid = NewbieOnHelper[p]; if(strcmp(HelperOccupied[h], NewbieOnHelper[p], true) == 0) { NewbieCount[helperid]++; printf("[DEBUG]The countdown is on %d seconds.", NewbieCount[helperid]); } if(NewbieCount[helperid] == 60 && HelperDuty[helperid] == 1 && HelperOccupied[helperid] != -1 && HaveNewbie[playerid] == 1 && NewbieOnHelper[playerid] != -1) { SCM(helperid, -1, "{5CAD5C}Time to answer to question has expired. You will get another question if one is available."); NewbieCount[helperid] = 0; HelperOccupied[helperid] = -1; NewbieOnHelper[playerid] = -1; SearchHelperTimer[playerid] = SetTimerEx("SearchHelper", 30000, false, "i", playerid); } } } print("[DEBUG]Timer works with succesfully."); return 1; }