English Timer

9 replies
Goto Page
To the start Previous 1 Next To the start
05.10.13 12:37:29 pm
Up
Mora_rus
User
Offline Off
Hello all
I need help.
Little code.
how make :
timer(100,setpos,id 100 100)??
Thanks you
05.10.13 12:39:50 pm
Up
MikuAuahDark
User
Offline Off
cs2d lua cmd timer version
Code:
1
timer(100,"parse","setpos "..id.." 100 100")


timerEx version
Code:
1
2
timerEx(1000,parse,1,"setpos "..id.." 100 100")     -- Without wrapper.lua
timerEx(1000,setpos,1,id,100,100)     -- With wrapper.lua
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
05.10.13 03:20:05 pm
Up
Mora_rus
User
Offline Off
Thank you so much @user MikuAuahDark:
and one...
I need know.
Someone have script like this:
admin = {xxxxxx}

addhook("say","s")
function s(id,w)
for _, usgn in ipairs(admin) do
if player(id,"usgn")==usgn then
if w=="!kick" "<id>" then
parse("kick id")
elseif w=="!banusgn" "<id>" then
it automaticaly ban usgn if i cell player id.
elseif w=="!banip" "<id>" then
it automaticaly ban ip player if i cell id

i have this lhook:
Spoiler >

i need add+ UP code in mine.
05.10.13 04:37:41 pm
Up
Dovahkin
User
Offline Off
@user MikuAuahDark: Can the timer work on msg2? like this
Code:
1
timer(1000,"msg2","????????")
IMG:http://i561.photobucket.com/albums/ss59/killerboy_04/76561198036665859.png
05.10.13 05:10:03 pm
Up
alex72super
User
Offline Off
user Dovahkin has written:
@user MikuAuahDark: Can the timer work on msg2? like this
Code:
1
timer(1000,"msg2","????????")


Gosh read FAQ (or whatever its called)

http://www.cs2d.com/help.php?luacat=timer&luacmd=timer

anyways:
Code:
1
2
3
4
timer(5000,"ikillyou")
function ikillyou()
   msg("This text is displayed 5 seconds after using timer")
end
05.10.13 05:16:20 pm
Up
useigor
User
Offline Off
I have no idea what you're talking about but i hope it will help:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
admin = {xxxx}

addhook("say","skaz")
function skaz(op,s)
     for _,usgn in pairs(admin) do
          if player(op,"usgn") == usgn then
               if string.sub(s,1,6) == "!kick " then
                    parse("kick "..(string.sub(s,7,string.len(s))))
               elseif string.sub(s,1,9) == "!banusgn " then
                    parse("banusgn "..(string.sub(s,10,string.len(s))))
               elseif string.sub(s,1,7) == "!banip " then
                    parse("banip "..(string.sub(s,8,string.len(s))))
               end
          end
     end
end
05.10.13 06:28:23 pm
Up
Mora_rus
User
Offline Off
Thank you @user useigor:
I got it! and i think is nothing if i use mine code in spoiler(my post) and your code?2 say hooks.
I will test it,but later.
Thanks you all

ohh my english ...sorry
06.10.13 04:02:16 am
Up
MikuAuahDark
User
Offline Off
user Dovahkin has written:
@user MikuAuahDark: Can the timer work on msg2? like this
Code:
1
timer(1000,"msg2","????????")

cs2d lua cmd msg2 needs 2 arguments, normal cs2d lua cmd timer only able to pass 1 parameter. So you may using cs2d lua cmd parse or timerEx instead.
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
06.10.13 06:09:19 am
Up
pbeloto
User
Offline Off
user Dovahkin has written:
@user MikuAuahDark: Can the timer work on msg2? like this
Code:
1
timer(1000,"msg2","????????")



use

Code:
1
timer (5000,"parse","sv_msg2 "..id.." HELO "..player(id,"name"))



All Help Example.

Spoiler >
edited 1×, last 06.10.13 06:21:51 am
06.10.13 06:29:49 am
Up
Dovahkin
User
Offline Off
Gosh. @user alex72super: I said msg2 not msg.
IMG:http://i561.photobucket.com/albums/ss59/killerboy_04/76561198036665859.png
To the start Previous 1 Next To the start