Forum

> > CS2D > Scripts > Script cigarette and sleep
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script cigarette and sleep

5 replies
To the start Previous 1 Next To the start

old Script cigarette and sleep

_Lima_
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("say","cigara") 
function cigara(id, txt) 
     if(txt=="!cigarette") or (txt=="!cig") then
			parse("sethealth " .. id .. " " .. player(id, "health") - 2)
			local x = player(id, "x") + math.sin(math.rad(player(id, "rot"))) * 16
			local y = player(id, "y") - math.cos(math.rad(player(id, "rot"))) * 16
			parse("effect \"smoke\" " .. x .. " " .. y .. " 10 30")
			parse("effect \"smoke\" " .. x .. " " .. y .. " 10 30")
			parse("effect \"smoke\" " .. x .. " " .. y .. " 10 30")
			parse("effect \"smoke\" " .. x .. " " .. y .. " 10 30")
			parse("effect \"smoke\" " .. x .. " " .. y .. " 10 30")
		end
end
How to make the smoke appear every 2 seconds in 10 seconds?

1
2
3
4
5
6
addhook("say","slee") 
function slee(id, txt) 
     if(txt=="!sleep") or (txt=="!afk") then --afk xD
                 parse("flashplayer "..id.." 1000")
		end
end
How to make a player blind at 45? Help pls

old Re: Script cigarette and sleep

Rainoth
Moderator Off Offline

Quote
Quote
How to make the smoke appear every 2 seconds in 10 seconds?

cs2d lua cmd timer
Quote
How to make a player blind at 45?

45 what? Flash player continuously for 45 seconds or what?

old Re: Script cigarette and sleep

Talented Doge
User Off Offline

Quote
Quote
How to make the smoke appear every 2 seconds in 10 seconds?

1
2
3
4
5
for i = 1, 10 do
	if i % 2 == 0 then
		--smoke effect here
	end
end

old Re: Script cigarette and sleep

Rainoth
Moderator Off Offline

Quote
1
2
3
for i = 2,10,2 do
	timer(1000*i,"parse","effect \"smoke\" " .. x .. " " .. y .. " 10 30")
end
Try that for smoke. For flashing players, you didn't explain what you want to happen.

If you just want to continuously flash a player for a longer period, I'd use a white image to cover the player's screen.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview