Raised This Month: $ Target: $400
 0% 

[Orpheu] CGrenade::Detonate3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 09-24-2012 , 03:09   [Orpheu] CGrenade::Detonate3
Reply With Quote #1

Hi, I found this post about how to call grenades functions with orpheu:

http://forums.alliedmods.net/showpos...2&postcount=11

I try to use Detonate3 in mine grenade launcher but the explosion is show only on vertical platforms and don't give damage.

PHP Code:
public CGrenade_OnTouch( const grenade, const entity )
{
    if( 
pevgrenadePEV_NADE_TYPE ) ==  NADE_TYPE_GRENADE )
        
CGrenade_Detonate3grenade );
}
CGrenade_Detonate3( const grenade )
{
    static 
OrpheuFunction:HandleDetonate3;

    if ( !
HandleDetonate3 )
    {
        
HandleDetonate3 OrpheuGetFunction"Detonate3""CGrenade" );
    }

    
OrpheuCallHandleDetonate3grenade );

Attached Thumbnails
Click image for larger version

Name:	verticalshow.jpg
Views:	154
Size:	42.1 KB
ID:	109845   Click image for larger version

Name:	orizontalcanci.jpg
Views:	99
Size:	45.9 KB
ID:	109846  

Last edited by bogdyuttzu; 09-24-2012 at 03:15.
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-24-2012 , 05:23   Re: [Orpheu] CGrenade::Detonate3
Reply With Quote #2

Is pev_dmg set with a value ?
__________________
Arkshine is offline
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 09-24-2012 , 05:36   Re: [Orpheu] CGrenade::Detonate3
Reply With Quote #3

Thanks now its work fine

Last edited by bogdyuttzu; 09-24-2012 at 05:44.
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-24-2012 , 05:48   Re: [Orpheu] CGrenade::Detonate3
Reply With Quote #4

Because pev->dmg is used as reference value to pull the explosion up out the wall a bit, like :

Code:
if ( pTrace->flFraction != 1.0 )
{
	pev->origin = pTrace->vecEndPos + (pTrace->vecPlaneNormal * (pev->dmg - 24) * 0.6);
}
So, you should set a value to pev_dmg. In CS, the value is 100 for HE grenade, you can put what you want but I think the value above (24, 0.6) has been tuned for around 100 or something.
Well, just test.
__________________

Last edited by Arkshine; 09-24-2012 at 05:50.
Arkshine 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 08:11.


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