AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can I edit files in the 'Half Life' directory? (https://forums.alliedmods.net/showthread.php?t=241834)

@MajnuN 06-09-2014 16:54

How can I edit files in the 'Half Life' directory?
 
for ex. - if I want to remove file from the directory.

thanks for answering.

hleV 06-09-2014 16:58

Re: How can I edit files in the 'cstrike' directory?
 
IIRC the initial directory is cstrike, so something like
PHP Code:

write_file("server.cfg", ...); 

should work.

@MajnuN 06-09-2014 16:59

Re: How can I edit files in the 'cstrike' directory?
 
Quote:

Originally Posted by hleV (Post 2149064)
IIRC the initial directory is cstrike, so something like
PHP Code:

write_file("server.cfg", ...); 

should work.

oh my bad, I mean Files in the 'Half Life' directory. (the one before 'cstrike').

fysiks 06-09-2014 17:11

Re: How can I edit files in the 'Half Life' directory?
 
You can't access beyond the mod directory from a plugin.

Black Rose 06-09-2014 17:16

Re: How can I edit files in the 'Half Life' directory?
 
../ doesn't work anymore?

fysiks 06-09-2014 17:19

Re: How can I edit files in the 'Half Life' directory?
 
Quote:

Originally Posted by Black Rose (Post 2149071)
../ doesn't work anymore?

I sure hope not. I hope it never did.

klippy 06-09-2014 17:26

Re: How can I edit files in the 'Half Life' directory?
 
Quote:

Originally Posted by fysiks (Post 2149072)
I sure hope not. I hope it never did.

Works on server-side(writing to files on server FTP), but not at client. Although, i think you can precache files that contain "../" in their path.

@MajnuN 06-09-2014 17:27

Re: How can I edit files in the 'Half Life' directory?
 
Quote:

Originally Posted by Black Rose (Post 2149071)
../ doesn't work anymore?

thanks work.

Quote:

Originally Posted by fysiks (Post 2149072)
I sure hope not. I hope it never did.

...


All times are GMT -4. The time now is 09:47.

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