Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => FilterScripte, Include, Pluginovi za SA-MP => Pluginovi za SA-MP => Temu započeo: BitchLasagnazz poslato Jul 06, 2019, 11:22:29 PRE PODNE

Naslov: TimerFix
Poruka od: BitchLasagnazz poslato Jul 06, 2019, 11:22:29 PRE PODNE
Ime plugina: Timer Fix
Da li ste vi napravili plugin: njok
Ime kreatora: KashCherry
Opis(obavezno): Plugin cini tajmere preciznijim
NATIVE
[pawn]native SetTimer(funcname[], interval, bool:repeat); 
native SetTimerEx(funcname[], interval, bool:repeat, const format[], {Float,_}:...); 
native KillTimer(const id); 
native KillAllTimers(); 
native IsValidTimer(timerid); 
native GetTimerInterval(timerid); 
native SetTimerInterval(timerid, interval);  [/pawn]

PRIMER

[pawn]#include <timerfix> 

new num = 0; 
new timer; 

main() { 
  timer = SetTimer("callback",1000,true) 


forward callback(); 
public callback() { 
  if(++num >= 5) { 
    if(IsValidTimer(timer)) KillTimer(timer); 
    SetTimerEx("callbackEx",1000,false,"d",num); 
  } 


forward callbackEx(num); 
public callbackEx(num) { 
  printf("Num: %d",num); 
  KillAllTimers(); 
}  [/pawn]
Download(obavezno mediafire/sendspace link): https://github.com/KashCherry/Timer-Fix-plugin/releases]
Naslov: Odg: TimerFix
Poruka od: PazzOnee poslato Jul 06, 2019, 11:34:15 PRE PODNE
Dodao si slovo b na kraj linka, obrisi ga jer ce misliti da ne radi :D
Naslov: Odg: TimerFix
Poruka od: BitchLasagnazz poslato Jul 06, 2019, 11:38:59 PRE PODNE
Citat: PazzOnee poslato Jul 06, 2019, 11:34:15 PRE PODNE
Dodao si slovo b na kraj linka, obrisi ga jer ce misliti da ne radi :D

Upravo tako  :(


LINKDOWNLOAD
KLIK ME! (https://github.com/KashCherry/Timer-Fix-plugin/releases)


Naslov: Odg: TimerFix
Poruka od: bunta poslato Jul 06, 2019, 14:56:21 POSLE PODNE

Something to keep in mind is this include causes PAWN to work harder; therefore, you shouldn't have loads of timers running at the same time as it will require higher CPU usage.

Znajuci balkance i9 9900x ce im malo biti xD
Naslov: Odg: TimerFix
Poruka od: BitchLasagnazz poslato Jul 06, 2019, 15:23:47 POSLE PODNE
Citat: (っâ—"â—¡â—")っ ♥ bunta ♥ poslato Jul 06, 2019, 14:56:21 POSLE PODNE
Something to keep in mind is this include causes PAWN to work harder; therefore, you shouldn't have loads of timers running at the same time as it will require higher CPU usage.

Znajuci balkance i9 9900x ce im malo biti xD

AHAHHAHAHHAHAHAHHAHAHA A BUKVALNOOO XD