02.12.2015, 14:44
So I got some problems & questions about File path, Im trying to basically open the file upon GameModeInit and close it later on on GameModeExit so I dont have to constantly open the file and close it. Is there a way for it?
Currently what I have it simple
Now my concern is, is there a way to get file path somehow?
I looked up at https://sampwiki.blast.hk/wiki/File_Functions but couldnt find anything related to it
Currently what I have it simple
pawn Код:
public SomeLog(LogString[]) {
new entry[128],Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
format(entry, sizeof(entry), "\r\n[%02d/%02d/%d][%02d:%02d:%02d]%s",Day,Month,Year, Hour, Minute, Second,LogString);
new File:hFile;
hFile = fopen("Logs/Admin/Login.log",io_append);
fwrite(hFile,entry);
fclose(hFile);
return true;
}
Now my concern is, is there a way to get file path somehow?
I looked up at https://sampwiki.blast.hk/wiki/File_Functions but couldnt find anything related to it