English Script cigarette and sleep

5 replies
Goto Page
To the start Previous 1 Next To the start
30.08.18 11:56:11 am
Up
LiME1516
User
Offline Off
Code:
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?

Code:
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
S.T.A.L.K.E.R. RP - https://discord.gg/SAvu9cB
30.08.18 12:07:44 pm
Up
Rainoth
Moderator
Offline Off
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?
30.08.18 12:19:03 pm
Up
LiME1516
User
Offline Off
@user Rainoth: I don `t know how to use • timer
timer(5000,"parse",'"flashplayer "..id.." 1000") do not work
S.T.A.L.K.E.R. RP - https://discord.gg/SAvu9cB
30.08.18 12:20:40 pm
Up
Talented Doge
User
Offline Off
Quote:
How to make the smoke appear every 2 seconds in 10 seconds?

Code:
1
2
3
4
5
for i = 1, 10 do
     if i % 2 == 0 then
          --smoke effect here
     end
end
Talented Doge
30.08.18 01:21:05 pm
Up
Rainoth
Moderator
Offline Off
Code:
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.
30.08.18 03:44:48 pm
Up
Cure Pikachu
User
Offline Off
Or you can use
timer(2000,"parse","effect \"smoke\" "..x.." "..y.." 10 30",5)
for that smoke.
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
To the start Previous 1 Next To the start