Raised This Month: $ Target: $400
 0% 

Natives


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Intouchable
Senior Member
Join Date: Mar 2012
Old 05-18-2012 , 09:30   Re: Natives
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
Then you just use log_to_file() with a different name every day.
PHP Code:
 new szFile[100]
 
formatex(szFilecharsmax(szFile), "%s"GetLogFileName("kick"))
 
log_amx("bb:%s"szFile)
log_to_file(szFile"[KICK] ADMININSTRATOR %s <%s> (%s) kicked player %s <%s> (%s) už %s!"clANameclAIPclASteamidclPNameclPIPclPSteamidszReason)

register_native("GetLogFileName""_GetLogFileName")


public 
_GetLogFileName(const szName[])
{
 new 
iSize ArraySize(Logs), szFile[100]
 
 for(new 
0iSizei++)
 {
  
ArrayGetString(LogsiszFilecharsmax(szFile))
  
  if(
strfind(szFileszName) != -1)
   break
 }
 return 
szName

Obtain this:
L 05/17/2012 - 16:13:04: [amx_log_natives.amxx] aa:AdminCommandsLogs/Kicks20120517
L 05/17/2012 - 16:13:04: [admincmd.amxx] bb:8ļ

It's okey working, but when getting file name obtain nonsense...

Last edited by Intouchable; 05-18-2012 at 09:31.
Intouchable is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode