PHP Code:
new i, szLogpath[64], szMapname[32], szBuffer[128]
get_mapname(szMapname, charsmax(szMapname))
get_time("%Y%m%d", szBuffer, charsmax(szBuffer))
get_localinfo("amxx_logs", szLogpath, charsmax(szLogpath))
do
{
if(i) formatex(g_szMapLogName, charsmax(g_szMapLogName), "%s/maplogs/%s_%s_%d.log", szLogpath, szMapname, szBuffer, i)
else formatex(g_szMapLogName, charsmax(g_szMapLogName), "%s/maplogs/%s_%s.log", szLogpath, szMapname, szBuffer)
i++
}
while(file_exists(g_szMapLogName))
log_to_file(g_szMapLogName, "Map Started ^"%s^"", szMapname)
What's wrong with that code? It doesn't creates the path and the logfile :/ i'm doing this code on plugin_precache, and I don't know which is the trouble..
__________________