Raised This Month: $ Target: $400
 0% 

Trace lines for the 10001 time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 08-13-2007 , 13:24   Trace lines for the 10001 time
Reply With Quote #1

PHP Code:
register_forward(FM_TraceLine"traceline",1
can enyone tell me how to use traceline whit set_user_hitzones.
i want hs only.
have look all over the site so plz post eny usefull information plz
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
_Master_
Senior Member
Join Date: Dec 2006
Old 08-14-2007 , 02:06   Re: Trace lines for the 10001 time
Reply With Quote #2

If you want to emulate set_user_hitzones() with fakemeta and add custom manipulation there, then you do need the FM_TraceLine forward. If you just want HS only then there is no need for fakemeta; see documantation on set_user_hitzones() on how to do that.
_Master_ is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 08-14-2007 , 06:11   Re: Trace lines for the 10001 time
Reply With Quote #3

y but that why i am trying to use tracelines it dosent work only adding
set_user_hitzones ( index = 0, target = 0, body = 2 )
after round start or spawn.
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 08-14-2007 , 11:55   Re: Trace lines for the 10001 time
Reply With Quote #4

if you want HS only then this will work:

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

#define HITGROUP_HEAD (1 << 1)

new g_MaxPlayers

public plugin_init(){
    
register_plugin("HSOnly""1.0""Sylwester")
    
register_forward(FM_TraceLine"traceline")
    
g_MaxPlayers get_maxplayers()
}


public 
traceline(Float:v1[3], Float:v2[3], noMonsterspentToSkip){
    new 
iAttacker pentToSkip;
    new 
iVictim get_tr(TR_pHit);
    new 
iHitZone = (<< get_tr(TR_iHitgroup));

    if (
iVictim >= && iVictim <= g_MaxPlayers && iAttacker >= && iAttacker <= g_MaxPlayers){
        if (!(
iHitZone HITGROUP_HEAD)){
            
set_tr(TR_flFraction1.0);
            return 
FMRES_SUPERCEDE;
        }
    }
    return 
FMRES_IGNORED;

__________________
Impossible is Nothing
Sylwester is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 08-14-2007 , 13:37   Re: Trace lines for the 10001 time
Reply With Quote #5

OMG IT WORKED PERFECTLY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 08-14-2007 at 13:48.
fxfighter is offline
Send a message via MSN to fxfighter
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 16:58.


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