Fix Spectator bots

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Igivapto
Извън линия
Foreigner
Foreigner
Мнения: 36
Регистриран на: 08 Май 2020, 14:52
Се отблагодари: 13 пъти
Получена благодарност: 1 път

Fix Spectator bots

Мнение от Igivapto » 07 Юни 2021, 15:00

Hi, am using this spectator bots, and all working good, when server reach 31 players or 32/32 bots are not go out...

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fakemeta>

#define PLUGIN   "Spectator Bots"
#define VERSION  "1.0"
#define AUTHOR   "hackera457"

#define MAX_SEPC_BOTS   2

#define MIN_PLAYERS_NUM     0
#define MAX_PLAYERS_NUM		31

new const g_szBotNames[MAX_SEPC_BOTS][] = 
{
	"Server IP: xx.xxx.xx.xx:27015",
	"Website: http://www.amxx-bg.info/forum"
}

new g_iPlayers, g_iBots

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR)
	register_cvar("hackera457_spectatorbots",VERSION,FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
	TaskBots()
}

public client_connect(id)
{
	if(!is_user_bot(id))
		g_iPlayers++
		
	set_task(3.0,"TaskBots")
}

public client_disconnected(id)
{
	if(!is_user_bot(id))
		g_iPlayers--
		
	TaskBots()
	set_task(1.0,"TaskBots")
}

public TaskBots()
{
	static i
	
	if(MIN_PLAYERS_NUM <= g_iPlayers <=MAX_PLAYERS_NUM)
	{
		for(i=0; i < MAX_SEPC_BOTS; i++)
		{
			if(g_iBots == MAX_SEPC_BOTS)
				break
				
			CreateBot(g_szBotNames[i])
		}
	}
	
	if(g_iPlayers > MAX_PLAYERS_NUM)
		RemoveBot()
}

CreateBot(const szName[])
{
    static szReason[128], id
	
    id = engfunc(EngFunc_CreateFakeClient, szName)
    engfunc(EngFunc_FreeEntPrivateData, id)
    set_pev(id, pev_flags, pev(id, pev_flags) | FL_FAKECLIENT)
    dllfunc(DLLFunc_ClientConnect, id, szName, "127.0.0.1", szReason)
    dllfunc(DLLFunc_ClientPutInServer, id)
    g_iBots++
}

RemoveBot()
{
    static iPlayers[32], iPnum, i
    get_players(iPlayers, iPnum, "d")
    
    for(i = 0; i < iPnum; i++)
        server_cmd("kick #%i", get_user_userid(iPlayers[i]))
		
    g_iBots = 0
}

Аватар
Siska
Извън линия
Потребител
Потребител
Мнения: 772
Регистриран на: 03 Дек 2019, 22:29
Местоположение: Bedrock
Се отблагодари: 157 пъти
Получена благодарност: 48 пъти
Обратна връзка:

Fix Spectator bots

Мнение от Siska » 08 Юни 2021, 11:34

Igivapto написа: 07 Юни 2021, 15:00 Hi, am using this spectator bots, and all working good, when server reach 31 players or 32/32 bots are not go out...

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fakemeta>

#define PLUGIN   "Spectator Bots"
#define VERSION  "1.0"
#define AUTHOR   "hackera457"

#define MAX_SEPC_BOTS   2

#define MIN_PLAYERS_NUM     0
#define MAX_PLAYERS_NUM		31

new const g_szBotNames[MAX_SEPC_BOTS][] = 
{
	"Server IP: xx.xxx.xx.xx:27015",
	"Website: http://www.amxx-bg.info/forum"
}

new g_iPlayers, g_iBots

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR)
	register_cvar("hackera457_spectatorbots",VERSION,FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
	TaskBots()
}

public client_connect(id)
{
	if(!is_user_bot(id))
		g_iPlayers++
		
	set_task(3.0,"TaskBots")
}

public client_disconnected(id)
{
	if(!is_user_bot(id))
		g_iPlayers--
		
	TaskBots()
	set_task(1.0,"TaskBots")
}

public TaskBots()
{
	static i
	
	if(MIN_PLAYERS_NUM <= g_iPlayers <=MAX_PLAYERS_NUM)
	{
		for(i=0; i < MAX_SEPC_BOTS; i++)
		{
			if(g_iBots == MAX_SEPC_BOTS)
				break
				
			CreateBot(g_szBotNames[i])
		}
	}
	
	if(g_iPlayers > MAX_PLAYERS_NUM)
		RemoveBot()
}

CreateBot(const szName[])
{
    static szReason[128], id
	
    id = engfunc(EngFunc_CreateFakeClient, szName)
    engfunc(EngFunc_FreeEntPrivateData, id)
    set_pev(id, pev_flags, pev(id, pev_flags) | FL_FAKECLIENT)
    dllfunc(DLLFunc_ClientConnect, id, szName, "127.0.0.1", szReason)
    dllfunc(DLLFunc_ClientPutInServer, id)
    g_iBots++
}

RemoveBot()
{
    static iPlayers[32], iPnum, i
    get_players(iPlayers, iPnum, "d")
    
    for(i = 0; i < iPnum; i++)
        server_cmd("kick #%i", get_user_userid(iPlayers[i]))
		
    g_iBots = 0
}
Use this one - KGB Bots.amxx
viewtopic.php?f=96&t=6675&hilit=kgb&start=10
Търсих врага и го открих : това съм аз , трябва да се победя...
Изображение
WWW.CSMEGAGAMING.COM Изображение Изображение Skype : Sisi-1_1

Аватар
Igivapto
Извън линия
Foreigner
Foreigner
Мнения: 36
Регистриран на: 08 Май 2020, 14:52
Се отблагодари: 13 пъти
Получена благодарност: 1 път

Fix Spectator bots

Мнение от Igivapto » 08 Юни 2021, 15:22

@Siska I don't like them

Аватар
m0ney
Извън линия
Потребител
Потребител
Мнения: 285
Регистриран на: 13 Апр 2020, 11:36
Се отблагодари: 83 пъти
Получена благодарност: 39 пъти
Обратна връзка:

Fix Spectator bots

Мнение от m0ney » 08 Юни 2021, 22:39

Igivapto написа: 08 Юни 2021, 15:22 @Siska I don't like them
??? You may not like them but its the best option and set amx_minplayers "29" so that they get kicked on +1 = 30 something like that.
Изображение
Изображение

Аватар
Midnight1337
Извън линия
Foreigner
Foreigner
Мнения: 72
Регистриран на: 15 Яну 2019, 00:53
Местоположение: Macedonia
Се отблагодари: 5 пъти
Получена благодарност: 21 пъти
Обратна връзка:

Fix Spectator bots

Мнение от Midnight1337 » 09 Юни 2021, 00:12

@m0ney That you are talking makes nonsense, what does amx_minplayers cvar do, there is not that such a cvar like it in plugin that guy need to be reworked...
Изображение

Аватар
Huehue
Извън линия
Модератор
Модератор
Мнения: 352
Регистриран на: 16 Яну 2017, 23:42
Местоположение: София
Се отблагодари: 7 пъти
Получена благодарност: 171 пъти
Обратна връзка:

Fix Spectator bots

Мнение от Huehue » 09 Юни 2021, 07:03

Igivapto написа: 07 Юни 2021, 15:00 Hi, am using this spectator bots, and all working good, when server reach 31 players or 32/32 bots are not go out...

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fakemeta>

#define PLUGIN   "Spectator Bots"
#define VERSION  "1.0"
#define AUTHOR   "hackera457"

#define MAX_SEPC_BOTS   2

#define MIN_PLAYERS_NUM     0
#define MAX_PLAYERS_NUM		31

new const g_szBotNames[MAX_SEPC_BOTS][] = 
{
	"Server IP: xx.xxx.xx.xx:27015",
	"Website: http://www.amxx-bg.info/forum"
}

new g_iPlayers, g_iBots

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR)
	register_cvar("hackera457_spectatorbots",VERSION,FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
	TaskBots()
}

public client_connect(id)
{
	if(!is_user_bot(id))
		g_iPlayers++
		
	set_task(3.0,"TaskBots")
}

public client_disconnected(id)
{
	if(!is_user_bot(id))
		g_iPlayers--
		
	TaskBots()
	set_task(1.0,"TaskBots")
}

public TaskBots()
{
	static i
	
	if(MIN_PLAYERS_NUM <= g_iPlayers <=MAX_PLAYERS_NUM)
	{
		for(i=0; i < MAX_SEPC_BOTS; i++)
		{
			if(g_iBots == MAX_SEPC_BOTS)
				break
				
			CreateBot(g_szBotNames[i])
		}
	}
	
	if(g_iPlayers > MAX_PLAYERS_NUM)
		RemoveBot()
}

CreateBot(const szName[])
{
    static szReason[128], id
	
    id = engfunc(EngFunc_CreateFakeClient, szName)
    engfunc(EngFunc_FreeEntPrivateData, id)
    set_pev(id, pev_flags, pev(id, pev_flags) | FL_FAKECLIENT)
    dllfunc(DLLFunc_ClientConnect, id, szName, "127.0.0.1", szReason)
    dllfunc(DLLFunc_ClientPutInServer, id)
    g_iBots++
}

RemoveBot()
{
    static iPlayers[32], iPnum, i
    get_players(iPlayers, iPnum, "d")
    
    for(i = 0; i < iPnum; i++)
        server_cmd("kick #%i", get_user_userid(iPlayers[i]))
		
    g_iBots = 0
}
Are you using any bots in your server? (Yapb, podbot and etc.)
LOYAL TO THE OATH OF OMERTА̀

Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..

My GitHub Profile
GitHub

My AMXX Includes Collection
AMXX Include Libraries

My Steam Profile (from SteamDB)
  • Value: 4179€
  • Games owned: 1855
  • Games played: 754 (40%)
  • Hours on record: 4,994.9h

Аватар
m0ney
Извън линия
Потребител
Потребител
Мнения: 285
Регистриран на: 13 Апр 2020, 11:36
Се отблагодари: 83 пъти
Получена благодарност: 39 пъти
Обратна връзка:

Fix Spectator bots

Мнение от m0ney » 09 Юни 2021, 12:33

Midnight1337 написа: 09 Юни 2021, 00:12 @m0ney That you are talking makes nonsense, what does amx_minplayers cvar do, there is not that such a cvar like it in plugin that guy need to be reworked...
https://i.imgur.com/KSiaZD2.png , yes there is and it works fine, we use it.
Изображение
Изображение

Аватар
Igivapto
Извън линия
Foreigner
Foreigner
Мнения: 36
Регистриран на: 08 Май 2020, 14:52
Се отблагодари: 13 пъти
Получена благодарност: 1 път

Fix Spectator bots

Мнение от Igivapto » 09 Юни 2021, 13:15

@Huehue Am not using any bots simply server go 32/32 and bots not go out...
@m0ney, hes talking about bots from hackera that there is not cvar like it.

Аватар
Siska
Извън линия
Потребител
Потребител
Мнения: 772
Регистриран на: 03 Дек 2019, 22:29
Местоположение: Bedrock
Се отблагодари: 157 пъти
Получена благодарност: 48 пъти
Обратна връзка:

Fix Spectator bots

Мнение от Siska » 09 Юни 2021, 13:51

Igivapto написа: 09 Юни 2021, 13:15 @Huehue Am not using any bots simply server go 32/32 and bots not go out...
@m0ney, hes talking about bots from hackera that there is not cvar like it.
The hacker plugin is not working properly. At this stage, KGB is best. That is all...
Or use amx_minplayers "29" as you said money...
Or maybe you have some reserved slots that interfere... I don't know , but if you want try "28", "27"
For me the bots came out, but never came back after that and that's why I don't use the hacker plugin...
Търсих врага и го открих : това съм аз , трябва да се победя...
Изображение
WWW.CSMEGAGAMING.COM Изображение Изображение Skype : Sisi-1_1

Аватар
Huehue
Извън линия
Модератор
Модератор
Мнения: 352
Регистриран на: 16 Яну 2017, 23:42
Местоположение: София
Се отблагодари: 7 пъти
Получена благодарност: 171 пъти
Обратна връзка:

Fix Spectator bots

Мнение от Huehue » 09 Юни 2021, 18:04

Igivapto написа: 09 Юни 2021, 13:15 @Huehue Am not using any bots simply server go 32/32 and bots not go out...
@m0ney, hes talking about bots from hackera that there is not cvar like it.
Can you make a snapshot from your console when the server is 31 or 32 with the command written in console status or ping and attach/upload it here. So I can see why the plugin doesn't work for you. Thanks in advance.
LOYAL TO THE OATH OF OMERTА̀

Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..

My GitHub Profile
GitHub

My AMXX Includes Collection
AMXX Include Libraries

My Steam Profile (from SteamDB)
  • Value: 4179€
  • Games owned: 1855
  • Games played: 754 (40%)
  • Hours on record: 4,994.9h

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 20 госта