Raised This Month: $51 Target: $400
 12% 

Setinfo?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 09-17-2013 , 10:10   Setinfo?
Reply With Quote #1

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)

__________________
+|- KARMA Respectively

HLM 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:41.


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