0 Members and 1 Guest are viewing this topic.
if GetPlayerStat(Human, 'Health') <> 90 then beginDodamage(Human, 1000)
procedure AppOnIdle(Ticks: integer);begin if Ticks mod (20 * 1) = 0 then begin if Getplayerstat(Human,'Health') <> 90 then begin DoDamage(Human,1000); end; end;end;
procedure AppOnIdle(Ticks: integer);var Human: Integer;begin if Ticks mod (20 * 1) = 0 then begin if Getplayerstat(Human,'Health') <> 90 then begin DoDamage(Human,1000); end; end;end;
const:TIMER : 100 //this would mean 100 times per secondProcedure AppOnIdle(Ticks: integer);var i: integerbegin for i:=0 to TIMER do begin //...wutever you want to do Sleep(1000/TIMER); end;end;
17:50:52 50:52:88517:50:53 50:53:90917:50:54 50:54:94717:50:55 50:55:95717:50:56 50:56:98417:50:58 50:58:00017:50:59 50:59:02317:51:00 51:00:07117:51:01 51:01:11217:51:02 51:02:14217:51:02 /recompile Test (127.0.0.1)17:51:02 [*] Compiling Test -> Test.pas...17:51:02 [*] Compilation Complete.17:51:02 51:02:26717:51:03 51:03:26517:51:04 51:04:26417:51:05 51:05:26217:51:06 51:06:26117:51:07 51:07:27417:51:08 51:08:27317:51:09 51:09:27117:51:10 51:10:26917:51:11 51:11:26617:51:12 51:12:26517:51:13 51:13:263
procedure AppOnIdle(Ticks: Integer);var i: Integer;begin // a "for" loop for i := 1 to 32 do if GetPlayerStat(i, 'Active') then if GetPlayerStat(i, 'Health') <> 90 then DoDamage(i, 1000); // This will, every second, check all the active // players health, and if it's not 90, kill them. end;
(20:57:49) 04:48:702(20:57:49) 04:49:702(20:57:50) /timer 2 (127.0.0.1)(20:57:50) timer = 2(20:57:50) 04:50:702(20:57:52) 04:52:593 //<----here it kicks in(20:57:53) 04:53:093(20:57:54) 04:53:593//---cut(20:57:59) 04:59:124(20:57:59) /timer 10 (127.0.0.1)(20:57:59) timer = 10(20:57:59) 04:59:624(20:58:00) 04:00:124(20:58:00) 04:00:624(20:58:01) 04:01:124(20:58:01) 04:01:624(20:58:02) 04:02:124(20:58:02) 04:02:624(20:58:03) 04:03:124(20:58:04) 04:04:593 //<--here it kicks in(20:58:04) 04:04:702(20:58:04) 04:04:796(20:58:05) 04:04:905(20:58:05) 04:04:999(20:58:05) 04:05:093(20:58:05) 04:05:202(20:58:05) 04:05:296(20:58:05) 04:05:405(20:58:05) 04:05:499//--cut(20:58:12) /timer 100 (127.0.0.1)(20:58:12) timer = 100(20:58:12) 04:10:874(20:58:12) 04:10:968(20:58:12) 04:11:077(20:58:12) 04:11:171//-cut, now from the command window, arsse couldn't keep up with this (also SOMEWHERE (21/22 sec) in between it kicks in):04:24:093 04:24:109 //104:24:124 //204:24:124 //304:24:140 //404:24:155 //504:24:171 //604:24:171 //704:24:187 //8.. aww04:24:202 //104:24:202 //204:24:218 //304:24:234 //404:24:249 //504:24:249 //604:24:265 //704:24:280 //804:24:280 //904:24:296 //10!!! :D04:24:312