Page 1 of 1

SPEC Bots

Posted: 01 Mar 2018, 15:18
by Armin1
Am nevoie de un plugin care pune boti la spec..

:information_source:

1. Nu vreau sa fie detectat de GameTracker ca boti :spy_tone1:
2. Sa nu iasa botii la schimbarea mapei/Sa ii reconecteze
3. Sa fie customizabil/cod bun

Re: SPEC Bots

Posted: 01 Mar 2018, 15:32
by A k c 3 n 7
vezi pe cel al lui Hamlet cereri-pluginuri/cerere-plugin-bot-spec-t181461.html

Re: SPEC Bots

Posted: 01 Mar 2018, 15:41
by Armin1
Ok mersi :)

Si nu sunt detectabili.. adica apar cu IP? Sau.. ?!

EDIT: Nu exista o varianta cu auto-kick la x jucatori conectati.. ?

Re: SPEC Bots

Posted: 01 Aug 2018, 18:52
by BB # Funnky
Incearca:
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

#define PLUGIN "Spec Bots"
#define VERSION "1.0"
#define AUTHOR "Author"

new g_pEnable;
new g_pBotName;
new g_pEnable2;
new g_pBotName2;
new g_pEnable3;
new g_pBotName3;
new i = 0;

public plugin_init()
{
   register_plugin (PLUGIN, VERSION, AUTHOR);
   
   g_pEnable = register_cvar("bw_enable", "1");
   g_pBotName = register_cvar("bw_botname", "Nume Forum");
   g_pEnable2 = register_cvar("bw_enable2", "1");
   g_pBotName2 = register_cvar("bw_botname2", "Forum: http://www.forum.ro/"&#41;;
   g_pEnable3 = register_cvar("bw_enable3", "1");
   g_pBotName3 = register_cvar("bw_botname3", "Viziteaza www.forum.ro"&#41;;
   
   if( get_pcvar_num(g_pEnable) )
   {
      set_task( 5.0, "CreateBot" );
   }
   if( get_pcvar_num(g_pEnable2) )
   {
      set_task( 10.0, "CreateBot" );
   }
   if( get_pcvar_num(g_pEnable3) )
   {
      set_task( 15.0, "CreateBot" );
   }
}

public CreateBot() {
   i++;
   switch( i )
   {
      case 1:
      {
         new szBotName[33];
         get_pcvar_string(g_pBotName, szBotName, 32);
           
         new id = engfunc(EngFunc_CreateFakeClient, szBotName);

         engfunc(EngFunc_FreeEntPrivateData, id);

         set_pev(id, pev_flags, pev( id, pev_flags ) | FL_FAKECLIENT);
         
         new szMsg[128];
         dllfunc(DLLFunc_ClientConnect, id, szBotName, "127.0.0.1", szMsg);
         dllfunc(DLLFunc_ClientPutInServer, id);
      }
      case 2:
      {
         new szBotName[33];
         get_pcvar_string(g_pBotName2, szBotName, 32);
           
         new id = engfunc(EngFunc_CreateFakeClient, szBotName);

         engfunc(EngFunc_FreeEntPrivateData, id);

         set_pev(id, pev_flags, pev( id, pev_flags ) | FL_FAKECLIENT);
         
         new szMsg[128];
         dllfunc(DLLFunc_ClientConnect, id, szBotName, "127.0.0.2", szMsg);
         dllfunc(DLLFunc_ClientPutInServer, id);
      }
      case 3:
      {
         new szBotName[33];
         get_pcvar_string(g_pBotName3, szBotName, 32);
           
         new id = engfunc(EngFunc_CreateFakeClient, szBotName);

         engfunc(EngFunc_FreeEntPrivateData, id);

         set_pev(id, pev_flags, pev( id, pev_flags ) | FL_FAKECLIENT);
         
         new szMsg[128];
         dllfunc(DLLFunc_ClientConnect, id, szBotName, "127.0.0.3", szMsg);
         dllfunc(DLLFunc_ClientPutInServer, id);
      }
   }
   return PLUGIN_CONTINUE;
}

Re: SPEC Bots

Posted: 19 Dec 2018, 16:34
by WHOAMI?
Daca mai are cineva nevoie in viitor :
| Afiseaza codul
#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[][]=
{
        "BOT1",
        "BOT2",
        "BOT3"
};
 
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++;
        }
}