Forum

> > CS2D > Scripts > Update GFX from the server in the player client
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Update GFX from the server in the player client

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Update GFX from the server in the player client

Nknz1
User Off Offline

Zitieren
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?

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

Kolia_rus
Security Supporter Off Offline

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

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

WatPz
User Off Offline

Zitieren
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)

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

Mami Tomoe
User Off Offline

Zitieren
@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).
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht