Forum

> > CS2D > General > Global saves
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Global saves

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Global saves

mrc
User Off Offline

Zitieren
I finished my Competitive script and I need to know if it's possible to make global saves. I have a VPS in North America and Europe, I would like to sync data (player stats/saves) between them. Is possible? Anybody can help me? They're both Linux (cmd).

IMG:https://i.postimg.cc/yYjP4LbH/download.png


IMG:https://cdn.discordapp.com/attachments/532962875619409920/558809398860840982/unknown.png
4× editiert, zuletzt 23.03.19 06:15:26

alt Re: Global saves

DC
Admin Off Offline

Zitieren
I can't think of a super clever way to do this directly with CS2D alone. There is cs2d lua cmd reqhttp which could be used for communication with a webserver to exchange data but it might lead to lags.

When I had to do this I would probably use a third party application (or write one myself) which synchronizes data between the servers and which stores the data on local files.
All you would have to do in CS2D then is reading the data periodically. Like once every minute or something like that. And of course you would have to write new/changed data to files as well.

There are certainly applications already which can be used to send/synchronize files.

alt Re: Global saves

mrc
User Off Offline

Zitieren
Hmm, it seems hard to do (for me). I'll make the saves regional then.Thanks anyway.

alt Re: Global saves

Starkkz
Moderator Off Offline

Zitieren
@user DC: I haven't tested it, but does CS2D freeze when you call that function from Lua?

alt Re: Global saves

DC
Admin Off Offline

Zitieren
How else would you call it? It's a Lua function
Also I didn't say that it freezes. I said it MIGHT lead to lags.

Maybe it only is a problem when you call it too often/frequently.
Clients use the same stuff for avatar download etc and that only caused lags for some people and for most it is okay when we don't run multiple parallel requests at the same time. Requesting a script / plain text is probably even less heavy and causes less lag.

alt Re: Global saves

Quattro
GAME BANNED Off Offline

Zitieren
@user Hajt:
The guy can not write a script to assign random 5 numbers to teams and you tell him to write a simple php script, store data on mysql and use httpdata
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht