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

counter strike 1.6 players with negative playtimes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 02-08-2011 , 15:33   counter strike 1.6 players with negative playtimes
Reply With Quote #1

Quote:
why all players on my servers marked as bots'?
Quote:
Your server reports players back with negative play times. If you fix that, you should no longer see the issue.
How do I fix this?
Gam3ronE is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 02-10-2011 , 03:05   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #2

nobody else had this problem on gametracker.com?



all real players being marked as bots is a real pain. if you look here:

http://i55.tinypic.com/358cfm1.jpg

then hlsw shows the negative player times. I thought that this was fixed by removing a few recent plugins and it was fixed after a server restart but it's not fixed anymore and has gone back to thinking that players are bots.

EDIT:

Here's the plugins I removed which I thought was the cause since they were the only change I made to my server before starting to have this problem.

Here's the first plugin:

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

#include <engine>
#include <fakemeta>

new const Plugin[] = "Bad Clients Handler"
new const Author[] = "joaquimandrade"
new const Version[]    = "1.0"

new Float:LastCommandReceivedTime[33]
new 
IsConnected[33]

new class[] = 
"badClientsHandler"
new MaxPlayers 

new Float:ThinkDelay 1.0

new CvarTimeout
new CvarTimeoutRoundStart

public plugin_init()
{
    
register_plugin(Plugin,Version,Author)
    
register_forward(FM_CmdStart,"cmdStart")
    
    
register_event("HLTV""newRound""a""1=0""2=0")
    
    
register_think(class,"handlerThink")
    
    
CvarTimeout register_cvar("badclients_timeout","5.0")
    
CvarTimeoutRoundStart register_cvar("badclients_timeout_round","3.0")
}

public 
newRound()
{
    
checkBadClients(get_pcvar_float(CvarTimeoutRoundStart))
}

public 
plugin_cfg()
{
    
MaxPlayers get_maxplayers()
        
    new 
thinker create_entity("info_target")
    
set_pev(thinker,pev_classname,class)
    
handlerThink(thinker)
}

checkBadClients(Float:timeout)
{
    for(new 
i=1;i<=MaxPlayers;i++)
    {
        if(
IsConnected[i])
        {
            if( (
get_gametime() - LastCommandReceivedTime[i]) >= timeout)
            {    
                
forceDisconnect(i)
            }
        }    
    }
}

public 
handlerThink(id)
{
    
checkBadClients(get_pcvar_float(CvarTimeout))
    
    
set_pev(id,pev_nextthink,get_gametime() + ThinkDelay)
}

forceDisconnect(id)
{
    
/*static name[32]
    static steamID[34]
    
    get_user_name(id,name,charsmax(name))
    get_user_authid(id,steamID,charsmax(steamID))
    
    log_to_file("badClientsHandler.txt","Forcing disconnect of client ^"%s<%s>^"",name,steamID)
    */
    
server_cmd("kick #%d",get_user_userid(id))
    
server_exec()
}

public 
client_putinserver(id)
{
    
IsConnected[id] = !is_user_bot(id)
    
LastCommandReceivedTime[id] = get_gametime() + 1.0
}

public 
client_disconnect(id)
{
    if(
IsConnected[id])
        
IsConnected[id] = false
}

public 
cmdStart(id,uc_handle,random_seed)
{
    
LastCommandReceivedTime[id] = get_gametime()

This is the other plugin:

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

#include <fakemeta>

#define PLUGIN    "Anti-SVC (Will See)"
#define AUTHOR    "joaquimandrade"
#define VERSION    "1.0"

new ConfigFilename[] = "svc.cfg"

new AllowedPairsNames[][] = 
{
    
"model",
    
"name",
    
"bottomcolor",
    
"_cl_autowepswitch",
    
"cl_dlmax",
    
"cl_lc",
    
"cl_lw",
    
"cl_updaterate",
    
"topcolor",
    
"_vgui_menus",
    
"_ah",
    
"rate",
    
"*sid",
    
"lang"
}

new 
AllowedPairsValueMaxLen[sizeof AllowedPairsNames] = 
{
    
50,
    
32,
    
3,
    
1,
    
4,
    
1,
    
1,
    
3,
    
3,
    
1,
    
1,
    
6,
    
30,
    
2
}

new 
Trie:AllowedPairsData

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_ClientUserInfoChanged,"infoChanged")
}

public 
plugin_cfg()
{
    new 
path[50]
    
    
get_configsdir(path,charsmax(path))
    
    
format(path,charsmax(path),"%s/%s",path,ConfigFilename)
    
    
AllowedPairsData TrieCreate()
    
    new 
file 
    
    
new line[100]
    
    if(
file_exists(path))
    {
        
file fopen(path,"r")
        
        new 
pairName[50]
        new 
pairValueMaxLenString[3]
        new 
pairValueMaxLen
        
        
while(fgets(file,line,charsmax(line)))
        {
            
parse(line,pairName,charsmax(pairName),pairValueMaxLenString,charsmax(pairValueMaxLenString))
            
            
pairValueMaxLen str_to_num(pairValueMaxLenString)
            
            
TrieSetCell(AllowedPairsData,pairName,pairValueMaxLen)
        }
    }
    else
    {
        
file fopen(path,"w")
        
        for(new 
i=0;i<sizeof AllowedPairsNames;i++)
        {
            
TrieSetCell(AllowedPairsData,AllowedPairsNames[i],AllowedPairsValueMaxLen[i])
            
formatex(line,charsmax(line),"%s %d^n",AllowedPairsNames[i],AllowedPairsValueMaxLen[i])
            
fputs(file,line)
        }
    }
    
    
fclose(file)
}


readNextPairPart(buffer[],&position,pairPart[])
{
    if(
buffer[position++])
    {
        new 

        
        
do
        {
            
pairPart[i++] = buffer[position++]
        }
        while(
buffer[position] && (buffer[position] != '\'))
            
        pairPart[i] = 0;
    }
    else
    {
        return false
    }
    
    return true
}

public infoChanged(id,buf[])
{
    static buffer[257]
    static pairName[50]
    
    copy_infokey_buffer(engfunc(EngFunc_GetInfoKeyBuffer,id),buffer,charsmax(buffer));
    
    new position 
    
    while(readNextPairPart(buffer,position,pairName))
    {
        static pairValueMaxLen
    
        if(TrieGetCell(AllowedPairsData,pairName,pairValueMaxLen))
        {
            static pairValue[50]
            
            if(readNextPairPart(buffer,position,pairValue))
            {
                if(strlen(pairValue) > pairValueMaxLen)
                {
                    /*static name[32]
                    get_user_info(id,"name",name,charsmax(name))
                    
                    static steamID[34]
                    get_user_authid(id,steamID,charsmax(steamID))
                    
                    log_amx("<^"%s^"><^"%s^"> Pair value for ^"%s^" has an invalid length. Truncating",name,steamID,pairName) 
                    */
                    pairValue[pairValueMaxLen] = 0
                    set_user_info(id,pairName,pairValue)
                    break;
                }
            }
            else
            {
                break;
            }
        }
        else
        {
            /*static name[32]
            get_user_info(id,"name",name,charsmax(name))
            
            static steamID[34]
            get_user_authid(id,steamID,charsmax(steamID))
    
            log_amx("<^"%s^"><^"%s^"> Pair name ^"%s^" is invalid. Clearing",name,steamID,pairName)
            */
            set_user_info(id,pairName,"")
            break;
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1031\\ f0\\ fs16 \n\\ par }
*/ 
and the cfg for that last plugin:

PHP Code:
model 50
name 32
bottomcolor 3
_cl_autowepswitch 1
cl_dlmax 4
cl_lc 1
cl_lw 1
cl_updaterate 3
topcolor 3
_vgui_menus 1
_ah 1
rate 6
*sid 30
lang 2 
Hopefully someone can help me out here, I really need to get this fixed because I work so hard on the server, having such a good rank on a place like gametracker is pretty rewarding.

Last edited by Gam3ronE; 02-10-2011 at 15:12.
Gam3ronE is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 02-12-2011 , 20:29   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #3

Solved.

Last edited by Gam3ronE; 04-12-2012 at 17:35. Reason: Solved.
Gam3ronE is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 02-12-2011 , 21:58   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #4

Go Buy a Copy of Counter-Strike, or Download steam, its free.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
WaSaAa1
Senior Member
Join Date: Dec 2011
Location: Andalusia (Spain)
Old 02-24-2013 , 18:03   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #5

how to fix negative playtime?
WaSaAa1 is offline
WaSaAa1
Senior Member
Join Date: Dec 2011
Location: Andalusia (Spain)
Old 02-25-2013 , 05:10   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #6

is just steam and consequently are the players steam happens.

PS: Occurred after a power outage, but the server keeps your time well.

Last edited by WaSaAa1; 02-25-2013 at 05:20. Reason: PS: Occurred after a power outage, but the server keeps your time well.
WaSaAa1 is offline
WaSaAa1
Senior Member
Join Date: Dec 2011
Location: Andalusia (Spain)
Old 02-25-2013 , 07:32   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #7

solved, is simply just need to change the time on linux and restart the server. LOL
WaSaAa1 is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 02-25-2013 , 09:05   Re: counter strike 1.6 players with negative playtimes
Reply With Quote #8

Quote:
Originally Posted by Gam3ronE View Post
Solved.
Ya, solved and banned.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo 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 01:36.


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