Finding a name in the .ini
I tried to do this but didn't work. With what i need help is to type /search and search for the word in the .ini list. Look what i did, but it didn't work:
PHP Code:
|
Re: Finding a name in the .ini
I've already (i think) told you it is a bad idea to search in a file during game time, it is better to cache the file content into variables (arrays, dynamic arrays) and to search in there.
|
Re: Finding a name in the .ini
|
Re: Finding a name in the .ini
On plugin_init or somewhere else read the whole .ini file and save each line into a dynamic array with ArrayPushString, then iterate through the array when someone writes /search and compare the line with your search string.
|
Re: Finding a name in the .ini
Exemple? Please?
|
Re: Finding a name in the .ini
There are tons of plugins that cache files. You can see my Bot Apology plugin for an example that uses arrays.
|
Re: Finding a name in the .ini
Ok done, now if i want to see if the word is there, how to check it? how to do that V ?
PHP Code:
|
Re: Finding a name in the .ini
Quote:
|
Re: Finding a name in the .ini
Hard to understand really, i'm not that good. I'm a beginner. Example :/ ?
|
Re: Finding a name in the .ini
But like for the menu i just do this?
PHP Code:
|
| All times are GMT -4. The time now is 10:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.