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

Bot Names Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-15-2024 , 11:50   Re: Bot Names Plugin
Reply With Quote #21

I use it daily. It works but never tested on CZ just HL OP4. It is more for security purposes and stopping the annoying number on end of names.

Only 1 recent update to expand the buffer for the NON-UTF8 *evil symbols* pranksters. https://github.com/djearthquake/amxx...ot_renamer.sma
__________________
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 01-15-2024 , 18:49   Re: Bot Names Plugin
Reply With Quote #22

Quote:
Originally Posted by DJEarthQuake View Post
I use it daily. It works but never tested on CZ just HL OP4. It is more for security purposes and stopping the annoying number on end of names.

Only 1 recent update to expand the buffer for the NON-UTF8 *evil symbols* pranksters. https://github.com/djearthquake/amxx...ot_renamer.sma
I 've just tested it again , not working but maybe i am not creating the botnames file correctly.
location and name?
Ark_Procession is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-17-2024 , 03:18   Re: Bot Names Plugin
Reply With Quote #23

It creates it's own file if there is none. That is what makes it unique. Also I just symbolic link an existing bot list to this one. I did have it on CZ for people with funny names and duplicates not what you wanted giving each and every player a funny name like the Pink Panther Detective.
__________________
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 01-17-2024 , 10:15   Re: Bot Names Plugin
Reply With Quote #24

Quote:
Originally Posted by DJEarthQuake View Post
It creates it's own file if there is none. That is what makes it unique. Also I just symbolic link an existing bot list to this one. I did have it on CZ for people with funny names and duplicates not what you wanted giving each and every player a funny name like the Pink Panther Detective.
I understand now, thanks i thought it did the same as the OciXCrom one.

Well, anyway his plugin is really good and has served me for years.

I won't forget your arabstreets and c4 round timer fix. they are QOL!!!

thank you DJEarthQuake
Ark_Procession is offline
Naeciof
Member
Join Date: Oct 2016
Location: Brazil
Old 02-12-2024 , 12:44   Re: Bot Names Plugin
Reply With Quote #25

Could someone edit this code just for the CT team?

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

#if !defined MAX_NAME_LENGTH
const MAX_NAME_LENGTH 32
#endif

new Array:g_aBotNamesg_iTotalNames

public plugin_init()
{
    
register_plugin("Random Bot Names""1.0""OciXCrom")
    
g_aBotNames ArrayCreate(MAX_NAME_LENGTH)
    
ReadFile()
}

public 
plugin_end()
{
    
ArrayDestroy(g_aBotNames)
}

ReadFile()
{
    new 
szFilename[256]
    
get_configsdir(szFilenamecharsmax(szFilename))
    
add(szFilenamecharsmax(szFilename), "/BotNames.ini")
    new 
iFilePointer fopen(szFilename"rt")

    if(
iFilePointer)
    {
        new 
szData[MAX_NAME_LENGTH]

        while(!
feof(iFilePointer))
        {
            
fgets(iFilePointerszDatacharsmax(szData))
            
trim(szData)

            switch(
szData[0])
            {
                case 
EOS'#'';': continue
                default:
                {
                    
g_iTotalNames++
                    
ArrayPushString(g_aBotNamesszData)
                }
            }
        }

        
fclose(iFilePointer)
    }
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id))
    {
        return
    }
    
    if(
g_iTotalNames--)
    {
        new 
szName[MAX_NAME_LENGTH], random(g_iTotalNames)
        
ArrayGetString(g_aBotNamesiszNamecharsmax(szName))
        
ArrayDeleteItem(g_aBotNamesi)

        static const 
szNameField[] = "name"
        
set_user_info(idszNameFieldszName)
    }

Naeciof is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 02-13-2024 , 07:25   Re: Bot Names Plugin
Reply With Quote #26

Quote:
Originally Posted by Naeciof View Post
Could someone edit this code just for the CT team?

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

#if !defined MAX_NAME_LENGTH
const MAX_NAME_LENGTH 32
#endif

new Array:g_aBotNamesg_iTotalNames

public plugin_init()
{
    
register_plugin("Random Bot Names""1.0""OciXCrom")
    
g_aBotNames ArrayCreate(MAX_NAME_LENGTH)
    
ReadFile()
}

public 
plugin_end()
{
    
ArrayDestroy(g_aBotNames)
}

ReadFile()
{
    new 
szFilename[256]
    
get_configsdir(szFilenamecharsmax(szFilename))
    
add(szFilenamecharsmax(szFilename), "/BotNames.ini")
    new 
iFilePointer fopen(szFilename"rt")

    if(
iFilePointer)
    {
        new 
szData[MAX_NAME_LENGTH]

        while(!
feof(iFilePointer))
        {
            
fgets(iFilePointerszDatacharsmax(szData))
            
trim(szData)

            switch(
szData[0])
            {
                case 
EOS'#'';': continue
                default:
                {
                    
g_iTotalNames++
                    
ArrayPushString(g_aBotNamesszData)
                }
            }
        }

        
fclose(iFilePointer)
    }
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id))
    {
        return
    }
    
    if(
get_user_team(id) == CS_TEAM_T)
    {
        return
    }

    if(
g_iTotalNames--)
    {
        new 
szName[MAX_NAME_LENGTH], random(g_iTotalNames)
        
ArrayGetString(g_aBotNamesiszNamecharsmax(szName))
        
ArrayDeleteItem(g_aBotNamesi)

        static const 
szNameField[] = "name"
        
set_user_info(idszNameFieldszName)
    }

__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 02-13-2024 at 07:27.
WATCH_D0GS UNITED is offline
Naeciof
Member
Join Date: Oct 2016
Location: Brazil
Old 02-13-2024 , 09:00   Re: Bot Names Plugin
Reply With Quote #27

Do not compile
"error 017: undefined symbol "CS_TEAM_T"
Naeciof is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 02-13-2024 , 09:13   Re: Bot Names Plugin
Reply With Quote #28

Quote:
Originally Posted by Naeciof View Post
Do not compile
"error 017: undefined symbol "CS_TEAM_T"
Add the <cstrike> include or simply replace with a '1'.

PHP Code:
 if(get_user_team(id) == 1
PHP Code:
enum CsTeams
{
    
CS_TEAM_UNASSIGNED 0,
    
CS_TEAM_T          1,
    
CS_TEAM_CT         2,
    
CS_TEAM_SPECTATOR  3,
}; 
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 02-13-2024 at 09:19.
WATCH_D0GS UNITED 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 09:39.


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