Raised This Month: $ Target: $400
 0% 

[HELP] RegisterHam for csbots?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-07-2015 , 17:12   Re: [HELP] RegisterHam with csbots?
Reply With Quote #4

Guys , I am wanting to register a ham for bots without the use of cs_ham_bots_api , that's the code:

PHP Code:
#include < amxmodx >
#include < fun >
#include < cstrike >
#include < hamsandwich >
#include < zombieplague >

new bot_weapons[][] = 
{
    
"weapon_m4a1",
    
"weapon_ak47",
    
"weapon_sg552"
}

public 
plugin_init() 
{
    
register_plugin("[ZP] CS/CZ Bot Weapons""4.3""CrazY");
    
RegisterHam(Ham_Spawn"player""fw_HamBotSpawnPost"1true);
}

public 
fw_HamBotSpawnPost(id)
{
    if(
is_user_alive(id) && is_user_bot(id))
    {
        new 
size_bot_weapons random(sizeof bot_weapons);
        
give_item(idbot_weapons[size_bot_weapons]);
        
cs_set_user_bpammo(idget_weaponid(bot_weapons[size_bot_weapons]), 90);
    }
}

public 
zp_user_humanized_post(id)
{
    if(
is_user_bot(id) && !zp_get_user_survivor(id))
    {
        new 
size_bot_weapons random(sizeof bot_weapons);
        
give_item(idbot_weapons[size_bot_weapons]);
        
cs_set_user_bpammo(idget_weaponid(bot_weapons[size_bot_weapons]), 90);
    }

__________________









Last edited by CrazY.; 10-07-2015 at 17:13.
CrazY. is offline
 



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 22:15.


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