Forum
CS2D Scripts image when joinimage when join
17 replies 1
edited 1×, last 29.05.19 12:43:17 pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
img = image("gfx/747.bmp",0,1,2) imagepos(img,240,240,0) imagealpha(img,0) addhook("join","yey") function yey(id) tween_alpha(img,1500,1) freetimer("woosh") timer(2500,"woosh") end function woosh() tween_alpha(img,1500,0) end
Works as following. A person joins, image appears out of nowhere, stays for a second, then disappears again. If a player joins within that time, it looks like it's appearing again.
edited 1×, last 12.07.14 10:58:29 pm
1
lua yey()
// Ok. It DID work but only after the first person joined. No idea why. I added id parameter to the hook function and now it works perfectly (tested). Why the hell do I need id argument if I'm not using it..? No idea. Well whatever.
example:
1. CS2D is finding hook (join).
2. CS2D found hook (join).
3. CS2D is sending parameters to function of hook.
4. SCRIPT calls the function.
function myJoin(id) 	msg2(id,"Hello, this message see only you because your id is "..id) end addhook("join","myJoin")
1. I have script welcome message with addhock (join)
2. Now i add this script with image which have too addhock (join)
SO this script's do not inferfere togheter?
NEXT: about my little know, i check log's and i dont see 2x adding function x to hook "join", so i use hook fix (some lua) and restart so now i saw 2x adding function x to hook join. Now propably should to work but my reason is this script image when join dont work with any hud txt on server. Anyway THANK U Raining for U time, big beer for u from poland ! ! !
edited 1×, last 12.07.14 11:58:18 pm
Im a little sad, i making this all day, what do u think about it ? This is what u mean about tottaly black?
addhook("join","yey")
to:
addhook("join","yey",13)
Try to check it with any script with hudtxt sv_name
1