Forum

> > CS2D > Scripts > Timer
Forums overviewCS2D overview Scripts overviewLog in to reply

English Timer

9 replies
To the start Previous 1 Next To the start

old Timer

Mora
User Off Offline

Quote
Hello all
I need help.
Little code.
how make :
timer(100,setpos,id 100 100)??
Thanks you

old Re: Timer

MikuAuahDark
User Off Offline

Quote
cs2d lua cmd timer version
1
timer(100,"parse","setpos "..id.." 100 100")

timerEx version
1
2
timerEx(1000,parse,1,"setpos "..id.." 100 100")	-- Without wrapper.lua
timerEx(1000,setpos,1,id,100,100)	-- With wrapper.lua

old Re: Timer

Mora
User Off Offline

Quote
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.

old Re: Timer

useigor
User Off Offline

Quote
I have no idea what you're talking about but i hope it will help:
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

old Re: Timer

Mora
User Off Offline

Quote
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

old Re: Timer

pbeloto
User Off Offline

Quote
user Dovahkin has written
@user MikuAuahDark: Can the timer work on msg2? like this
1
timer(1000,"msg2","????????")



use

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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview