-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsamp-precise-timers.inc
32 lines (27 loc) · 1.27 KB
/
samp-precise-timers.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
Author: https://github.com/bmisiak
License: GNU LESSER GENERAL PUBLIC LICENSE. Version 3, 29 June 2007
*/
/*
# SetPreciseTimer returns timer_number, or 0 on failure.
interval: miliseconds before the callback is triggered.
repeat: true/false. If false, the callback will only be called once.
# Examples:
SetPreciseTimer("EveryMinute",60000,true);
SetPreciseTimer("EverySecond",1000,true,"ds",playerid,"Hello");
new array[2] = {42,2}; SetPreciseTimer("AfterFiveSecs",5000,false,"dsaA",playerid,"world",array,sizeof(array));
*/
native SetPreciseTimer(const callback_name[], const interval, const repeat, const types_of_arguments[]="", {Float,_}:...);
/*
# ResetPreciseTimer returns timer_number, or 0 on failure.
interval: miliseconds before the callback is triggered.
repeat: true/false. If false, the callback will only be called once.
# Example:
new timer_number = SetPreciseTimer("EverySecond",1000,true,"ds",playerid,"Hello");
ResetPreciseTimer(timer_number,5000,true); // makes it run every 5 seconds instead
*/
native ResetPreciseTimer(const timer_number, const interval, const repeat);
/*
# DeletePreciseTimer returns 1 if the timer existed or 0 on failure.
*/
native DeletePreciseTimer(const timer_number);