Raised This Month: $ Target: $400
 0% 

[HELP] RegisterHam for csbots?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-07-2015 , 15:50   [HELP] RegisterHam for csbots?
Reply With Quote #1

Hi , I tried to register a ham to the csbots but i am getting a compile error , the code is this:

PHP Code:
RegisterHam(Ham_Spawn"player""fw_HamPlayerSpawnPost"1true); 
__________________









Last edited by CrazY.; 10-08-2015 at 06:40.
CrazY. is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-07-2015 , 16:05   Re: [HELP] RegisterHam with csbots?
Reply With Quote #2

Quote:
Originally Posted by CrazY. View Post
Hi , I tried to register a ham to the csbots but i am getting a compile error , the code is this:

PHP Code:
RegisterHam(Ham_Spawn"player""fw_HamPlayerSpawnPost"1true); 
What are you talking about? Your post doesn't make any sense. Post your code and explain what you're trying to do.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 10-07-2015 at 16:07.
wickedd is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 10-07-2015 , 16:48   Re: [HELP] RegisterHam with csbots?
Reply With Quote #3

Post your full code and the error
redivcram is offline
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
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-07-2015 , 18:00   Re: [HELP] RegisterHam with csbots?
Reply With Quote #5

Quote:
Originally Posted by CrazY. View Post
Guys , I am wanting to register a ham for bots without the use of cs_ham_bots_api
This doesn't make sense. What do you mean register ham for bots? Anyway, you can use is_user_bot(). Since you didn't post the full code tell us what's not working.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Hartmann
Senior Member
Join Date: Nov 2014
Old 10-07-2015 , 18:11   Re: [HELP] RegisterHam with csbots?
Reply With Quote #6

https://forums.alliedmods.net/showpo...2&postcount=15
__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-08-2015 , 06:39   Re: [HELP] RegisterHam with csbots?
Reply With Quote #7

Quote:
Originally Posted by Hartmann View Post
I did not understand.

Quote:
Originally Posted by yokomo View Post
You need a whole new amxmodx 1.8.3 developer build package, this feature only exist on new hamsandwich module. Official amxmodx 1.8.2 doesn't have this function.

From hamsandwich.inc (amxmodx 1.8.3 dev):
If you only update the hansadwich work?
__________________








CrazY. is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-08-2015 , 01:31   Re: [HELP] RegisterHam with csbots?
Reply With Quote #8

Quote:
Originally Posted by CrazY. View Post
Hi , I tried to register a ham to the csbots but i am getting a compile error , the code is this:

PHP Code:
RegisterHam(Ham_Spawn"player""fw_HamPlayerSpawnPost"1true); 
You need a whole new amxmodx 1.8.3 developer build package, this feature only exist on new hamsandwich module. Official amxmodx 1.8.2 doesn't have this function.

From hamsandwich.inc (amxmodx 1.8.3 dev):
Quote:
/**
* Hooks the virtual table for the specified entity class.
* An example would be: RegisterHam(Ham_TakeDamage, "player", "player_hurt");
* Look at the Ham enum for parameter lists.
*
* @param function The function to hook.
* @param EntityClass The entity classname to hook.
* @param callback The forward to call.
* @param post Whether or not to forward this in post.
* @param specialbot Whether or not to enable support for bot without "player" classname.
* @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off.
*/
native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[], Post=0, bool:specialbot = false);
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019

Last edited by yokomo; 10-08-2015 at 01:32.
yokomo 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 22:15.


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