View Single Post
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 01-18-2017 , 15:44   Re: Setting up anti double-accounting bot for CSGO server
Reply With Quote #9

Quote:
Originally Posted by Neuro Toxin
Quote:
Originally Posted by Lubricant Jam
Hey,
I saw your post on a thread regarding stopping smurfs and forcing show MOTD, may I ask how you do this?

https://forums.alliedmods.net/showpo...26&postcount=4

https://forums.alliedmods.net/showpo...79&postcount=6

I'd love to know, if you don't wanna say then I won't bother you no longer!

Thanks.
The basic gist is below. It's using PHP and cookies.

PHP Code:
    function CreateTrackingCookie($playerid)
    {
        if (!isset(
$_COOKIE['cookieid_v4']))
        {
            
$cookie GetCookieByPlayerId($playerid);
            if (
$cookie == '')
            {
                
$cookie CreateCookie($playerid);
                
InsertPlayerCookie($playerid$cookie);
            }
            
            
setcookie('cookieid_v4'$cookietime()+3600*24*365);
        }
        else
        {
            
$cookie $_COOKIE['cookieid_v4'];
            
$playercookie GetCookieByPlayerId($playerid);

            if (
$cookie != '' && $playercookie == '')
            {
                
InsertPlayerCookie($playerid$cookie);
            }
        }
    } 
__________________

Last edited by Neuro Toxin; 01-18-2017 at 15:45.
Neuro Toxin is offline