View Single Post
Author Message
Woodi5
Junior Member
Join Date: Nov 2020
Location: Russia
Old 12-07-2020 , 07:40   How to take away a player's shield if they are holding a knife
Reply With Quote #1

How to take away a player's shield if they are holding a knife?
I did the check "ham item deploy weapon_knife"
HTML Code:
#include <AmxModx>
#include <HamSandwich>
 
public plugin_init() 
{
   RegisterHam(Ham_Item_Deploy, "weapon_knife", "Item_Deploy_Post", 1)
}
 
public Item_Deploy_Post(weapon)
{
   new id = get_pdata_cbase(weapon, 41, 4)
   client_print(id, print_chat, "You changed your weapon for a knife") 

   return HAM_IGNORED
}

Last edited by Woodi5; 12-07-2020 at 07:50.
Woodi5 is offline