Raised This Month: $ Target: $400
 0% 

Request a nade plugin!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FR0NTLINE
AlliedModders Donor
Join Date: Apr 2006
Location: Riverside Cali
Old 05-26-2017 , 17:42   Request a nade plugin!!!
Reply With Quote #1

Looking for a code/plugin which does this... As soon as a hand grenade hits a player it detonates, but still acts/does the same thing it's always done when it's thrown meaning it doesn't explode on impact of the wall or the ground only the player it hits.
__________________
FR0NTLINE is offline
Send a message via AIM to FR0NTLINE Send a message via MSN to FR0NTLINE Send a message via Yahoo to FR0NTLINE
PartialCloning
Senior Member
Join Date: Dec 2015
Old 05-26-2017 , 21:02   Re: Request a nade plugin!!!
Reply With Quote #2

Code:
#include <amxmodx> #include <engine> #include <fakemeta> const CGrenade = 4; const m_usEvent = 114; new m_usCreateExplosion; public plugin_init() {     register_plugin("Contact Grenade", "1.0", "Partial Cloning");     register_touch("grenade", "player", "OnTouchGrenadePlayer");     m_usCreateExplosion = engfunc(EngFunc_PrecacheEvent, 1, "events/createexplo.sc"); } public OnTouchGrenadePlayer(grenade, id) {     if(!pev_valid(grenade) || get_pdata_int(grenade, m_usEvent, CGrenade) != m_usCreateExplosion)         return PLUGIN_CONTINUE;     set_pev(grenade, pev_dmgtime, 0.0);     dllfunc(DLLFunc_Think, grenade);     return PLUGIN_HANDLED; }
PartialCloning is offline
FR0NTLINE
AlliedModders Donor
Join Date: Apr 2006
Location: Riverside Cali
Old 05-27-2017 , 20:48   Re: Request a nade plugin!!!
Reply With Quote #3

yeah didn't work thanks though
__________________
FR0NTLINE is offline
Send a message via AIM to FR0NTLINE Send a message via MSN to FR0NTLINE Send a message via Yahoo to FR0NTLINE
PartialCloning
Senior Member
Join Date: Dec 2015
Old 05-27-2017 , 21:14   Re: Request a nade plugin!!!
Reply With Quote #4

It does work. You could be using plugins that modify grenade properties such as the classname. If so you might want to modify the register_touch hook to use your custom classname.
PartialCloning is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-28-2017 , 03:42   Re: Request a nade plugin!!!
Reply With Quote #5

set_pev(grenade, pev_dmgtime, get_gametime());

Try this..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
PartialCloning
Senior Member
Join Date: Dec 2015
Old 05-28-2017 , 07:24   Re: Request a nade plugin!!!
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
set_pev(grenade, pev_dmgtime, get_gametime());

Try this..
That makes no difference. "if (pev->dmgtime <= gpGlobals->time)". The code works, something is wrong on his end.
PartialCloning is offline
FR0NTLINE
AlliedModders Donor
Join Date: Apr 2006
Location: Riverside Cali
Old 06-02-2017 , 18:21   Re: Request a nade plugin!!!
Reply With Quote #7

Here are the other plugins that could be conflicting with this one.
grenade_sack-041c.amxx
GrenadeTouchDmg
__________________
FR0NTLINE is offline
Send a message via AIM to FR0NTLINE Send a message via MSN to FR0NTLINE Send a message via Yahoo to FR0NTLINE
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-03-2017 , 05:05   Re: Request a nade plugin!!!
Reply With Quote #8

try puting PartialCloning`s plugin before the other two you mentioned
DjSoftero is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-03-2017 , 07:17   Re: Request a nade plugin!!!
Reply With Quote #9

You know you can disable them to find out if they cause problems, right?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
PartialCloning
Senior Member
Join Date: Dec 2015
Old 06-03-2017 , 14:23   Re: Request a nade plugin!!!
Reply With Quote #10

Quote:
Originally Posted by FR0NTLINE View Post
Here are the other plugins that could be conflicting with this one.
grenade_sack-041c.amxx
GrenadeTouchDmg
I tested with both plugins, yet it works for me under Windows.

Are you running the server on linux? The CGrenade offset could be 5, not 4.

Change "CGrenade 4" in the fifth line to "CGrenade 5". Report back if that works under linux so I can edit my code.

Last edited by PartialCloning; 06-03-2017 at 14:24.
PartialCloning 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 13:52.


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