Raised This Month: $183 Target: $400
 45% 

Solved This code is blocking console commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 01-11-2021 , 19:15   This code is blocking console commands
Reply With Quote #1

Hey there.
I use the below codes to create two spec bots.
Bots work fine but the problem which I am facing is that these codes are completely blocking all the console commands of other plugins. Means when I am using these codes none of the amx_ commands work even blocking my other sub plugin's console commands like those of zp_.

Somebody please help me fix this problem.

Codes --

In plugin_init() section --
Code:
set_task(0.5, "Task_CheckBots")
Task_CheckBots() function --
Code:
public Task_CheckBots()
{
	if (get_playersnum(1) < g_maxplayers && g_iBotsCount < 2)
	{
		static i
		for (i = 0; i < sizeof g_cBotNames; i++)
		{
			CreateBot(g_cBotNames[i]);
		}
	}
	return 0;
}
And Finally CreateBot() funtion --
Code:
public CreateBot(const iBotName[])
{
	static iBot;

	iBot = engfunc( EngFunc_CreateFakeClient, iBotName );
		
	dllfunc( MetaFunc_CallGameEntity, "player", iBot );
	set_pev( iBot, pev_flags, FL_FAKECLIENT );

	set_pev( iBot, pev_model, "" );
	set_pev( iBot, pev_viewmodel2, "" );
	set_pev( iBot, pev_modelindex, 0 );

	set_pev( iBot, pev_renderfx, kRenderFxNone );
	set_pev( iBot, pev_rendermode, kRenderTransAlpha );
	set_pev( iBot, pev_renderamt, 0.0 );

	set_pdata_int( iBot, 114, 3 );
	cs_set_user_team( iBot, CS_TEAM_UNASSIGNED );

	g_iBotsCount += 1;
	
	return PLUGIN_HANDLED
}
Waiting for your reply.
Thanks

Last edited by Abhinash; 01-13-2021 at 18:31.
Abhinash is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-11-2021 , 23:28   Re: This code is blocking console commands
Reply With Quote #2

Huh? Show full code please.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 01-13-2021 , 18:31   Re: This code is blocking console commands
Reply With Quote #3

Solved
Abhinash is offline
Reply


Thread Tools
Display Modes

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 07:54.


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