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

Is it possible to hook the grenade explode event?


Post New Thread Reply   
 
Thread Tools Display Modes
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 04-27-2010 , 19:42   Re: Is it possible to hook the grenade explode event?
Reply With Quote #11

wow, i cant believe i forgot about that
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-27-2010 , 19:50   Re: Is it possible to hook the grenade explode event?
Reply With Quote #12

Quote:
Originally Posted by Bugsy View Post
That method uses a Float, wrecked.

Float: origin[ 3 ]
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 04-28-2010 , 00:29   Re: Is it possible to hook the grenade explode event?
Reply With Quote #13

Ill borrow this thread a bit..

I want almost the same as this person but i want it for smoke-grenade.

Any examples? how can i check what kind of grenade that is exploding etc?
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 04-28-2010 , 15:33   Re: Is it possible to hook the grenade explode event?
Reply With Quote #14

get_user_weapon(yadda)

if(smokenadeyadda)
{
etc
}
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-28-2010 , 17:00   Re: Is it possible to hook the grenade explode event?
Reply With Quote #15

Quote:
Originally Posted by NiQu View Post
Ill borrow this thread a bit..

I want almost the same as this person but i want it for smoke-grenade.

Any examples? how can i check what kind of grenade that is exploding etc?
Search for fm_cs_get_grenade_type() made by VEN.

Quote:
Originally Posted by r4ndomz View Post
get_user_weapon(yadda)

if(smokenadeyadda)
{
etc
}
Wow.
How can a player be holding the grenade that just exploded?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 04-28-2010 , 23:28   Re: Is it possible to hook the grenade explode event?
Reply With Quote #16

Quote:
Originally Posted by Exolent[jNr] View Post
Search for fm_cs_get_grenade_type() made by VEN.
Okay ill do so.

Quote:
Originally Posted by Exolent[jNr] View Post
Wow.
How can a player be holding the grenade that just exploded?
You just pwnd him
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 04-29-2010 , 17:23   Re: Is it possible to hook the grenade explode event?
Reply With Quote #17

Quote:
Originally Posted by Exolent[jNr] View Post
Wow.
How can a player be holding the grenade that just exploded?
Mabye you need an explanation, first, you call that code in the event grenade_throw. Then, you write if(smokenadevariable) in the think. Then, you write whatever you want. I wouldve wrote it more detailed if i was asked. That was obviously a quick example, not a tutorial.
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 05-05-2010 , 11:20   Re: Is it possible to hook the grenade explode event?
Reply With Quote #18

Does this method makes it possible to enlarge the radius of the explosion erupting from the HE grenade when it has exploded? I did look at Napalm and from what I saw there it does. If that is the case, could someone please clarify exactly how it can be done using this to get the nade id:

PHP Code:
public on_ammox(id)
{
    if (!
sh_is_active() || !is_user_alive(id) || !gHasTech[id]) return
    
    if (
read_data(1) == AMMOX_HEGRENADE)
    {
        new 
iAmmoCount read_data(2)
        
        if (
iAmmoCount == && !gBlockTask[id])
        {
            
set_task(get_pcvar_float(pCvarTimer), "tech_givehe"id)
            
            new 
iCurrent = -1string[32]
            do
            {
                
iCurrent get_grenade_id(idstring31iCurrent)
            }
            while (
iCurrent && !equali("models/w_hegrenade.mdl"string))
            
            if (
iCurrent)
            {
                
entity_set_model(iCurrentgHEModel1)
            }
        }
        else if (
iAmmoCount 0)
        {
            
gBlockTask[id] = false
            remove_task
(id)
        }
    }

Thanks!
__________________
The Art of War 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 18:51.


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