Raised This Month: $ Target: $400
 0% 

Natives


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Intouchable
Senior Member
Join Date: Mar 2012
Old 05-18-2012 , 11:31   Re: Natives
Reply With Quote #1

Quote:
Originally Posted by Exolent[jNr] View Post
PHP Code:
 new szFile[100]
 
GetLogFileName("kick"szFilecharsmax(szFile))
 
log_amx("bb:%s"szFile)
log_to_file(szFile"[KICK] ADMININSTRATOR %s <%s> (%s) kicked player %s <%s> (%s) už %s!"clANameclAIPclASteamidclPNameclPIPclPSteamidszReason
PHP Code:
public plugin_natives()
 
register_native("GetLogFileName""_GetLogFileName")

public 
_GetLogFileName(iPlugin iParams)
{
 new 
szName[/* name size */]
 
get_string(1szNamecharsmax(szName))
 
 new 
szFile[100]
 new 
ret fnGetLogFileName(szNameszFilecharsmax(szFile))
 
 
set_string(2szFileret)
 
 return 
ret
}

fnGetLogFileName(const szName[], szOutput[], iOutputLen)
{
 new 
iSize ArraySize(Logs), szFile[100]
 
 for(new 
0iSizei++)
 {
  
ArrayGetString(LogsiszFilecharsmax(szFile))
  
  if(
strfind(szFileszName) != -1)
   return 
copy(szOutputiOutputLenszFile)
 }
 return 
0

Thanks.

Last edited by Intouchable; 05-18-2012 at 11:39.
Intouchable is offline
Reply



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