AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Players to receive a HE grenade and clip refiling when make a headshot (https://forums.alliedmods.net/showthread.php?t=343986)

GlobalPlague 09-21-2023 17:21

Players to receive a HE grenade and clip refiling when make a headshot
 
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?

mlibre 09-21-2023 21:39

Re: Players to receive a HE grenade and clip refiling when make a headshot
 
  • 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")



GlobalPlague 09-23-2023 17:25

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

Originally Posted by mlibre (Post 2810376)
  • 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.

mlibre 09-24-2023 07:00

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

Originally Posted by GlobalPlague (Post 2810482)
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


All times are GMT -4. The time now is 10:24.

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