|
Author
|
Message
|
|
Member
|

12-12-2011
, 00:29
How to Block cz bot from putting silencer on?
|
#1
|
Hello,
I am trying to get cz bots to never use a silencer on the USP and possibly sometimes use silencer on m4 and sometimes use burst on glock and famas. Disabling USP silencer on bots is the most importance issue however.
I used ConnorMcLeod's ham_register_cz_bots in thinking that the following script would work for bots, but it doesn't. It only works for humans. If it were possible to only block usp silencer on bots that would be even better.
Here is the script:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
const m_flNextSecondaryAttack = 47
public plugin_init()
{
register_plugin( "Block USP Secondary Attack", "1.0", "Amxx Community" )
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_usp" , "Event_BlockSecondaryAttack" , 1 )
RegisterHam( Ham_Item_Deploy , "weapon_usp" , "Event_BlockSecondaryAttack", 1 )
}
public Event_BlockSecondaryAttack ( const Entity )
{
set_pdata_float( Entity , m_flNextSecondaryAttack , 9999.0, 4 )
}
public cz_bot_ham_registerable( id )
{
}
Thanks so much for any assistance.
|
|
|
|