SA-MP Forums Archive
timer problem - 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 (/showthread.php?tid=352675)



timer problem - peterory - 20.06.2012

i use
Код:
diaoxue = SetTimer("kouxue2",5000,1);
but it not start the timer
forward kouxue2();
Код:
	public kouxue2()
	{
	printf("a");
	new Float:HP;
	foreach(Player,i)
	{
	GetPlayerHealth(i,HP);
	SetPlayerHealth(i,HP - 2);
	if(DEBUG == 1){ printf("HP(6) %d",i); return 1; }
	}
	return 1;
	}
and the OnPlayerUpdate too
Код:
if(fengbao != 0)
	{
	if(anquan[playerid] != 1)
	{
	GetPlayerHealth(playerid,HP);
	SetPlayerHealth(playerid,HP - 1);
	if(DEBUG == 1){ printf("HP(4) %d",playerid); }
	}
	}
i use more than 20 timer
but something timer work ......


Re: timer problem - JAMMIEISFTW - 20.06.2012

1) i cant understand what you are saying your problem is.

2) use SetTimerEx

:@@@@@@@@
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 30 seconds.