Raised This Month: $ Target: $400
 0% 

Strip weapons, i dont want c4!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-08-2009 , 05:18   Strip weapons, i dont want c4!
Reply With Quote #1

Hi, im really need a easy stripping method, which strips all just not c4, ive tryed:
PHP Code:
stock drop(id)
{
    
fm_strip_user_weapons(id)
    
fm_set_user_armor(id0)

But that strips c4
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 05-08-2009 , 05:34   Re: Strip weapons, i dont want c4!
Reply With Quote #2

if you using fun module. this is the code:
Quote:
give_item(id, "weapon_c4")
Else if you using fakemeta_util module. this is the code:
Quote:
fm_give_item(id, "weapon_c4")
Anggara_nothing is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-08-2009 , 05:45   Re: Strip weapons, i dont want c4!
Reply With Quote #3

Code:
stock drop(id) {         new bHadBomb;           if (user_has_weapon(id, CSW_C4))                 bUserHadBomb = true;           fm_strip_user_weapon(id)         fm_set_user_armor(id, 0)           if (bHadBomb)                 fm_give_item(id, "weapon_c4"); }
__________________
hleV is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-08-2009 , 05:55   Re: Strip weapons, i dont want c4!
Reply With Quote #4

Dosent all get the c4 bomb then?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-08-2009 , 07:20   Re: Strip weapons, i dont want c4!
Reply With Quote #5

I already gave you a working code...

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

#define OFFSET_PRIMARYWEAPON    116
#define OFFSET_C4_SLOT        372

StripUserWeapons(id)
{
    new 
iC4Ent get_pdata_cbase(idOFFSET_C4_SLOT)
    if( 
iC4Ent )
    {
        
set_pdata_cbase(idOFFSET_C4_SLOTFM_NULLENT)
    }

    
strip_user_weapons(id)
    
set_pdata_int(idOFFSET_PRIMARYWEAPON0)

    if( 
iC4Ent )
    {
        
entity_set_int(idEV_INT_weaponsentity_get_int(idEV_INT_weapons) | (1<<CSW_C4))
        
set_pdata_cbase(idOFFSET_C4_SLOTiC4Ent)
        
cs_set_user_bpammo(idCSW_C41)
        
cs_set_user_plant(id1)
    }
    return 
PLUGIN_HANDLED

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-08-2009 , 07:33   Re: Strip weapons, i dont want c4!
Reply With Quote #6

Shouldnt i stock this?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-08-2009 , 10:06   Re: Strip weapons, i dont want c4!
Reply With Quote #7

This is a stock.
Just use StripUserWeapons(id) where you need it in your plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-08-2009 , 13:13   Re: Strip weapons, i dont want c4!
Reply With Quote #8

I rename it to drop(id) Then it allready in my code
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
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 01:30.


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