Forum

> > CS2D > Scripts > Update GFX from the server in the player client
Forums overviewCS2D overview Scripts overviewLog in to reply

English Update GFX from the server in the player client

4 replies
To the start Previous 1 Next To the start

old Update GFX from the server in the player client

Nknz1
User Off Offline

Quote
How can I update or remove the gfxs in the player client?
I updated a file in gfx but kept it with the same name.
When the player enters the server he continues to use the old one.
How can I force the player to "refresh" the gfx folder?

old Re: Update GFX from the server in the player client

Kolia_rus
Security Supporter Off Offline

Quote
Use unique paths and names for files, i.e. /gfx/yourfile.png becomes /gfx/de_yourmap/yourfile_v1.png, or /gfx/yourscriptname/yourfile_v1.png. Thus, it won't be confused with a different file of the same name that may be used on other maps; you'll be able to keep updating your files (don't forget to increment the version number on each update), and your players will download their latest version.

On the contrary, this would lead to your players having old versions of your files that waste the space. But the hogging is negligible, and people will also be able to launch old versions of your maps locally.

old Re: Update GFX from the server in the player client

WatPz
User On Online

Quote
you can put files into the mods, and update its version

for example:
1. put a file in "mods/gfx/serverAdvertisement/ad1.png"
2. use image or serverinfo.xml, so players can see it
3. when you need update the file, replace it and update its version
4. when players join the sv again, they will download the new file.
(ps: in order to prevent network jam, you can sort different files into different mods)

old Re: Update GFX from the server in the player client

Mami Tomoe
User Off Offline

Quote
@user Marcell:
What???
That would require you to know which image you'd want to use in the future as you can't update an existing image.

CS2D has no reliable way to force someone to update a resource (image/sound).
Only maps are checked.
Therefore, either rename the file (the casual way), or use a checksum check on the file (more advanced, requires good knowledge in Lua).
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview