English Timer Extra function(timerEx) v4.0 icon

15 comments
05.06.13 04:13:16 am
like 12 like it!
2 kb, 622 Downloads
MikuAuahDark
User
Offline Off
Timer Extra/Extended function(timerEx) by user MikuAuahDark

I have no plans on updating this anymore. Consider timerEx 2020 which can be found here!

∗ Description ∗
This Lua Script just create new function that extends normal cs2d lua cmd timer function

∗ Features ∗
• Simply it's better than normal cs2d lua cmd timer •
• > No more timer issue like number to string
• > Multi arguments, not like normal timer that only allow 1 parameter(it must use cs2d cmd lua to execute more parameter and allow all types of value)
• > No limitations on value type(normal timer only allow number and string, timerEx allow to use all type available on Lua)
• > Fast enough
• > Allow to use function address instead of name
• > Also allow function inside table called via string
• > Able to handle returned values by called function

∗ How to Install ∗
You should know it. Well if you not know it click spoiler below
∗ How to Install ∗ >


∗ Reserved Global Variables ∗
> __timerArg
> timerEx
> freetimerEx

∗ Data ∗
> Hooks: 0
> Lines: 44
> Important Function: timerEx, freetimerEx

∗ Functions ∗
> timerEx(miliseconds(number),function(string/function),count(number),addtional arguments)
• Parameters:
• - miliseconds, delay of timer
• - function, function to be executed. It can be function name or function address
• - count, how many times to be executed(nil=1)
• - addtional arguments, argument that needed for the function "function"
• ∗ Returns: ID of the timer(can be used for freetimerEx)(number)
• Example:
Code:
1
2
timerid=timerEx(1000,"setpos",1,5,0x4552,0x5a41)
tmp=timerEx(1000,print,5,"EverySeconds")

> freetimerEx(timerid(number))
• Parameters:
• - timerid, id of the timer that want to be terminated
• ∗ Returns: true if timer successfully terminated, false otherwise(timerid not exist)(boolean)
• Example:
Code:
1
2
3
4
5
if freetimerEx(timerid) then
     print("Timer successfully terminated")
else
     print("Failed to terminate timer")
end


∗ Limitations ∗
• Returned values only handled if "count" is more than 1

∗ Rules ∗
√ You can use it for your server
√ You can edit it
√ You can upload at another website, say user MikuAuahDark made it
× You can't say this is yours
× You can't upload on another website without put me on credits

∗ Notes ∗
• 1. It uses random function first then call the actual function
• 2. Tell me if there is any bugs
• 3. Picture is useless
• 4. timerEx now able to handle returned values, only when count is more than 1. The returned values is located at __timerArg[timer_id].r

∗ Version History ∗
> v4.0
ADDED timerEx now able to handle returned values(check Notes 4)
CHANGED freetimerEx also now deletes the temporary function that used by timerEx internally
> v3.0
ADDED Function inside table now call-able even using string as function(timerEx(1000,"string.char",1,169))
FIXED timerEx only call-able for 1 time(when using "count" parameter more than 1)
> v2.0
ADDED Function address compatibly
CHANGED Optimized code
> v1.0
ADDED timerEx initial release

∗ Another MikuAuahDark Scripts ∗
> file cs2d [UNUSED] Get Player Rank v1.4 (14)
> file cs2d Env_Laser v1.0 (7)
> file cs2d Weapon Hudtxt v1.0 (7)
> file cs2d Improved Badwords v2.0 (5)
edited 12×, last 19.06.20 02:56:56 pm
ok This file has been reviewed and approved by Starkkz (03.12.15 11:51:47 pm)

Comments

15 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
28.05.17 12:05:49 am
like I like it!
Up
Yates
Reviewer
Offline Off
I've used this so many times it's weird I haven't actually liked it.
05.06.16 11:13:39 pm
like I like it!
Up
Nekomata
User
Offline Off
Quite useful!
16.10.15 08:24:47 pm
Up
Skill
User
Offline Off
Why =? text document
16.10.15 07:51:01 pm
like I like it!
Up
The Smoker
User
Offline Off
Wow! Very nice!
12.06.15 03:18:29 pm
Up
Geneor
User
Offline Off
Why Timer Extra?
12.06.15 10:43:37 am
like I like it!
Up
Joni And Friends
User
Offline Off
Usefull script, i like it!
21.03.14 02:00:34 pm
Up
Cs2dTunisie
GAME BANNED
Offline Off
where i paste it ?!
29.08.13 12:05:31 am
like I like it!
Up
lucaSWAT
User
Offline Off
Problems with time anymore.
10.07.13 04:28:12 pm
like I like it!
Up
iii
User
Offline Off
very usefull
04.07.13 01:56:18 pm
like I like it!
Up
cs2dsuper
User
Offline Off
ahahah LoL
07.06.13 02:25:30 pm
like I like it!
Up
Giggity
BANNED
Offline Off
I can see that you have have put effort in this. Description has much information and this file definitely deserves a like.
06.06.13 11:39:22 pm
like I like it!
Up
Seekay
Reviewer
Offline Off
I simply like this file because of the massive informative description.

THIS is how descriptions should look like, and not like "is my scribt pls no steel k is good ".
06.06.13 10:23:40 pm
like I like it!
Up
VADemon
User
Offline Off
Good functionality, description
05.06.13 05:10:17 pm
like I like it!
Up
DryDay
User
Offline Off
its now mine
05.06.13 05:16:38 am
like I like it!
Up
sheeL
User
Offline Off
good work 5/5
To the start Previous 1 Next To the start