Forum
CS2D Scripts Hello I need Flash light scriptHello I need Flash light script
8 Antworten 1
Download it and install it. Then open the flashlight.lua file inside "sys/lua" with notepad or some txt editor, delete what is writed there and paste this :
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("spawn","lightz") function lightz(id) 	local light=image("gfx/sprites/light.bmp",1,1,id+200) 	imageblend(light,1) 	imagecolor(light,255,255,255) 	imagealpha(light,0.5) end
And about the player skins i can do it but it will cover some things (knife,etc) and you need to give we what skins you want.
Its on the older version read in the coments and it dont working for me , also i been maked your code into a .lua but how to active it it will be coolest if light will be actived by f2 or f3
1× editiert, zuletzt 17.06.13 19:54:25
It works
Just open flashlight.lu, delete everything and paste this :
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("serveraction","lightzas") function lightzas(id,action) 	if action == 2 		local light=image("gfx/sprites/light.bmp",1,1,id+200) 		imageblend(light,1) 		imagecolor(light,255,255,255) 		imagealpha(light,0.5) 	end end
Please verify if is installed correct
Cs2d already haves a flashlight
Admin/Mod Kommentar
§3.1 - Keine Beiträge, die gezielt beleidigen/provozieren (Flame) Sneaky hat geschrieben
Arghh , press F and boom a flashlight .....
Cs2d already haves a flashlight
Cs2d already haves a flashlight
Yes CS2D have. but only the flare will turned on when you press "F". if you tired to use it with lighting then it will crash your CS2D
This is the code. It's hooked to flashlight hook(Press <Flashlight Key>(default F))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FlashLightState={} for i=1,32 do FlashLightState[i]=0 end HasStartround=false	-- Set to true if your server would start round more than 1 times addhook("flashlight","Methane") function Methane(id,state) 	if state==1 then 		FlashLightState[id]=image("gfx/sprites/light.bmp<a>",1,0,id+100) 	else 		freeimage(FlashLightState[id]) 		FlashLightState[id]=0 	end end addhook("join","Legacy") function Legacy(id) 	FlashLightState[id]=0 end addhook("leave","Welcome") function Welcome(id) 	if FlashLightState[id]>0 then 		freeimage(FlashLightState[id]) 		FlashLightState[id]=0 	end end if HasStartround then 	addhook("startround","StartIt") 	function StartIt() 		for _, id in pairs(player(0,"table")) do 			if FlashLightState[id]>0 then 				FlashLightState[id]=image("gfx/sprites/light.bmp<a>",1,0,id+100) 			end 		end 	end end
1