AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   use file somewhere in the computer (https://forums.alliedmods.net/showthread.php?t=199823)

m0skVi4a 11-02-2012 05:19

use file somewhere in the computer
 
Is it possible to use .txt .cfg or .ini file that is not in the server folder (cstrike dir)?
I want to make my 3 servers use one file that is somewhere in the HDD so that the 3 servers use the data in the file?
MySQL is not solution.

Sylwester 11-02-2012 05:59

Re: use file somewhere in the computer
 
If it's windows (2008, vista or newer) then you can use mklink command to create link somewhere in cstrike dir to a file located elsewhere.

m0skVi4a 11-02-2012 12:17

Re: use file somewhere in the computer
 
Can you give an example?

Sylwester 11-02-2012 13:04

Re: use file somewhere in the computer
 
example plugin using file cstrike\test.txt (writes hostname every 10 sec and displays contents with log_amx):
Spoiler


2 servers running this plugin:
Code:

H:\HLDS\hlds.exe
H:\HLDS2\hlds.exe

Create file that will be used as target for links:
Code:

H:\hlds_data\data.txt
Execute in cmd.exe:
Code:

mklink H:\HLDS\cstrike\test.txt H:\hlds_data\data.txt
mklink H:\HLDS2\cstrike\test.txt H:\hlds_data\data.txt

Now start both servers and see that plugin on both servers will write and read from H:\hlds_data\data.txt

fysiks 11-02-2012 19:25

Re: use file somewhere in the computer
 
For Linux, you would use symlink.


All times are GMT -4. The time now is 01:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.