For some reason, this plugin is not working, why?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Precache"
#define VERSION "01"
#define AUTHOR "Dev Team"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache()
{
new path[128], fh, MapName[32];
get_configsdir(path, 127);
get_mapname(MapName, sizeof MapName -1);
format(path, 127, "%s/map/%s.ini", path, MapName);
if(!file_exists(path))
return;
fh = fopen(path, "rt")
if(!fh)
return;
while(!feof(fh))
{
new Line[128];
fgets(fh, Line, sizeof Line - 1);
precache_generic(Line);
}
fclose(fh);
}
__________________