Raised This Month: $ Target: $400
 0% 

Block Grenade throw


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 09-28-2011 , 09:22   Block Grenade throw
Reply With Quote #1

How can I block Grenade throw? No matter if smk, flash or he...
Blue Snake. is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-28-2011 , 09:26   Re: Block Grenade throw
Reply With Quote #2

not sure if this works, but you could try:
PHP Code:
#include <csx>
public  grenade_throw indexgreindexwId ) {
return 
PLUGIN_HANDLED

jimaway is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-28-2011 , 09:31   Re: Block Grenade throw
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?t=116327
__________________
Bugsy is offline
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 09-28-2011 , 10:02   Re: Block Grenade throw
Reply With Quote #4

jimaway, it doesn't work.

Thanks, Bugsy. Worked with supercede.
Blue Snake. is offline
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 09-30-2011 , 12:44   Re: Block Grenade throw
Reply With Quote #5

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

#define PLUGIN    "Give Smoke"
#define AUTHOR    "Blue Snake."
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /smk","cmdSmk")
    
RegisterHam(Ham_Weapon_PrimaryAttack,"weapon_smokegrenade","smkThrow")
}


public 
cmdSmk(id)
{
    if(!
is_user_alive(id))
        
ColorChat(idBLUE,"^x04[Smk]^x01 You must be alive.")
    else
        
give_item(id"weapon_smokegrenade")
    return 
PLUGIN_HANDLED
}


public 
smkThrow(id)
    return 
HAM_SUPERCEDE 

Yes, it works. I can't throw nade. But if I hold mouse1 when I die, the smoke blow up. Any idea? Or any idea to remove the gas?
Blue Snake. is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 09-30-2011 , 13:11   Re: Block Grenade throw
Reply With Quote #6

Maybe make plugin that if player has grenade then he drop it? Then will be no problems.
Why you need code that gives grenade if you don't want it to be used?
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 09-30-2011 , 13:26   Re: Block Grenade throw
Reply With Quote #7

Because hide'n'seek players usually like to jump with nades, and I need it on a train server. And nade's smoke = low fps.

And the plugin you're talkin about will remove the nade's blow?

You are talking about this? I go test and edit this post in 5-10 min.
http://forums.alliedmods.net/showthread.php?p=200531

Edit: It doesn't work. If I die w/o click, the nade will be dropped, but if I hold click, the nade will blow up after drop.

Last edited by Blue Snake.; 09-30-2011 at 13:38.
Blue Snake. is offline
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 09-30-2011 , 16:33   Re: Block Grenade throw
Reply With Quote #8

Problem sloved.
PHP Code:
public event_death()
    
engclient_cmd(read_data(2),"weapon_knife"
Blue Snake. 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 19:36.


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