Raised This Month: $ Target: $400
 0% 

[ SOLVED ] Strip especified user weapon?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 10-06-2015 , 17:17   Re: [HELP] Strip especified user weapon?
Reply With Quote #1

You dont need is user alive check...

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

#define PLUGIN "Glock is Block"
#define VERSION "1.0"
#define AUTHOR "Krtola"

const OFFSET_LINUX_WEAPONS 4
const OFFSET_WEAPONOWNER 41

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Item_Deploy"weapon_glock""Ham_Deploy"1);
}

stock fm_cs_get_weapon_ent_owner(ent)
{
    return 
get_pdata_cbase(entOFFSET_WEAPONOWNEROFFSET_LINUX_WEAPONS)
}

public 
Ham_Deploy(ent)
{
        static 
idid fm_cs_get_weapon_ent_owner(ent)

        if (!
pev_valid(id))
        return;

        
fm_strip_user_weapons(id)
                
        
fm_give_item(id"weapon_knife")

Krtola is offline
Send a message via Skype™ to Krtola
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 22:13.


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