Raised This Month: $51 Target: $400
 12% 

health + armor + refill ammo on kill (CSDM)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
theuser
Member
Join Date: Jul 2020
Old 08-22-2021 , 12:54   health + armor + refill ammo on kill (CSDM)
Reply With Quote #1

hi
i need a plugin that automatically set your Health & Armor & your gun ammo to FULL right after you kill an enemy!
and Also support ffa mode
theuser is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-22-2021 , 14:31   Re: health + armor + refill ammo on kill (CSDM)
Reply With Quote #2

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

// weapons offsets
#define OFFSET_CLIPAMMO        51
#define OFFSET_LINUX_WEAPONS    4
#define fm_cs_set_weapon_ammo(%1,%2)    set_pdata_int(%1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS)

const m_pActiveItem 373;

const 
NOCLIP_WPN_BS    = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

new const 
g_MaxClipAmmo[] = 
{
    
0,
    
13//CSW_P228
    
0,
    
10//CSW_SCOUT
    
0,  //CSW_HEGRENADE
    
7,  //CSW_XM1014
    
0,  //CSW_C4
    
30,//CSW_MAC10
    
30//CSW_AUG
    
0,  //CSW_SMOKEGRENADE
    
15,//CSW_ELITE
    
20,//CSW_FIVESEVEN
    
25,//CSW_UMP45
    
30//CSW_SG550
    
35//CSW_GALIL
    
25//CSW_FAMAS
    
12,//CSW_USP
    
20,//CSW_GLOCK18
    
10//CSW_AWP
    
30,//CSW_MP5NAVY
    
100,//CSW_M249
    
8,  //CSW_M3
    
30//CSW_M4A1
    
30,//CSW_TMP
    
20//CSW_G3SG1
    
0,  //CSW_FLASHBANG
    
7,  //CSW_DEAGLE
    
30//CSW_SG552
    
30//CSW_AK47
    
0,  //CSW_KNIFE
    
50//CSW_P90
}

public 
plugin_init()
{
   
RegisterHam(Ham_Killed"player""fw_player_killed_post"1);
}

public 
fw_player_killed_post(victimattackergibs)
{
   if( 
<= attacker && attacker <= 32 && victim != attacker )
   {
      static 
iWeapon;
      if( (
iWeapon=get_user_weapon(attacker)) > && !((1<<iWeapon) & NOCLIP_WPN_BS) )
      {
          
fm_cs_set_weapon_ammoget_pdata_cbase(attackerm_pActiveItem) , g_MaxClipAmmoiWeapon ] );
      }
      
set_user_health(attacker100);
      
set_user_armor(attacker100);
   }

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-22-2021 at 14:33.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 04:47.


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