AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Setinfo? (https://forums.alliedmods.net/showthread.php?t=226395)

HLM 09-17-2013 10:10

Setinfo?
 
I am trying to save information for when a client goes from one server to another, certain functions would work as expected (temp admin on multiple servers without a vault/sql) to help prevent people from understanding what the info is, I set the info on all clients in the following manner:
Code:

#.##########
0.UNIXEPOCHTIME
1.UNIXEPOCHTIME

I need some way to track the time, but after doing this, I would get "Info string length exceeded" so I changed it to test some the maximum length, but even 3 characters fails to work, I am at a loss here, has valve changed it so you cannot set userinfo?

Here is the code I am testing:
PHP Code:

#include <amxmodx>


public plugin_init()
{

    
register_plugin("Setinfo Test""0.0.1""Master")
    
register_clcmd("say !time""systime")
    
}

public 
client_connect(id)
{
    new 
retrun[33]
    
get_user_info(id"_esn"retrun33)
    new 
banned[1], bantime[32]
    
strtok(retrun,banned,1,bantime,31,'.')
    new 
params[2]
    
params[0] = id
    
    
if(equali(banned"1"))
    {
        new 
compare_time str_to_num(bantime)
        
server_print("%s = %d ?>? %d",bantime,compare_timeget_systime())
        if(
compare_time get_systime())
            
client_cmd(id"disconnect")
        else
            
set_task(5.0,"clockset",51515151,params,2)
        
server_print("Found a user with flag as %d")
    }
    else
        
set_task(5.0,"clockset",51515151,params,2)
}

public 
systime(id)
    
client_print(idprint_chat"%d"get_systime())
    
public 
clockset(params[])
{
    new 
fm_time[33]
    
format(fm_time32"0.%d",get_systime())
    new 
id params[0]
    
//set_user_info(id, "_esn", fm_time)
    //client_cmd(id, "setinfo _esn ^"%s^"",fm_time)
    
client_cmd(id"setinfo _esn ^"1.1^"")
    
set_user_info(id"_esn""1.1")
    
server_print("Set Info for %d as %s",id,fm_time)
    
set_task(5.0,"clockset",51515151,params,2)




All times are GMT -4. The time now is 19:05.

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