[Pawn] YSI Logic user-incomprehension and usage - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] YSI Logic user-incomprehension and usage (/showthread.php?tid=955) |
YSI Logic user-incomprehension and usage - hastlaking - 2019-12-17 Hello Community, i have this odd incomprehension with the YSI Libraries and most-partial of the documentation is missing or not yet implemented (explanation) into github repository i might say. RE: YSI Logic user-incomprehension and usage - JustMichael - 2019-12-17 Tell us more about the parts of YSI you are having issues with? RE: YSI Logic user-incomprehension and usage - hastlaking - 2019-12-18 mainly with timers calling them once on few public callbacks and some to initialize when needed example when player the moment the are logged in RE: YSI Logic user-incomprehension and usage - JustMichael - 2019-12-18 Okay, so timers come in two forms, one being a regular timer and another being a repeater. A regular timer has a keyword associated with it called `defer` which means to delay a call to a function, now you can defer a function for n times, n being the number of milliseconds you wish to delay. An example of this would go as follows: Code: main() We than have repeatable timers. These timers run until manually stopped, and they can be stopped by using the `stop` keyword. To create a repeatable timer, you instead use the `repeat` keyword instead of the `defer` keyword. Here is an example: Code: static Timer: repeatable_timer; I hope this is enough to make you understand when to use them and how to use them. Feel free to ask anymore questions :) |