Raised This Month: $ Target: $400
 0% 

Mistake in log system


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 07-01-2018 , 08:45   Re: Mistake in log system
Reply With Quote #10

I changed it but still no log anywhere.

PHP Code:
#include <amxmodx>
#include <amxmisc>

new log_kontrol;
new 
bool:g_kontrol[33];

public 
plugin_init() {
    
register_plugin("log""1.0""PurposeLess");
    
    
bind_pcvar_num(create_cvar("log_kontrol""0"), log_kontrol);
    
    
register_concmd("amx_log""admin_log"ADMIN_RCON"<nick> <[0-1]>");
}

public 
client_command(id)
{
    if(
g_kontrol[id])
    {
        new 
arg[32];
        
read_argv(1argcharsmax(arg));
        
        if(
equali(arg" ") || equali(arg"") || is_str_num(arg))
        {
            
read_args(argcharsmax(arg));
            
            if(
equali(arg" ") || equali(arg"")) return;
        }
        
        new 
name[32], tarih[64];
        
get_user_name(idnamecharsmax(name));
        
get_time("addons/amxmodx/purpo_attack_log/%Y-%m-%d.log"tarihcharsmax(tarih));
        
log_to_file(tarih"[%s] - %s"namearg);
        return;
    }

    if(
log_kontrol)
    {
        new 
arg[32];
        
read_argv(1argcharsmax(arg));
        
        if(
equali(arg" ") || equali(arg"") || is_str_num(arg))
        {
            
read_args(argcharsmax(arg));
            
            if(
equali(arg" ") || equali(arg"")) return;
        }

        new 
tarih[64];
        
get_time("addons/amxmodx/purpo_attack_log/%Y-%m-%d.log"tarihcharsmax(tarih));
        
log_to_file(tariharg);  
    }
}

public 
admin_log(idlevelcid)
{
    if(!
cmd_access(idlevelcid2))
    {
        return 
PLUGIN_HANDLED;
    }
    new 
arg[32], arg2[32];
    
read_argv(1argcharsmax(arg));
    
read_argv(2arg2charsmax(arg2));
    
    new 
player cmd_target(idarg);
    if(!
player) return PLUGIN_HANDLED;
    
    switch(
str_to_num(arg2))
    {
        case 
0: { g_kontrol[player] = false;}
        case 
1: { g_kontrol[player] = true;}
    }
    
    
console_print(id"Kontrol : %s"g_kontrol[player] ? "on":"off");
    return 
PLUGIN_HANDLED;

__________________
A plugin that is needed for every server.
PHP Code:
public client_connect(id)
{
    if(
get_user_iq(id) < 80)
    {
        
server_cmd("kick #%d 'You have kicked from the server because your IQ is not high enough'"get_user_userid(id));
    }

PurposeLessx 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 12:33.


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