Forum

> > CS2D > Scripts > image disappears when restarting round
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch image disappears when restarting round

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt image disappears when restarting round

cs2d_is_a_Gem
User Off Offline

Zitieren
Hello people and hello dear forum.
Today I am here in search of help, I can not make the image reappear when I restart the round.


code:
1
2
3
4
5
6
7
8
function SZ_join(i)
     usgn[i]=player(i,"usgn")
     playerip[i]=player(i,"ip")
     Status(i)
     _Load(i)
     playerrank[i]= image("<spritesheet:gfx/perfectbalance/rank.png:80:34:m>",0,0,2,i)
     imagepos(playerrank[i],51,player(i, "screenh")-450,0)
end



Thanks for the support.

alt Re: image disappears when restarting round

Jaller94
User Off Offline

Zitieren
Is join the correct hook to use for displaying a rank?
What happens if the user ranks up? Will a new image be loaded?
You could check if the image for that rank is already loaded.

A map change restarts the lua engine. Everything will have to be reloaded and initialized. I am not sure if you get a "join" event for existing connections on a map change - probably not.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht