Results 1 to 10 of 26

Thread: Renaming bots

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Yup can confirm there is no default player.isBot function. I remember checking for this a while ago.

  2. #2
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by filthy_freak_ View Post
    Yup can confirm there is no default player.isBot function. I remember checking for this a while ago.
    I was planning on adding 'if(player isbot())' but i renamed the function to 'getAddressType'. Because you can use it for more than bots. So it is now 'if(player getAddressType() == 0)'.

    You can use 'if(isDefined(player.isbot))'. But you need to set it after creating the test client.

    PHP Code:
    ent[i] = addtestclient();
    ent[i].isbot true
    getAddressType types
    0 = NA_BOT
    1 = NA_BAD (an address lookup failed)
    2 = NA_LOOPBACK
    3 = NA_BROADCAST
    4 = NA_IP
    5 = NA_IPX (ipv6, possibly unsupported)
    6 = NA_BROADCAST_IPX
    Last edited by Mitch; 11th September 2014 at 08:54.

  3. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (11th September 2014)

  4. #3
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Mitch View Post
    You can use 'if(isDefined(player.isbot))'. But you need to set it after creating the test client.
    Yes this is what I did many months ago. No problems. Was just confirming that kung is correct.

  5. #4
    Private First Class php's Avatar
    Join Date
    Nov 2012
    Posts
    142
    Thanks
    28
    Thanked 116 Times in 59 Posts
    Or how about just hook the player/class memberfields so you can make a default player.isbot attribute.

Tags for this Thread

Posting Permissions

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