Raised This Month: $ Target: $400
 0% 

Players to receive a HE grenade and clip refiling when make a headshot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 09-21-2023 , 17:21   Players to receive a HE grenade and clip refiling when make a headshot
Reply With Quote #1

Is it possible to make this CSDM mod to give players a HE grenade and clip refiling when they make a headshot on a enemy player? I already enabled the option that gives grenades, including a HE grenade, when a player is spawned/respawned and select weapons. Now, i want to make the mod give a HE grenade and clip refiling to each player who kills another player with a headshot.

How is the feature in question added, via a third-party plugin, or is there a built-in option for that?
GlobalPlague is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 09-21-2023 , 21:39   Re: Players to receive a HE grenade and clip refiling when make a headshot
Reply With Quote #2

  • there is a cvar to give the grenade automatically to T or CT
  • to get it when shooting the head, you can hook this

    PHP Code:
    public client_death(idvictimweaponhitplace)    //->id=attacker
    {
        if( !
    id || victim == id || !is_user_connected(id) ) 
            return
        
        if(
    hitplace == HIT_HEAD
            
    give_item(id"weapon_hegrenade")

__________________
mlibre is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 09-23-2023 , 17:25   Re: Players to receive a HE grenade and clip refiling when make a headshot
Reply With Quote #3

Quote:
Originally Posted by mlibre View Post
  • there is a cvar to give the grenade automatically to T or CT
  • to get it when shooting the head, you can hook this

    PHP Code:
    public client_death(idvictimweaponhitplace)    //->id=attacker
    {
        if( !
    id || victim == id || !is_user_connected(id) ) 
            return
        
        if(
    hitplace == HIT_HEAD
            
    give_item(id"weapon_hegrenade")

What is this game.cfg file? I don't see it in the directory of the CSDM mod i use.
GlobalPlague is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 09-24-2023 , 07:00   Re: Players to receive a HE grenade and clip refiling when make a headshot
Reply With Quote #4

Quote:
Originally Posted by GlobalPlague View Post
What is this game.cfg file? I don't see it in the directory of the CSDM mod i use.
is requerid regamedll to use this cvar
__________________
mlibre 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:29.


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