AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP]I want to make a log plugin,but this have some problem. (https://forums.alliedmods.net/showthread.php?t=216966)

ryo89589 05-28-2013 07:02

[HELP]I want to make a log plugin,but this have some problem.
 
I want to make a plugin for log all players keybinds, when the player connected.
But I found some question on this plugin.Please help me to solve the problem.
And then,I want to know how to get player all "bind" cvars on the plugin?Thank All Very Much!!
PHP Code:

#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN_NAME "KeyBinds Logs"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "ryo89589"
 
new name[32], keybind[32]
new const 
LogFile[] = "keybind.log"
new g_LogFilePath[96]
 
public 
plugin_init()
{
 
register_plugin (PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
}
 
public 
plugin_precache()
{
 static 
logDir[64]
 
get_localinfo("amxx_logs"logDircharsmax(logDir))
 if (!
dir_exists(logDir)) mkdir(logDir)
 
format(g_LogFilePathcharsmax(g_LogFilePath), "%s/%s"logDirLogFile)
}
 
public 
client_infochanged(id)
{
 if (
is_user_connected(id) && !is_user_bot(id))
 {
  
get_user_name(idname31)
  
get_user_info(id"bind"keybind31)
 
  
log_to_file(g_LogFilePath,"[Bind Key Logs] ^"%s^" All Key Bind are %s ^n"namekeybind)
 }



wickedd 05-28-2013 09:10

Re: [HELP]I want to make a log plugin,but this have some problem.
 
Not possible.


All times are GMT -4. The time now is 16:25.

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