Raised This Month: $51 Target: $400
 12% 

[HELP] Remove grenades


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-25-2010 , 20:56   [HELP] Remove grenades
#1

hi! As i can remove the grenades cannot find a code :S

"Flashbang,hegranade,smokegranade"
flamin is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-25-2010 , 21:17   Re: [HELP] Remove grenades
#2

Try the following methods:
1. Use remove_entity or fm_remove_entity
2. Set pev_flags for the entity to FL_KILLME

If you need the grenade entity index, use the CSX forward:
Code:
forward grenade_throw( index,greindex,wId );
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-26-2010 , 00:12   Re: [HELP] Remove grenades
#3

I do not understand very well what you say you can help a little more with the code? I am a little rookie in this :S
flamin is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-26-2010 , 00:20   Re: [HELP] Remove grenades
#4

Code:
remove_entity( iGrenade )
or
Code:
set_pev( iGrenade, pev_flags, FL_KILLME )
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-26-2010 , 00:23   Re: [HELP] Remove grenades
#5

Only send that? There is a way to create a cvar activation and desactivation?

Last edited by flamin; 03-26-2010 at 01:23.
flamin is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-26-2010 , 01:27   Re: [HELP] Remove grenades
#6

I have tried to compile but i got error as i can remove the grenades in this code?

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

#define MONEYGIVEN  16000

public plugin_init() 

  
register_plugin("DeathMatch","1.0","Dicope"
  
register_event("DeathMsg","death","a"
  
register_cvar("dm_enabled","0")
  
register_cvar("dm_protection","1")
  
register_cvar("dm_protection_time","3")
  
RegisterHamHam_Spawn"player""HAM_Spawn_Post")
  
register_event("StatusIcon""GotBomb""be""1=1""1=2""2=c4")


public 
death() 

  if (
get_cvar_num("dm_enabled")==1)
  {
    new 
dead read_data(2)
    
set_task(0.1,"live",dead)
    new 
murderer read_data(1)
    if (
get_cvar_num("dm_killbonus")==&& murderer!=dead)
    {
      new 
money cs_get_user_money(murderer)
      new 
money2 money get_cvar_num("dm_killbonus_amount")
      
cs_set_user_money(murderer,money2,1)
      if (
money2 >= 0)
      {
        
money2 money2 0
        cs_set_user_money
(murderer,money2,0)
      } else {
    
cs_set_user_money(murderer,0,0)
      }
    }
  }
}

public 
live(dead)
{
  
spawn(dead)
  if (
get_cvar_num("dm_protection")==1)
  {
    
set_user_godmode(dead,1)
    new 
Float:protect get_cvar_float("dm_protection_time")
    
set_task(protect,"stopprotect",dead)
  }
  if (
get_user_team(dead)==1
  { 
    
give_item(dead,"weapon_knife"
    
give_item(dead,"weapon_glock18"
    
give_item(dead,"ammo_9mm"
    
give_item(dead,"ammo_9mm"
  } 
  else 
  { 
    
give_item(dead,"weapon_knife"
    
give_item(dead,"weapon_usp"
    
give_item(dead,"ammo_45acp"
    
give_item(dead,"ammo_45acp"
  } 
}

public 
stopprotect(dead)
{
  
set_user_godmode(dead)
}

public 
HAM_Spawn_Postid )
{
    if( 
is_user_aliveid ) )
        
cs_set_user_moneyid16000 )
}

public 
GotBomb(id
{
  if (
get_cvar_num("dm_enabled")==1)
  {    
    
fm_strip_user_gun(idCSW_C4)
  }

Please help in this to remove items i am completely rookie!!!

I have already removed the C4 only lack remove the grenades
flamin is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-26-2010 , 19:59   Re: [HELP] Remove grenades
#7

Only need the code to remove the grenades please help!
flamin is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-26-2010 , 20:13   Re: [HELP] Remove grenades
#8

Stop spamming. You didn't even try to put in the grenade removing in your source code.

When do you want grenades to be removed?
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-26-2010 , 20:18   Re: [HELP] Remove grenades
#9

Look at my code can remove the c4 but only when this plug is activated the "if (get_cvar_num("dm_enabled")==1)" but of truth that i have no idea as removing the grenades you can help with the code
flamin is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-26-2010 , 20:23   Re: [HELP] Remove grenades
#10

...

PHP Code:
if( user_has_weaponidCSW_HEGRENADE ) )
    
fm_strip_user_gunidCSW_HEGRENADE )

if( 
user_has_weaponidCSW_FLASHBANG ) ) 
    
fm_strip_user_gunidCSW_FLASHBANG )

if( 
user_has_weaponidCSW_SMOKEGRENADE ) ) 
    
fm_strip_user_gunidCSW_SMOKEGRENADE 
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Closed Thread



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


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