Forum

> > CS2D > Scripts > image disappears when restarting round
Forums overviewCS2D overview Scripts overviewLog in to reply

English image disappears when restarting round

3 replies
To the start Previous 1 Next To the start

old image disappears when restarting round

cs2d_is_a_Gem
User Off Offline

Quote
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.

old Re: image disappears when restarting round

Jaller94
User Off Offline

Quote
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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview