Forum

> > CS2D > Scripts > Image when joining
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Image when joining

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Image when joining

KoJKa
BANNED Off Offline

Zitieren
Why when I join my server with second cs2d, image is not shown?

1
2
3
4
5
6
plr_image = {}

addhook("join","image_j")
function image_j(id)
	plr_image[id] = image("gfx/blood.bmp",0,0,2,id)
end

alt Re: Image when joining

Gripex
User Off Offline

Zitieren
user KoJKa hat geschrieben
Why when I join my server with second cs2d, image is not shown?

1
2
3
4
5
6
plr_image = {}

addhook("join","image_j")
function image_j(id)
	plr_image[id] = image("gfx/blood.bmp",0,0,2,id)
end


There is no mistake here you gave x and y 0 so you may not see the pic try and as @user Cure Pikachu: said check out the image path.

alt Re: Image when joining

Scott
BANNED Off Offline

Zitieren
something like that?

1
2
3
4
5
6
7
8
9
addhook("join","image_j")
function image_j()
     HUDImage = image('gfx/blood.bmp', 320, 170, 2)
     timer(1000, "hideHUDImage", nil, 1)
end

function hideHUDImage()
    tween_alpha(HUDImage, 1000, 0) -- 0: invisible @ 1: visible
end

alt Re: Image when joining

KoJKa
BANNED Off Offline

Zitieren
On first cs2d(where server launched), I see the image, but when i joined on server from second cs2d, I don't see the image.
I think it`s problem in hook, no?
I can fix it if create timer.

alt Re: Image when joining

Cure Pikachu
User Off Offline

Zitieren
@user KoJKa: And here I told you to check if said image exists on the client. And if it doesn't, read this:
cs2d lua cmd image hat geschrieben
Attention: Missing images are not always transferred over the internet and you can never be sure that all clients/players actually accept and see all those images! Use the file sys/servertransfer.lst to add custom images to the transfer list (this still doesn't ensure that everyone will receive those images but it will work in most cases)

That means you add this line to your server's *CS2D root*\sys\servertransfer.lst file:
gfx/blood.bmp

alt Re: Image when joining

Gaios
Reviewer Off Offline

Zitieren
user Gaios hat geschrieben
You can't show images at dedicated server via cs2d lua hook join. You can use cs2d lua hook team instead or kill user DC.

Can you even read my post guys?! I'm old user here and this is the problem!

alt Re: Image when joining

Masea
Super User Off Offline

Zitieren
Pretty much what user Gaios said.

Besides, if that image will not be changed and will stay throughout whole game as is for specific players, then you could simply add the image function outside of hooks. This way it'd work more correct than ever and for all players.
1
local img = image('gfx/blood.bmp', 320, 170, 2)
That's all about it. Just delete your all other images, and put it to out of hooks and see what happens.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht