TimerFix

Započeo BitchLasagnazz, Jul 06, 2019, 11:22:29 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Ime plugina: Timer Fix
Da li ste vi napravili plugin: njok
Ime kreatora: KashCherry
Opis(obavezno): Plugin cini tajmere preciznijim
NATIVE
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); 


PRIMER

#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();  
} 

Download(obavezno mediafire/sendspace link): https://github.com/KashCherry/Timer-Fix-plugin/releases]
Poslednja Izmena: Jul 06, 2019, 15:36:53 POSLE PODNE od Mister Naithan
Pasting code from the Internet into production code is like chewing gum found in the street.

Also known as:Marshall Bleach Newton




Dodao si slovo b na kraj linka, obrisi ga jer ce misliti da ne radi :D

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


Pasting code from the Internet into production code is like chewing gum found in the street.

Also known as:Marshall Bleach Newton





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

Mnogo imaš ti još da jedeš kačamak.
skrr
Moj tutorijali: Bazilion indent warninga
WORK? : Smart Project 1.2 , Leskovacki Detmec, Rodjendanski  server


Penzionisani balkanski samp kripter


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
Pasting code from the Internet into production code is like chewing gum found in the street.

Also known as:Marshall Bleach Newton