Raised This Month: $32 Target: $400
 8% 

Drop weapon restriction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
administratora
Member
Join Date: Mar 2015
Old 07-22-2017 , 10:41   Drop weapon restriction
Reply With Quote #1

How can I restrict dropping an awp with a message "This weapon cannot be dropped" just as the knife
administratora is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-22-2017 , 15:30   Re: Drop weapon restriction
Reply With Quote #2

Hook register clcmd(drop) check if the client holding an awp by get_user_weapon == CSW_AWP print in center that msg then return 1/PLUGIN_HANDLED.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-22-2017 at 15:31.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 07-23-2017 , 01:55   Re: Drop weapon restriction
Reply With Quote #3

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

public plugin_init(){
    
register_plugin("Block AWP Drop","v1.0","Hyuna");
    
RegisterHam(Ham_CS_Item_CanDrop,"weapon_awp","fw_CSItemCanDropPre",0);
}

public 
fw_CSItemCanDropPre(entity){
    return 
HAM_SUPERCEDE;

__________________

Last edited by simanovich; 07-23-2017 at 01:56.
simanovich 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 20:04.


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