Raised This Month: $ Target: $400
 0% 

How to make this plugin to not cause zombies release sparkles when shot at the head?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 03-23-2022 , 08:35   How to make this plugin to not cause zombies release sparkles when shot at the head?
Reply With Quote #1

When you play in classical CS 1.6 server, if you shoot a human, who has bought armor, at the head, his head will release sparkles. Sparkles won't be released from a human who has no armor.

The following plugin is about giving armor to human bots:

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

#define EXCLUDED_WEAPONS (1<<2 | 1<<CSW_KNIFE | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE | 1<<CSW_C4)

public plugin_init()
{
    
register_plugin("No Recoil Bots""1.0""OciXCrom")
    
    new 
szWeapon[18]
    
    for(new 
CSW_P228<= CSW_P90i++)
    {
        if(!(
EXCLUDED_WEAPONS & (1<<i)) && get_weaponname(iszWeaponcharsmax(szWeapon)))
        {
            
RegisterHam(Ham_Weapon_PrimaryAttackszWeapon"OnPrimaryAttack"1)
        }
    }

    
RegisterHam(Ham_Spawn"player""OnPlayerSpawn"1)
}
  
public 
OnPrimaryAttack(iEnt)
{
    static 
id
    id 
pev(iEntpev_owner)
    
    if(
is_user_bot(id))
    {
        
set_pev(idpev_punchangle, {0.00.00.0})
    }
}

public 
OnPlayerSpawn(id)
{
    if(
is_user_alive(id) && is_user_bot(id))
    {
        
cs_set_user_armor(id200CS_ARMOR_VESTHELM)
    }

The problem is that this plugin makes zombies release sparkles from their heads, when shot at the head, as if they have armor, despite the fact they have 0 armor.

Can someone fix this problem? I don't want zombies to release sparkles from their head, as if they have armor.

Last edited by GlobalPlague; 03-23-2022 at 08:38.
GlobalPlague 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 09:14.


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