Raised This Month: $ Target: $400
 0% 

Block weapon switch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-17-2018 , 10:11   Re: Block weapon switch
Reply With Quote #4

Check my jailbreak_main plugin i am using ham_item_can_deploy_pre to remove the weapon.
PHP Code:
public fw_wpn_deployed_pre(const iWpn)
{
    new 
id get_pdata_cbase(iWpnm_iWeaponOwnerWEAPON_LINUXDIFF)
    
    if(!
g_user_wpns_blocked[id]) return HAM_IGNORED;
    
    new 
sClassname[32], Wpn
    pev
(iWpnpev_classnamesClassnamecharsmax(sClassname))
    
    
Wpn cs_get_weapon_id(iWpn);
    
    if(
check_flag(g_user_wpns_blocked[id], Wpn))
    {
        
set_pev(idpev_weapons, (pev(id,pev_weapons) & ~(1<<Wpn)));
        
ExecuteHam(Ham_RemovePlayerItem,id,iWpn);
        
ExecuteHam(Ham_Item_KilliWpn);
        
SetHamReturnInteger(false);
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

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

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 



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 07:30.


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