Raised This Month: $ Target: $400
 0% 

How can I stop a hegrenade explode?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
@.SizNeR
Member
Join Date: Jun 2013
Old 08-27-2013 , 11:23   How can I stop a hegrenade explode?
Reply With Quote #1

How can I stop a hegrenade explode?

Thanks for help.
@.SizNeR is offline
bat
Veteran Member
Join Date: Jul 2012
Old 08-27-2013 , 11:29   Re: How can I stop a hegrenade explode?
Reply With Quote #2

I don't understand what you need
bat is offline
Send a message via Skype™ to bat
@.SizNeR
Member
Join Date: Jun 2013
Old 08-27-2013 , 11:55   Re: How can I stop a hegrenade explode?
Reply With Quote #3

I want to stop a hegrenade explode.

An image:
[IMG]http://img211.**************/img211/3114/3ws.jpg[/IMG]
@.SizNeR is offline
President
Member
Join Date: May 2013
Old 08-27-2013 , 12:20   Re: How can I stop a hegrenade explode?
Reply With Quote #4

dmgtime -> get_gametime()+999999999999
President is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 08-27-2013 , 18:22   Re: How can I stop a hegrenade explode?
Reply With Quote #5

He just wants to stop the he explosion, what is so hard to understand.
Not sure if this works
PHP Code:
register_message(SVC_TEMPENTITY"OnSvcTempEntity");
public 
OnSvcTempEntity(ent) {
    if((
ent find_ent_by_class(ent"grenade")) && is_valid_ent(ent) && get_msg_arg_int(1) == TE_EXPLOSION)
        return 
PLUGIN_HANDLED;
    return 
PLUGIN_CONTINUE;


Last edited by Clauu; 08-27-2013 at 18:25.
Clauu is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-27-2013 , 21:06   Re: How can I stop a hegrenade explode?
Reply With Quote #6

Could be either since it hasn't been explained properly.

To prevent the grenade from exploding, hook CGrenade::Detonate3 with Orpheu and supercede.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 08-27-2013 at 21:07.
hornet is offline
SpaWn2KiLl
Member
Join Date: Aug 2012
Old 09-01-2013 , 08:26   Re: How can I stop a hegrenade explode?
Reply With Quote #7

Here it goes

PHP Code:

public plugin_init()
{
    
register_think("grenade","think_grenade");
}

public 
think_grenade(ent) {
    new 
model[32];
    
entity_get_string(ent,EV_SZ_model,model,31);
    
    
// stop grenade from blowing up
    
return PLUGIN_HANDLED;
 } 
__________________
SpaWn2KiLl is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 09-01-2013 , 08:55   Re: How can I stop a hegrenade explode?
Reply With Quote #8

xactly
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 09-02-2013 , 04:47   Re: How can I stop a hegrenade explode?
Reply With Quote #9

Quote:
Originally Posted by SpaWn2KiLl View Post
Here it goes

PHP Code:

public plugin_init()
{
    
register_think("grenade","think_grenade");
}

public 
think_grenade(ent) {
    new 
model[32];
    
entity_get_string(ent,EV_SZ_model,model,31);
    
    
// stop grenade from blowing up
    
return PLUGIN_HANDLED;
 } 
Quote:
Originally Posted by MokeN View Post
xactly
I can't think of a more inefficient way of preventing a grenade explosion.
You also get the grenade model for no purpose at all - my best guess is your going to use it to check which grenade has been thrown ( since at the moment it will prevent all grenades from exploding ), once again being a poor way of making that determination.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
SpaWn2KiLl
Member
Join Date: Aug 2012
Old 09-02-2013 , 08:25   Re: How can I stop a hegrenade explode?
Reply With Quote #10

Quote:
Originally Posted by hornet View Post
I can't think of a more inefficient way of preventing a grenade explosion.
You also get the grenade model for no purpose at all - my best guess is your going to use it to check which grenade has been thrown ( since at the moment it will prevent all grenades from exploding ), once again being a poor way of making that determination.
He asked one way to do it... I did it...

Can you say how to stop a single grenade to explode please?
__________________
SpaWn2KiLl 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 00:10.


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