Jump to content

Plugin - Spec Bot 2021 (nedetectabil)


Darian433
 Share

Recommended Posts

  • Administrator

Nume plugin: Bot Spec 2021
Autor: Necunosc
Descriere: Acest plugin adauga 3 boti la spec, acestia se deconecteaza automat cand pe server sunt X/32 jucatori. Botii se conecteaza automat la fiecare schimbare a hartii sau cand nr. de jucatori scade sub cel setat la care sa se deconecteze.
Comenzi publice: -
Comenzi administrative: -
Cvar-uri:
bs_enable 0/1 - activeaza / dezactiveaza botii
bs_botname "nume" - numele la primul bot
bs_botname2 "nume" - numele la al doilea bot
bs_botname3 "nume" - numele la al trilea bot
bs_maxplayers "nr" - la cati jucatori sa se deconecteze botii - cand jucatorii scad sub aceasta valoare, botii se vor reconecta. - VALOARE MAXIM 29 - nu folositi valoare mai mare de 29!
Alte informatii: Plugin-ul este mult mai bun fata de cele existente pe internet (de ex. cel al lui cyby cauzeaza crash-uri serverului). Plugin-ul este testat pe reHLDS si functioneaza perfect.
Numele botilor se pot edita din plugin sau adaugati in amxx.cfg cvar-urile de mai sus.
Link descarcareclick
Sursa

#include <amxmodx>
#include <fakemeta>
#include <amxmisc>

#define PLUGIN "Bot-Fake"
#define VERSION "1.0"
#define AUTHOR "Author"

new g_pEnable;
new g_pBotName, g_pBotName2, g_pBotName3
new bool:bot_on, bot_on2, bot_on3;
new g_pMaxPlayers;

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    g_pEnable = register_cvar("bs_enable", "1"); // activeaza / dezactiveaza plugin-ul
    g_pBotName = register_cvar("bs_botname", "RESPAWN.OLDGODS.RO (dns)"); // nick bot1
    g_pBotName2 = register_cvar("bs_botname2", "89.40.233.100:27015 (IP)"); // nick bot2
    g_pBotName3 = register_cvar("bs_botname3", "forum: oldgods.ro/forum"); // nick bot3
    g_pMaxPlayers = register_cvar("bs_maxplayers", "29.0");  // maxim 29 pentru a evita orice BUG, valoarea 29 va deconecta botii cand serverul este 30/32.

    bot_on=false;
    bot_on2=false;
    bot_on3=false;
    //pentru a verifica daca botii sunt pe server sau nu

    if( get_pcvar_num(g_pEnable) ) 
    {
        set_task( 5.0, "CreateBots");
        set_task( 60.0, "CreateBots", 0, _, _, "b");
    }
    // conectarea botilor la schimbarea hartii / cand nr. de jucatori este sub maxim. - de preferat sa nu modificati daca nu stiti ce faceti.
}

public client_connect(id) // kick botilor cand trec sau este egal cu nr. maxim
{
    if(get_playersnum() >= (g_pMaxPlayers + 1))
    {
        new szBotName[33];
        get_pcvar_string(g_pBotName, szBotName, 32);
        server_cmd("kick ^"%s^"", szBotName);
        bot_on = false;
        new szBotName2[33];
        get_pcvar_string(g_pBotName2, szBotName2, 32);
        server_cmd("kick ^"%s^"", szBotName2);
        bot_on2 = false;
        new szBotName3[33];
        get_pcvar_string(g_pBotName3, szBotName3, 32);
        server_cmd("kick ^"%s^"", szBotName3);
        bot_on3 = false;
    }
}

public CreateBots() // executa pornirea botilor daca acestia nu sunt pe server si nr. jucatori este sub nr. max
{   
    if(get_playersnum() < (g_pMaxPlayers) && !bot_on) {
        CreateBot()
        if(get_playersnum() < (g_pMaxPlayers) && !bot_on2) {
            CreateBot2()
            if(get_playersnum() < (g_pMaxPlayers) && !bot_on3) {
                CreateBot3()
            }
        }
    }
}

// crearea botilor
public CreateBot()
{
    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);

    bot_on = true;
}

public CreateBot2()
{
    new szBotName2[33];
    get_pcvar_string(g_pBotName2, szBotName2, 32);
    
    new id = engfunc(EngFunc_CreateFakeClient, szBotName2);
    engfunc(EngFunc_FreeEntPrivateData, id);
    set_pev(id, pev_flags, pev( id, pev_flags ) | FL_FAKECLIENT);
    
    new szMsg[128];
    dllfunc(DLLFunc_ClientConnect, id, szBotName2, "127.0.0.1", szMsg);
    dllfunc(DLLFunc_ClientPutInServer, id);

    bot_on2 = true;
}

public CreateBot3()
{
    new szBotName3[33];
    get_pcvar_string(g_pBotName3, szBotName3, 32);
    
    new id = engfunc(EngFunc_CreateFakeClient, szBotName3);
    engfunc(EngFunc_FreeEntPrivateData, id);
    set_pev(id, pev_flags, pev( id, pev_flags ) | FL_FAKECLIENT);
    
    new szMsg[128];
    dllfunc(DLLFunc_ClientConnect, id, szBotName3, "127.0.0.1", szMsg);
    dllfunc(DLLFunc_ClientPutInServer, id);

    bot_on3 = true;
}

Poze:
OqVIy9q.jpg

Link to comment
Share on other sites

  • Administrator

Update.
Adaugat functia de reconectare a botilor cand nr de jucatori scade sub setarea "bs_maxplayers" + optimizata conectarea lor, multumiri SendOreos. ❤️

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...