AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Open mapcycle.txt via fopen (https://forums.alliedmods.net/showthread.php?t=237182)

oxygen935 03-19-2014 13:48

[SOLVED]Open mapcycle.txt via fopen
 
Hey everyone,

Do anyone know how to open mapcycle.txt and read it via fopen?
I would be glad if u could help me.

With Respect,
Oxygen

Arkshine 03-19-2014 14:39

Re: Open mapcycle.txt via fopen
 
What did you try ?

Arkshine 03-19-2014 16:12

Re: Open mapcycle.txt via fopen
 
Could you stop doing that ? This is scripting section NOT suggestions/requests. Before giving some code, let's see what he tried, explaining things, then on last resort giving him a concrete example.

Black Rose 03-19-2014 17:44

Re: Open mapcycle.txt via fopen
 
Quote:

Originally Posted by Arkshine (Post 2113567)
Could you stop doing that ? This is scripting section NOT suggestions/requests. Before giving some code, let's see what he tried, explaining things, then on last resort giving him a concrete example.

Fine.

oxygen935 05-06-2014 15:19

Re: Open mapcycle.txt via fopen
 
Quote:

Originally Posted by Arkshine (Post 2113524)
What did you try ?

I am actually trying to create a MOTD where the Server's Maplist will be printed.
So, to make myself clear, the question is on how to get the cstrike dir.

After that i can do it myself.

YamiKaitou 05-06-2014 16:50

Re: Open mapcycle.txt via fopen
 
fopen("mapcycle.txt", "r");

Backstabnoob 05-07-2014 04:24

Re: Open mapcycle.txt via fopen
 
There are many threads with tutorials on how to open a file, you would have noticed if you searched and wouldn't have to start a thread.

oxygen935 05-07-2014 05:46

Re: Open mapcycle.txt via fopen
 
Quote:

Originally Posted by Backstabnoob (Post 2134739)
There are many threads with tutorials on how to open a file, you would have noticed if you searched and wouldn't have to start a thread.

Quote:

So, to make myself clear, the question is on how to get the cstrike dir.
The problem is not on how open the file, but on how to get the dir.

Btw, Thanks Yami! Problem Solved!

YamiKaitou 05-07-2014 08:21

Re: Open mapcycle.txt via fopen
 
Quote:

Originally Posted by oxygen935 (Post 2134760)
The problem is not on how open the file, but on how to get the dir.

And if you had searched, you would have seen that they all start in the root game folder (cstrike in your case)


All times are GMT -4. The time now is 05:57.

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