[Req] Plugins.ini check & rewrite
Hi. Someoane can help me with one code to check and rewrite plugins.ini? If the first line is not what i want, this code rewrite first line with what i want...
|
Re: [Req] Plugins.ini check & rewrite
What are you trying to do?
|
Re: [Req] Plugins.ini check & rewrite
Quote:
|
Re: [Req] Plugins.ini check & rewrite
Quote:
He means, what are you trying to achieve with it? |
Re: [Req] Plugins.ini check & rewrite
And..What's so important? too many pointless questions
|
Re: [Req] Plugins.ini check & rewrite
Quote:
|
Re: [Req] Plugins.ini check & rewrite
Quote:
The XY problem is asking about your attempted solution rather than your actual problem. That is, you are trying to solve problem X , and you think solution Y would work, but instead of asking about X when you run into trouble, you ask about Y. What is the XY problem? - Meta Stack Exchange So, we need to know what problem you are trying to solve, not how your are trying to solve. Because mostly you could pick up the wrong solution, then we would just to waist time, rather than solve your actual problem. However, you want to replace the first line of your 'plugins.ini' file? No problem. First, you will need to read/load the whole file into the computers memory. Second, you will modify your first line. Third, you will delete your current 'plugins.ini' file. Forth, your will write the contents of the computer memory, which contains the modified file you just read/load, on the file 'plugins.ini'. Mostly, a better algorithm would to just read the first line, modify it, then write it to a temp file, and then keep reading from one file and writing it on the other until it finishes. After that, just delete your 'plugins.ini' file and rename the 'temp_file.ini' to 'plugins.ini'. Easy easy, but expensive operation. Then what is the problem you are trying to solve? Using Files to write data/values(old and new file commands) (use the new functions a.k.a faster). |
Re: [Req] Plugins.ini check & rewrite
Yep, open file, read file(flag r + w) > first line, replace first line, close file, thx for tutorial.
It's easy not hard. Look, plugins.ini Code:
PLUGINSWITH THIS PLUGIN. CHECK MY FIRST LINE AND... >>> Code:
MY FIRST LINECode:
#include <amxmodx> |
Re: [Req] Plugins.ini check & rewrite
Looks like some non steam stuff for me or even backdoor. If it's your server, how would the file get changed?
|
Re: [Req] Plugins.ini check & rewrite
What backdoor? This is tutorial :))). Look here :
Code:
#include <amxmodx> |
| All times are GMT -4. The time now is 03:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.