Results 1 to 10 of 10

Thread: I need help ! :D

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Private
    Join Date
    Mar 2019
    Posts
    16
    Thanks
    2
    Thanked 3 Times in 3 Posts
    I actually want to kick fakeplayers (bots) from my server, so I took a look at this thread [ https://killtube.org/showthread.php?...ke-clients-fix ]

    Now, whenever I try to put the script in sd.gsc, I got bad syntax, pls help me!!

    PHP Code:
    notifyConnecting()
    {
        
    self endon("disconnect");

        
    waittillframeend;

        if(
    isDefined(self))
        {
            
    level notify("connecting",self);
            
    setQ3Fix(); //Add this line
        
    }
        
        
    }
    setQ3Fix()
    {
        if(!
    isDefined(level.q3_fix))
            
    level.q3_fix = [];
            
        
    my_ip getIP(self);
        
        if(
    isDefined(level.q3_fix[my_ip]) && !self.data["bot"])
        {
            
    self setClientCvar("com_errorTitle""Error"); //Maybe somehow system will fail (it should'nt but we should always assume that can happens) and a real client can be kicked.
            
    self setClientCvar("com_errorMessage""IP duplicate detected"); //So let him know, what went wrong.
            
    self.kicked true;
            
    println("Warning: Kicking client with IP duplicate: "+my_ip);
            
    kick(self getEntityNumber());
            return 
    true;
        }
        
        if(!
    self.data["bot"])
            
    level.q3_fix[my_ip] = true;
            
        return 
    false;
    }
    getIP(client

        return 
    closer(430client getEntityNumber()); 
    }
    println(msg)
    {
        
    closer(200msg "\n");
    }
    Callback_PlayerDisconnect()
    {
      if(!
    isDefined(self.kicked))
          
    level.q3_fix[getIP(self)] = undefined;
      [...]

    Last edited by nerdiiii; 27th May 2019 at 09:17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •