SA-MP Forums Archive
Keep repeating - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Keep repeating (/showthread.php?tid=142521)



Keep repeating - aircombat - 18.04.2010

how to make a function keep repeating without using timer : example :

Код:
SetPlayerHealth(playerid,0.0);
how to make that function keep repeating forever??


Re: Keep repeating - ¤Adas¤ - 18.04.2010

What are you trying to do?


Re: Keep repeating - johnnyc - 18.04.2010

like to have health 0,0 all the time or what ??


Re: Keep repeating - aircombat - 18.04.2010

Quote:
Originally Posted by ¤Adas¤
What are you trying to do?
as i said keep repeating this function :
Код:
SetPlayerHealth(playerid,0.0);
so its like :
Код:
SetPlayerHealth(playerid,0.0);
Код:
SetPlayerHealth(playerid,0.0);
Код:
SetPlayerHealth(playerid,0.0);
Код:
SetPlayerHealth(playerid,0.0);
Код:
SetPlayerHealth(playerid,0.0);
Код:
SetPlayerHealth(playerid,0.0);
Код:
SetPlayerHealth(playerid,0.0);
etc..


Re: Keep repeating - ¤Adas¤ - 18.04.2010

Only timer.


Re: Keep repeating - johnnyc - 18.04.2010

Quote:
Originally Posted by ¤Adas¤
Only timer.



Re: Keep repeating - aircombat - 18.04.2010

there must be another way , like if i wanna do :

/torture (id)
i cant use timer on the "id" only with the playerid ??


Re: Keep repeating - ¤Adas¤ - 18.04.2010

AAA TORTURE!!!

Use: SetTimerEx("Kill_N_Torture", 500, true, "i", victim_id);

or st like that


Re: Keep repeating - dice7 - 18.04.2010

pawn Код:
while (1) SetPlayerHealth(playerid,0.0);
or
pawn Код:
for ( ; ; ) SetPlayerHealth(playerid,0.0);
or
pawn Код:
do {SetPlayerHealth(playerid,0.0);} while (1)
or
pawn Код:
function(playerid)
{
  SetPlayerHealth(playerid,0.0);
  function(playerid);
}
...


Re: Keep repeating - ¤Adas¤ - 18.04.2010

It is bad, because it will freeze the server!