Files

> > CS2D > Lua Scripts > Timer Extra function(timerEx) v4.0
Files overviewCS2D overviewLua Scripts overview

English Timer Extra function(timerEx) v4.0 >

15 comments2 kb, 696 Downloads

old Timer Extra function(timerEx) v4.0

MikuAuahDark
User Off Offline

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:
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:
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
> file cs2d Env_Laser v1.0
> file cs2d Weapon Hudtxt v1.0
> file cs2d Improved Badwords v2.0
edited 12×, last 19.06.20 02:56:56 pm
Approved by Starkkz

Download Download

2 kb, 696 Downloads

Comments

15 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Yates
Reviewer Off Offline

I've used this so many times it's weird I haven't actually liked it.
I like it!

old

Nekomata
User Off Offline

Quite useful!
I like it!

old

The Smoker
User Off Offline

Wow! Very nice!
I like it!

old

Geneor
User Off Offline

Why Timer Extra?

old :/

Cs2dTunisie
GAME BANNED Off Offline

where i paste it ?!

old

lucaSWAT
User Off Offline

Problems with time anymore.
I like it!

old

iii
User Off Offline

very usefull
I like it!

old

Giggity
BANNED Off Offline

I can see that you have have put effort in this. Description has much information and this file definitely deserves a like.
I like it!

old

Seekay
Reviewer Off Offline

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 ".
I like it!

old

VADemon
User Off Offline

Good functionality, description
I like it!

old

DryDay
User Off Offline

its now mine
I like it!

old

sheeL
User Off Offline

good work 5/5
I like it!
To the start Previous 1 Next To the start