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

Bots in spectator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
guanix
Junior Member
Join Date: Dec 2016
Old 12-04-2016 , 04:04   Bots in spectator
Reply With Quote #1

Hi,

im searching months to put 2 bots in spectator and they not leave when players join , to let him be 24 hour in server and not appear in gametracker with name BOTS , i want them like normal players please.

I saw lot of servers doing this how this please , i tried Fakefull but bots leave when players join and tried KGBbots but they appear like BOTS in gametracker and they not count like normal players.

NEED HELP
guanix is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-04-2016 , 06:22   Re: Bots in spectator
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=290299
Alber9091 is offline
guanix
Junior Member
Join Date: Dec 2016
Old 12-05-2016 , 03:40   Re: Bots in spectator
Reply With Quote #3

Quote:
Originally Posted by Alber9091 View Post
Hi , Thanks for the reply , i tried KGBbots before but players appear in Gametracker with name [BOTS] and they not counted like normal players , i need them to be counted please like a normal player
guanix is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-05-2016 , 05:49   Re: Bots in spectator
Reply With Quote #4

Quote:
Originally Posted by guanix View Post
Hi , Thanks for the reply , i tried KGBbots before but players appear in Gametracker with name [BOTS] and they not counted like normal players , i need them to be counted please like a normal player
Gametracker name can be changed from cstrike/addons/amxmodx/configs/kgbbots.ini

And you can replace the bots name with your
Bot 1: Server Ip and

Bot 2: Welcome To "Your Commuinty Name Here"

Now they are counted as normal players yes or no? I don't know about it ..!!
Alber9091 is offline
guanix
Junior Member
Join Date: Dec 2016
Old 12-06-2016 , 01:37   Re: Bots in spectator
Reply With Quote #5

Hi, this what im talking about , the bots appear with name [BOT] in game tracker and they not counted like normal players this picture



i need to put only 2 bots in spectator and they appear like normal players please

Last edited by guanix; 12-06-2016 at 01:41.
guanix is offline
iNdio
Senior Member
Join Date: Apr 2015
Location: Ro
Old 12-06-2016 , 05:30   Re: Bots in spectator
Reply With Quote #6

Hattrick's Bots, kicked when full server and real player try to join.
PHP Code:
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 2

new g_Query[256];

public 
plugin_init()
{
    
set_task15.0"TaskManageBots", .flags="b" );
}

new 
g_Bot[33], g_BotsCount;

public 
TaskManageBots(){
    static 
PlayersNumPlayersNum  get_playersnum);
    if( 
PlayersNum get_maxplayers() - && g_BotsCount NUMAR_DE_BOTI ) {
        
CreateBot();
    } else if( 
PlayersNum get_maxplayers() - && g_BotsCount ) {
        
RemoveBot();
    }}

new const 
g_Names[][]=
{
    
"BOT",
    
"BOT2"
};

public 
client_disconnect(i)
{
    if( 
g_Bot] ) {
        
g_Bot] = 0g_BotsCount -- ;
    }
}

RemoveBot(){
    static 
i;
    for( 
1<= get_maxplayers(); i++ ) {
        if( 
g_Bot] ) {
            
server_cmd"kick #%d"get_user_userid) );break;
        }}}

CreateBot(){
    static 
Bot;
    
formatexg_Query255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot engfuncEngFunc_CreateFakeClientg_Query );
    if( 
Bot &&pev_valid(Bot)) {
        
dllfunc(MetaFunc_CallGameEntity,"player",Bot);
        
set_pev(Bot,pev_flags,FL_FAKECLIENT);
        
set_pev(Botpev_model"");
        
set_pev(Botpev_viewmodel2"");
        
set_pev(Botpev_modelindex0);
        
set_pev(Botpev_renderfxkRenderFxNone);
        
set_pev(Botpev_rendermodekRenderTransAlpha);
        
set_pev(Botpev_renderamt0.0);
        
set_pdata_int(Bot,114,0);
        
message_begin(MSG_ALL,get_user_msgid("TeamInfo"));
        
write_byte(Bot);
        
write_string("UNASSIGNED");
        
message_end();
        
g_Bot[Bot]=1;
        
g_BotsCount++;
    }

Hattrick's Bots never leave the server even if full and real player try to join.
PHP Code:
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 2

new g_Query[256];

public 
plugin_init()
{
    
set_task15.0"TaskManageBots", .flags="b" );
}

new 
g_Bot[33], g_BotsCount;

public 
TaskManageBots(){
    static 
PlayersNumPlayersNum  get_playersnum);
    if( 
PlayersNum get_maxplayers() - && g_BotsCount NUMAR_DE_BOTI ) {
        
CreateBot();
    }}

new const 
g_Names[][]=
{
    
"BOT",
    
"BOT2"
};

CreateBot(){
    static 
Bot;
    
formatexg_Query255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot engfuncEngFunc_CreateFakeClientg_Query );
    if( 
Bot &&pev_valid(Bot)) {
        
dllfunc(MetaFunc_CallGameEntity,"player",Bot);
        
set_pev(Bot,pev_flags,FL_FAKECLIENT);
        
set_pev(Botpev_model"");
        
set_pev(Botpev_viewmodel2"");
        
set_pev(Botpev_modelindex0);
        
set_pev(Botpev_renderfxkRenderFxNone);
        
set_pev(Botpev_rendermodekRenderTransAlpha);
        
set_pev(Botpev_renderamt0.0);
        
set_pdata_int(Bot,114,0);
        
message_begin(MSG_ALL,get_user_msgid("TeamInfo"));
        
write_byte(Bot);
        
write_string("UNASSIGNED");
        
message_end();
        
g_Bot[Bot]=1;
        
g_BotsCount++;
    }

__________________
Where Cs had no value, amxx, sometimes, had its price...
iNdio is offline
guanix
Junior Member
Join Date: Dec 2016
Old 12-07-2016 , 06:13   Re: Bots in spectator
Reply With Quote #7

Quote:
Originally Posted by iNdio View Post
Hattrick's Bots, kicked when full server and real player try to join.
PHP Code:
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 2

new g_Query[256];

public 
plugin_init()
{
    
set_task15.0"TaskManageBots", .flags="b" );
}

new 
g_Bot[33], g_BotsCount;

public 
TaskManageBots(){
    static 
PlayersNumPlayersNum  get_playersnum);
    if( 
PlayersNum get_maxplayers() - && g_BotsCount NUMAR_DE_BOTI ) {
        
CreateBot();
    } else if( 
PlayersNum get_maxplayers() - && g_BotsCount ) {
        
RemoveBot();
    }}

new const 
g_Names[][]=
{
    
"BOT",
    
"BOT2"
};

public 
client_disconnect(i)
{
    if( 
g_Bot] ) {
        
g_Bot] = 0g_BotsCount -- ;
    }
}

RemoveBot(){
    static 
i;
    for( 
1<= get_maxplayers(); i++ ) {
        if( 
g_Bot] ) {
            
server_cmd"kick #%d"get_user_userid) );break;
        }}}

CreateBot(){
    static 
Bot;
    
formatexg_Query255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot engfuncEngFunc_CreateFakeClientg_Query );
    if( 
Bot &&pev_valid(Bot)) {
        
dllfunc(MetaFunc_CallGameEntity,"player",Bot);
        
set_pev(Bot,pev_flags,FL_FAKECLIENT);
        
set_pev(Botpev_model"");
        
set_pev(Botpev_viewmodel2"");
        
set_pev(Botpev_modelindex0);
        
set_pev(Botpev_renderfxkRenderFxNone);
        
set_pev(Botpev_rendermodekRenderTransAlpha);
        
set_pev(Botpev_renderamt0.0);
        
set_pdata_int(Bot,114,0);
        
message_begin(MSG_ALL,get_user_msgid("TeamInfo"));
        
write_byte(Bot);
        
write_string("UNASSIGNED");
        
message_end();
        
g_Bot[Bot]=1;
        
g_BotsCount++;
    }

Hattrick's Bots never leave the server even if full and real player try to join.
PHP Code:
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 2

new g_Query[256];

public 
plugin_init()
{
    
set_task15.0"TaskManageBots", .flags="b" );
}

new 
g_Bot[33], g_BotsCount;

public 
TaskManageBots(){
    static 
PlayersNumPlayersNum  get_playersnum);
    if( 
PlayersNum get_maxplayers() - && g_BotsCount NUMAR_DE_BOTI ) {
        
CreateBot();
    }}

new const 
g_Names[][]=
{
    
"BOT",
    
"BOT2"
};

CreateBot(){
    static 
Bot;
    
formatexg_Query255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot engfuncEngFunc_CreateFakeClientg_Query );
    if( 
Bot &&pev_valid(Bot)) {
        
dllfunc(MetaFunc_CallGameEntity,"player",Bot);
        
set_pev(Bot,pev_flags,FL_FAKECLIENT);
        
set_pev(Botpev_model"");
        
set_pev(Botpev_viewmodel2"");
        
set_pev(Botpev_modelindex0);
        
set_pev(Botpev_renderfxkRenderFxNone);
        
set_pev(Botpev_rendermodekRenderTransAlpha);
        
set_pev(Botpev_renderamt0.0);
        
set_pdata_int(Bot,114,0);
        
message_begin(MSG_ALL,get_user_msgid("TeamInfo"));
        
write_byte(Bot);
        
write_string("UNASSIGNED");
        
message_end();
        
g_Bot[Bot]=1;
        
g_BotsCount++;
    }

Thanks for help i will try it , so i use the 2nd script to keep them 24/7 even if players join , so where to save that script please and to change name of bots in that file ? If you can tell me what to do to let it work

Last edited by guanix; 12-07-2016 at 06:14.
guanix is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-07-2016 , 07:11   Re: Bots in spectator
Reply With Quote #8

Quote:
Originally Posted by guanix View Post
Thanks for help i will try it , so i use the 2nd script to keep them 24/7 even if players join , so where to save that script please and to change name of bots in that file ? If you can tell me what to do to let it work
Compile the script into .amxx

From any of these three links:

http://www.amxmodx.org/webcompiler.cgi
https://aghl.ru/webcompiler
https://spider.limetech.io/

And Put It Into, cstrike/addons/amxmodx/Plugins
And same line (plugin name) into cstrike/addons/amxmodx/configs/plugins.ini with plugin name
Example: Bots.amxx

You Can Change Bot Name From Script, Here --->

PHP Code:
new const g_Names[][]=
{
    
"BOT",
    
"BOT2"
}; 
Alber9091 is offline
guanix
Junior Member
Join Date: Dec 2016
Old 12-07-2016 , 08:26   Re: Bots in spectator
Reply With Quote #9

Quote:
Originally Posted by iNdio View Post
Hattrick's Bots, kicked when full server and real player try to join.
PHP Code:
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 2

new g_Query[256];

public 
plugin_init()
{
    
set_task15.0"TaskManageBots", .flags="b" );
}

new 
g_Bot[33], g_BotsCount;

public 
TaskManageBots(){
    static 
PlayersNumPlayersNum  get_playersnum);
    if( 
PlayersNum get_maxplayers() - && g_BotsCount NUMAR_DE_BOTI ) {
        
CreateBot();
    } else if( 
PlayersNum get_maxplayers() - && g_BotsCount ) {
        
RemoveBot();
    }}

new const 
g_Names[][]=
{
    
"BOT",
    
"BOT2"
};

public 
client_disconnect(i)
{
    if( 
g_Bot] ) {
        
g_Bot] = 0g_BotsCount -- ;
    }
}

RemoveBot(){
    static 
i;
    for( 
1<= get_maxplayers(); i++ ) {
        if( 
g_Bot] ) {
            
server_cmd"kick #%d"get_user_userid) );break;
        }}}

CreateBot(){
    static 
Bot;
    
formatexg_Query255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot engfuncEngFunc_CreateFakeClientg_Query );
    if( 
Bot &&pev_valid(Bot)) {
        
dllfunc(MetaFunc_CallGameEntity,"player",Bot);
        
set_pev(Bot,pev_flags,FL_FAKECLIENT);
        
set_pev(Botpev_model"");
        
set_pev(Botpev_viewmodel2"");
        
set_pev(Botpev_modelindex0);
        
set_pev(Botpev_renderfxkRenderFxNone);
        
set_pev(Botpev_rendermodekRenderTransAlpha);
        
set_pev(Botpev_renderamt0.0);
        
set_pdata_int(Bot,114,0);
        
message_begin(MSG_ALL,get_user_msgid("TeamInfo"));
        
write_byte(Bot);
        
write_string("UNASSIGNED");
        
message_end();
        
g_Bot[Bot]=1;
        
g_BotsCount++;
    }

Hattrick's Bots never leave the server even if full and real player try to join.
PHP Code:
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 2

new g_Query[256];

public 
plugin_init()
{
    
set_task15.0"TaskManageBots", .flags="b" );
}

new 
g_Bot[33], g_BotsCount;

public 
TaskManageBots(){
    static 
PlayersNumPlayersNum  get_playersnum);
    if( 
PlayersNum get_maxplayers() - && g_BotsCount NUMAR_DE_BOTI ) {
        
CreateBot();
    }}

new const 
g_Names[][]=
{
    
"BOT",
    
"BOT2"
};

CreateBot(){
    static 
Bot;
    
formatexg_Query255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot engfuncEngFunc_CreateFakeClientg_Query );
    if( 
Bot &&pev_valid(Bot)) {
        
dllfunc(MetaFunc_CallGameEntity,"player",Bot);
        
set_pev(Bot,pev_flags,FL_FAKECLIENT);
        
set_pev(Botpev_model"");
        
set_pev(Botpev_viewmodel2"");
        
set_pev(Botpev_modelindex0);
        
set_pev(Botpev_renderfxkRenderFxNone);
        
set_pev(Botpev_rendermodekRenderTransAlpha);
        
set_pev(Botpev_renderamt0.0);
        
set_pdata_int(Bot,114,0);
        
message_begin(MSG_ALL,get_user_msgid("TeamInfo"));
        
write_byte(Bot);
        
write_string("UNASSIGNED");
        
message_end();
        
g_Bot[Bot]=1;
        
g_BotsCount++;
    }

Same problem they appear like bots again with name [BOTS] near of the name , i dont want to appear BOTS name please

guanix is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-07-2016 , 12:41   Re: Bots in spectator
Reply With Quote #10

Quote:
Originally Posted by guanix View Post
Same problem they appear like bots again with name [BOTS] near of the name , i dont want to appear BOTS name please

So, you want them, to appear as real client?
well, I'm not scripter but I can just forward what you want to express ..!!
Alber9091 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 05:33.


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