Jump to content
Sign in to follow this  
PUTEREA URSULUI

Cerere plugin Bots Adder.

Recommended Posts

Nume : cei 3 boti pe server

Versiune : Nu conteaza

Descriere detaliata : vreau acei 3 boti de la spec cu diferite reclame adaugate de mine am gasit ceva dar cand se schimba mapa botii nu mai intra trebuie adaugati manual ,as dorii ca botii sa ramana in permanenta la spec pana cand un admin le da kick sau este serverul 32/32 multumesc aniticipat !!

Share this post


Link to post
Share on other sites

#include amxmodx

#include fakemeta

 

 

 

#define NUMAR_DE_BOTI 3

 

new g_Query[256];

 

public plugin_init()

{

set_task( 15.0, "TaskManageBots", .flags="b" );

}

 

new g_Bot[33], g_BotsCount;

 

public TaskManageBots(){

static PlayersNum; PlayersNum = get_playersnum( 1 );

if( PlayersNum < get_maxplayers() - 1 && g_BotsCount < NUMAR_DE_BOTI ) {

CreateBot();

} else if( PlayersNum > get_maxplayers() - 1 && g_BotsCount ) {

RemoveBot();

}}

 

new const g_Names[][]=

{

"DNS: NUME.RANGFORT.RO",

"FORUM: http://www.Rangfort.ro",

"IP: 123.123.123"

};

 

public client_disconnect(i)

{

if( g_Bot[ i ] ) {

g_Bot[ i ] = 0, g_BotsCount -- ;

}

}

 

RemoveBot(){

static i;

for( i = 1; i <= get_maxplayers(); i++ ) {

if( g_Bot[ i ] ) {

server_cmd( "kick #%d", get_user_userid( i ) );break;

}}}

 

CreateBot(){

static Bot;

formatex( g_Query, 255, !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 = engfunc( EngFunc_CreateFakeClient, g_Query );

if( Bot > 0 &&pev_valid(Bot)) {

dllfunc(MetaFunc_CallGameEntity,"player",Bot);

set_pev(Bot,pev_flags,FL_FAKECLIENT);

set_pev(Bot, pev_model, "");

set_pev(Bot, pev_viewmodel2, "");

set_pev(Bot, pev_modelindex, 0);

set_pev(Bot, pev_renderfx, kRenderFxNone);

set_pev(Bot, pev_rendermode, kRenderTransAlpha);

set_pev(Bot, pev_renderamt, 0.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++;

}

}

  • Like 1

Share this post


Link to post
Share on other sites
#include amxmodx
#include fakemeta



#define NUMAR_DE_BOTI 3

new g_Query[256];

public plugin_init()
{
	set_task( 15.0, "TaskManageBots", .flags="b" );
}

new g_Bot[33], g_BotsCount;

public TaskManageBots(){
	static PlayersNum; PlayersNum  = get_playersnum( 1 );
	if( PlayersNum < get_maxplayers() - 1 && g_BotsCount < NUMAR_DE_BOTI ) {
		CreateBot();
	} else if( PlayersNum > get_maxplayers() - 1 && g_BotsCount ) {
		RemoveBot();
	}}

new const g_Names[][]=
{
	"DNS: NUME.RANGFORT.RO",
	"FORUM: http://www.Rangfort.ro",
	"IP: 123.123.123"
};

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

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

CreateBot(){
	static Bot;
	formatex( g_Query, 255, !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 = engfunc( EngFunc_CreateFakeClient, g_Query );
	if( Bot > 0 &&pev_valid(Bot)) {
		dllfunc(MetaFunc_CallGameEntity,"player",Bot);
		set_pev(Bot,pev_flags,FL_FAKECLIENT);
		set_pev(Bot, pev_model, "");
		set_pev(Bot, pev_viewmodel2, "");
		set_pev(Bot, pev_modelindex, 0);
		set_pev(Bot, pev_renderfx, kRenderFxNone);
		set_pev(Bot, pev_rendermode, kRenderTransAlpha);
		set_pev(Bot, pev_renderamt, 0.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++;
	}
} 

AU APARUT 3 DOAR CU DNS NU SI CU IP SI FORUM.

Share this post


Link to post
Share on other sites


#include amxmodx

#include fakemeta

 

 

 

#define NUMAR_DE_BOTI 3

 

new g_Query[256];

 

public plugin_init()

{

set_task( 15.0, "TaskManageBots", .flags="b" );

}

 

new g_Bot[33], g_BotsCount;

 

public TaskManageBots(){

static PlayersNum; PlayersNum = get_playersnum( 1 );

if( PlayersNum < get_maxplayers() - 1 && g_BotsCount < NUMAR_DE_BOTI ) {

CreateBot();

} else if( PlayersNum > get_maxplayers() - 1 && g_BotsCount ) {

RemoveBot();

}}

 

new const g_Names[][]=

{

"DNS: BESTIA.RANGFORT.RO",

"FORUM: WWW.RANGFORT.RO",

"IP: 89.34.25.56"

};

 

public client_disconnect(i)

{

if( g_Bot[ i ] ) {

g_Bot[ i ] = 0, g_BotsCount -- ;

}

}

 

RemoveBot(){

static i;

for( i = 1; i <= get_maxplayers(); i++ ) {

if( g_Bot[ i ] ) {

server_cmd( "kick #%d", get_user_userid( i ) );break;

}}}

 

CreateBot(){

static Bot;

formatex( g_Query, 255, !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 = engfunc( EngFunc_CreateFakeClient, g_Query );

if( Bot > 0 &&pev_valid(Bot)) {

dllfunc(MetaFunc_CallGameEntity,"player",Bot);

set_pev(Bot,pev_flags,FL_FAKECLIENT);

set_pev(Bot, pev_model, "");

set_pev(Bot, pev_viewmodel2, "");

set_pev(Bot, pev_modelindex, 0);

set_pev(Bot, pev_renderfx, kRenderFxNone);

set_pev(Bot, pev_rendermode, kRenderTransAlpha);

set_pev(Bot, pev_renderamt, 0.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++;

}

}

Share this post


Link to post
Share on other sites

Unde iti apar astea,pui ce vrei tu,adica DNS,Forum.si IP-UL sv-ului.

"DNS: BESTIA.RANGFORT.RO",
    "FORUM: WWW.RANGFORT.RO",
    "IP: 89.34.25.56"

Share this post


Link to post
Share on other sites

Topic inchis momentan . Daca mai ai nevoie de ajutor , trimite-mi un mesaj pe forum .

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×