Raised This Month: $ Target: $400
 0% 

Bot Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
PurposeLess
Junior Member
Join Date: Jul 2016
Old 01-22-2017 , 14:17   Bot Plugin
Reply With Quote #1

Hello guys,
First I want bot for CS 1.6 like spec bots, but the bot i wanna, is going to be in Counter Terrorist team.
The Bot (It) won't be in Spec. And when the round start, it will spawn and be like real players, be seems 'em.

For ain't understands;

There is bot in Counter Terrorist Team. [Not Spec]. I wanna let it be like real players. People will never understand "It's bot"
So, It'll be like AFK Players.

Please help me.

------------------------------------------------------- Turkish translate
Merhaba arkadaşlar,
Öncelikle Ben izleyicideki botlar gibi bir bot istiyorum ama istediğim bot counter terrorist takımında olacak.
Bot izleyicide (spec) olmayacak. Round başladığında doğacak ve gerçek oyuncular gibi olacak, onlar gibi görünecek.
CT takımında olacak. Gerçek oyuncular gibi görünecek. İnsanlar onun bot olduğunu anlamayacak.
Yani afk oyuncular gibi olacak

|

PHP Code:
/* Spect Bot v1.2

My Plugins: http://skape69ta.clan.su/load/11
My Profile: http://amxmodx.su/forum/memberlist.php?mode=viewprofile&u=455
My Skype: SKAJIbnEJIb619

Light version fakefull_original

Cvars:
Èìÿ áîòà
sbot_name "Spect Bot"

Áîòà íå ñìîãóò êèêíóòü/çàáàíèòü àäìèíû
sbot_immunity "1"

Àâòîìàòè÷åñêè óáèðàòü áîòà, åñëè ñåðâåð ïîëîí
sbot_auto "1"
*/

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

new const Plugin[] = "Spect Bot"
new const Version[] = "1.2"
new const Author[] = "SKAJIbnEJIb & Bos93"

new g_BotNameg_Immunityg_Auto
new g_Bot

public plugin_init()
{
    
register_plugin(PluginVersionAuthor)

    
g_BotName register_cvar("sbot_name","Spect Bot")
    
g_Auto register_cvar("sbot_auto","1")
    
g_Immunity register_cvar("sbot_immunity","1")

    
set_task(10.0"ServerStatus"777__"b")
}

public 
createBot()
{
    new 
BotName[32]

    
get_pcvar_string(g_BotNameBotNamecharsmax(BotName))
    
g_Bot engfunc(EngFunc_CreateFakeClientBotName)

    if (
g_Bot 0
    {
        
dllfunc(MetaFunc_CallGameEntity"player"g_Bot)
        
set_pev(g_Botpev_flagsFL_FAKECLIENT)

        
set_pev(g_Botpev_model"")
        
set_pev(g_Botpev_viewmodel2"")
        
set_pev(g_Botpev_modelindex0)

        
set_pev(g_Botpev_renderfxkRenderFxNone)
        
set_pev(g_Botpev_rendermodekRenderTransAlpha)
        
set_pev(g_Botpev_renderamt0.0)

        
set_team(g_Bot)
        if (
get_pcvar_num(g_Immunity))
            
set_user_flags(g_BotADMIN_IMMUNITY)
    }
    else
        
log_amx ("[Spect Bot] Error!")

    return 
PLUGIN_CONTINUE
}

public 
removeBot(Bot)
{
    
server_cmd("kick #%d"get_user_userid(Bot))
    
g_Bot 0
}

public 
set_team(Bot)
{
    if (
cstrike_running()) {
        
cs_set_user_team(BotCS_TEAM_CT)
    }
}

public 
ServerStatus()
{
    if (
get_pcvar_num(g_Auto)) 
    {
        if(
is_user_connected(g_Bot))
        {
            if(
get_playersnum(1) > (get_maxplayers() - 2)) 
                
removeBot(g_Bot)
        }
        else
        {
            if(
get_playersnum(1)+get_maxplayers()) 
                
createBot()
        }
    }
    else
    {
        if(
is_user_connected(g_Bot))
            
createBot()
    }

    if(
is_user_connected(g_Bot))
    {
        
set_team(g_Bot)

        if (
get_user_team(g_Bot) > 0) {
            
server_cmd("kick #%d"get_user_userid(g_Bot))
            
createBot()
        }
    }


Last edited by PurposeLess; 01-22-2017 at 14:21.
PurposeLess is offline
 


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


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