Raised This Month: $ Target: $400
 0% 

Bot Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
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
MaXs
Member
Join Date: Jan 2017
Old 01-22-2017 , 16:34   Re: Bot Plugin
Reply With Quote #2

better download real bots or POD Bots, sorry if im wrong.
MaXs is offline
SpannerSpammer
Member
Join Date: Mar 2006
Old 01-23-2017 , 00:54   Re: Bot Plugin
Reply With Quote #3

Your Bot creation code is incomplete. Use this code snippet from
the kz_dajrokan plugin as a template to spawn a bot in CS:
Code:
public mi_bot_connect()
{
    if (!bot_id)
    { 
        bot_id = engfunc(EngFunc_CreateFakeClient, BOT_NAME) 
        new ptr[128] 
        dllfunc(DLLFunc_ClientConnect, bot_id, BOT_NAME, "127.0.0.1", ptr) 
        dllfunc(DLLFunc_ClientPutInServer, bot_id) 
        cs_set_user_team(bot_id, CS_TEAM_CT, CS_CT_URBAN) 
        dllfunc(DLLFunc_Spawn, bot_id) 
        set_pev(bot_id, pev_effects, (pev(bot_id, pev_effects) | 128)) 
        set_pev(bot_id, pev_solid, 0) 
        bot_userid = get_user_userid(bot_id) 
        set_user_origin(bot_id, origo) 
    } 

    return PLUGIN_CONTINUE 
}
__________________
[NeoTF|DEV]SpannerSpammer-[AoE]-
NeoTF Development Team.
http://steamcommunity.com/groups/neotf
SpannerSpammer is offline
PurposeLess
Junior Member
Join Date: Jul 2016
Old 01-23-2017 , 06:08   Re: Bot Plugin
Reply With Quote #4

@SpannerSpammer

Can you help me plz ? I couldn't finish the plugin?
etc. what is origo ?

Can you give me "plugin who finished" ?
Thanks for helps
PurposeLess is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-23-2017 , 13:19   Re: Bot Plugin
Reply With Quote #5

origo is the variable in which the origin is stored.
__________________
edon1337 is offline
SpannerSpammer
Member
Join Date: Mar 2006
Old 01-23-2017 , 16:33   Re: Bot Plugin
Reply With Quote #6

@PurposeLess

Sorry, I'm not a CS coder, I can't really help you with this.

The code snippet I gave you was just to show you how it's
done, you have to modify it and merge it with your own code.
__________________
[NeoTF|DEV]SpannerSpammer-[AoE]-
NeoTF Development Team.
http://steamcommunity.com/groups/neotf
SpannerSpammer is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-24-2017 , 08:05   Re: Bot Plugin
Reply With Quote #7

here is what you want : https://forums.alliedmods.net/showthread.php?t=293059
.
yas17sin is offline
Send a message via ICQ to yas17sin
PurposeLess
Junior Member
Join Date: Jul 2016
Old 01-25-2017 , 09:16   Re: Bot Plugin
Reply With Quote #8

@yas17sin

It's not thing I wanna. The bot will spawn in round start and stay put like afk players.
But It'll never be in the air. Nobody will understand this is bot and I wanna ping to bots.

Shortly I wanna it will be like this.



It will have ping in score.And While it spawn, it will be like in this photo. We can hit it. While we kill it, it die like normal players
PurposeLess is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-25-2017 , 09:36   Re: Bot Plugin
Reply With Quote #9

the bot link i give you the bot can be in team.
but they can't spawn as normal player and they don't have ping but at least they can be in teams.

just edit it the plugin and make the things you want with !

Last edited by yas17sin; 01-25-2017 at 09:36.
yas17sin is offline
Send a message via ICQ to yas17sin
MaXs
Member
Join Date: Jan 2017
Old 01-25-2017 , 10:32   Re: Bot Plugin
Reply With Quote #10

Download fakeplayer thing and use it
MaXs is offline
Reply



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 04:46.


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