This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Radius Damage Stock


Post New Thread Reply   
 
Thread Tools Display Modes
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 07-29-2011 , 12:02   Re: Radius Damage Stock
Reply With Quote #11

Wath do you mean with debug text?

I also activate the logs and add debug after plugin name and no error appear
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-29-2011 , 12:06   Re: Radius Damage Stock
Reply With Quote #12

Print something before every line.
SnoW is offline
Send a message via MSN to SnoW
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 07-29-2011 , 12:31   Re: Radius Damage Stock
Reply With Quote #13

@Arkshine i can call RadiusDamage Fuction with orpheu? if i can, can you help me to do it?
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
bibu
Veteran Member
Join Date: Sep 2010
Old 07-29-2011 , 13:00   Re: Radius Damage Stock
Reply With Quote #14

Lol, why don't you just debug it?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-29-2011 , 15:12   Re: Radius Damage Stock
Reply With Quote #15

Quote:
Originally Posted by bogdyuttzu View Post
@Arkshine i can call RadiusDamage Fuction with orpheu? if i can, can you help me to do it?
Using Orpheu would be more efficient for sure.

Problem is you can't use functions with Vector as param, orpheu doesn't support it. So you can only use CBaseMonster::RadiusDamage( entvars_s*, entvars_s*, float, int, int ). This function is not the same as the HLDSK, it has been modified a bit for CS, basically it does : if damage <= 80, it calls RadiusDamage2() (radius auto-calculated = damage * ( 3.0 + random_float( 0.5, 1.5 ) ) ), if not it calls RadiusDamage() (radius auto-calculated = damage * 3.5).

RadiusDamage2() is specific to CS, but I can't say atm what are exactly the differences against RadiusDamage(). (It seems it appears almost the same, just more checks added like adjusted damage are bound 0 - 75, etc. ). So, if you want to use the code from HLSDK, you will have to put a damage > 80.

I say there is a problem because if you work directly with an origin, you can't pass it into this function. You will have to create a temporary dummy entity and using it as reference.

If you understand all what I've said, here an example of use + signatures (unzip in configs/orpheu/) :

PHP Code:
#include <amxmodx>
#include <orpheu>
#include <fakemeta>

new OrpheuFunction:HandleFuncRadiusDamage;

public 
plugin_init()
{
    
HandleFuncRadiusDamage OrpheuGetFunction"RadiusDamage""CBaseMonster" );

    
register_clcmd"hurtme""ClientCommand_HurtMe" );
}

public 
ClientCommand_HurtMe( const client )
{
    
// 1 - Entity index, center of the sphere.
    // 2 - Inflictor index
    // 3 - Attacker index
    // 4 - Damage 
    // 5 - Class to ignore, see CLASS_* in HLSDK
    // 6 - Bits damage type, see DMG_* in HLSDK
    
OrpheuCallHandleFuncRadiusDamageclientclientclient50.00DMG_BLAST );

Attached Files
File Type: zip [signature]CBaseMonster_RadiusDamage.zip (806 Bytes, 78 views)
__________________
Arkshine is offline
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 07-30-2011 , 15:15   Re: Radius Damage Stock
Reply With Quote #16

PHP Code:
public fw_Touch(entitytouched)
{
    static 
owner
    owner 
pev(entitypev_owner)
    
OrpheuCall(HandleFuncRadiusDamagetouchedentityownerget_pcvar_float(cvar_damage), 0DMG_ALWAYSGIB); 
    
    
engfunc(EngFunc_RemoveEntityentity)

This is my code, when the entity touch somthing only me take damage from him

EDIT: Sorry i have lag

Last edited by bogdyuttzu; 07-30-2011 at 15:20.
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-30-2011 , 15:16   Re: Radius Damage Stock
Reply With Quote #17

And ? Maybe you have not finished to write your post.
__________________
Arkshine is offline
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 07-30-2011 , 15:21   Re: Radius Damage Stock
Reply With Quote #18

Read now
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-30-2011 , 15:27   Re: Radius Damage Stock
Reply With Quote #19

What is the value of cvar_damage ?
__________________

Last edited by Arkshine; 07-30-2011 at 15:30.
Arkshine is offline
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 07-30-2011 , 15:28   Re: Radius Damage Stock
Reply With Quote #20

50.0
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
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 14:48.


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