SA-MP Forums Archive
Timer problem, get stuck - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timer problem, get stuck (/showthread.php?tid=655400)



Timer problem, get stuck - XStormiest - 20.06.2018

Код:
Timer:CheckPhaseParamedic()
{
    new string[256], bonus;
	foreach(Player, playerid)
	{
	    if(J_Working[playerid] == 1 && Paramedic_Phase[playerid] == 4)
	    {
	        DisablePlayerCheckpoint(playerid);
	        print("i'm here");
	        /// It won't get past this point..it just get stuck here and I don't know what is wrong with it
     		bonus = 50*(P_Character[playerid][pcIntelligence]/P_Job[playerid][pJobSkillN]);
	        format(string, sizeof(string), "Dispercerat: Caz incheiat, ai primit un bonus de $%d", bonus);
	        SendClientMessage(playerid, COLOR_WHITE, string);
	        J_Pay[playerid]+=bonus;
	        printf("i'm here:) -> salary is %d $ :)", bonus);
	        DestroyActor(Paramedic_Emergency_Actor[playerid]);
		ResolveCase(playerid, GetPVarInt(playerid, "Emergengy_case"));
		SetPVarInt(playerid, "Emergency_case", -1);
		Paramedic_Phase[playerid] = 0;
	    }
	}
	return 1;
}
I used those printf just for debug purposes.
I used a macro for Timer to be like that.
If any code needed just ask


Re: Timer problem, get stuck - XStormiest - 20.06.2018

Thank you very much, solved.
I updated foreach and now it works.