Jump to content

Recommended Posts

  • LCS PREMIUM
Posted (edited)

Am vazut ca multi aveti pluginul acela ce adauga prefixe botilor, isi dau disconnect aiurea etc. Un plugin simplu pentru 3 boti advertise la spec. Eu il folosesc pe sv meu, nu au prefixe si sufixe gen [DR] [PL] etc. Nu isi dau disconnect decat cand e sv 29/32 si sunt conectari noi 

 

- Nume plugin: Advertise Bots

- Autor: idk

- Engine ( HLDS / SRCDS ) : HLDS

- Versiune: 1.0

- Informatii: 

- Download: 

 

#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() - 4 && g_BotsCount < NUMAR_DE_BOTI ) {
                CreateBot();
        } else if( PlayersNum > get_maxplayers() - 4 && g_BotsCount ) {
                RemoveBot();
        }}
 
new const g_Names[NUMAR_DE_BOTI][]=
{
    "Forum: NORD.LEAGUECS.RO",
    "Team-Speak: NORD.LEAGUECS.RO",
    "POINTS-SYSTEM: NORD.LEAGUECS.RO"
};
 
public client_disconnected(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, "%s",g_Names[g_BotsCount] );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++;
        }
}

- Instalare: Instalare normala ca la orice plugin.

Edited by OCEAN1337
  • Dislike 1

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use & Privacy Policy