AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved This code is blocking console commands (https://forums.alliedmods.net/showthread.php?t=329884)

Abhinash 01-11-2021 18:15

This code is blocking console commands
 
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

OciXCrom 01-11-2021 22:28

Re: This code is blocking console commands
 
Huh? Show full code please.

Abhinash 01-13-2021 17:31

Re: This code is blocking console commands
 
Solved


All times are GMT -4. The time now is 14:14.

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