Raised This Month: $359 Target: $400
 89%   Almost there!

Solved Bot buy defuse


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 05-27-2022 , 15:05   Bot buy defuse
Reply With Quote #1

Is there a plugin that makes it possible for bots to buy deactivation kit?
Just as they buy vest and helmet

Last edited by SoulWeaver16; 07-11-2022 at 14:41.
SoulWeaver16 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-11-2022 , 12:35   Re: Bot buy defuse
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <hamsandwich>

new const VERSION[] = "0.0.1"

public plugin_init()
{
    
register_plugin("Give Defuse To Bots"VERSION"AMXX Community")

    if( 
find_ent_by_class(-1"func_bomb_target") > || find_ent_by_class(-1"info_bomb_target") > )
    {
        
RegisterHam(Ham_Spawn"player""Ham__CBasePlayer_Spawn__Post"true)
    }
}

public 
Ham__CBasePlayer_Spawn__Postid )
{
    if( 
is_user_alive(id) && is_user_bot(id) && cs_get_user_team(id) == CS_TEAM_CT )
    {
        
cs_set_user_defuse(id1)
    }

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 07-11-2022 , 14:39   Re: Bot buy defuse
Reply With Quote #3

Quote:
Originally Posted by bibu View Post
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <hamsandwich>

new const VERSION[] = "0.0.1"

public plugin_init()
{
    
register_plugin("Give Defuse To Bots"VERSION"AMXX Community")

    if( 
find_ent_by_class(-1"func_bomb_target") > || find_ent_by_class(-1"info_bomb_target") > )
    {
        
RegisterHam(Ham_Spawn"player""Ham__CBasePlayer_Spawn__Post"true)
    }
}

public 
Ham__CBasePlayer_Spawn__Postid )
{
    if( 
is_user_alive(id) && is_user_bot(id) && cs_get_user_team(id) == CS_TEAM_CT )
    {
        
cs_set_user_defuse(id1)
    }

It works great, thanks
Attached Files
File Type: sma Get Plugin or Get Source (give_defuse_to_bots.sma - 4 views - 604 Bytes)
SoulWeaver16 is offline
Reply


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 11:30.


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