Raised This Month: $ Target: $400
 0% 

Wall hit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Strick3n
Member
Join Date: Apr 2013
Old 07-03-2014 , 06:51   Re: Wall hit
Reply With Quote #1

Quote:
Originally Posted by hornet View Post
Explain in more detail what you are trying to do.
He wants to hook when player hit the wall with any weapon and then do something.
Strick3n is offline
xPossible
Junior Member
Join Date: Jul 2014
Old 07-03-2014 , 07:07   Re: Wall hit
Reply With Quote #2

Quote:
Originally Posted by Strick3n View Post
He wants to hook when player hit the wall with any weapon and then do something.
Yes!
xPossible is offline
xPossible
Junior Member
Join Date: Jul 2014
Old 07-02-2014 , 09:49   Re: Wall hit
Reply With Quote #3

count hits to wall

Sorry for my bad english
xPossible is offline
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 07-02-2014 , 09:56   Re: Wall hit
Reply With Quote #4

Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_forward(FM_TraceLine, "traceline_forward"); } public traceline_forward(Float:start[3], Float:end[3], conditions, id, trace) {     if(get_tr2(trace, TR_pHit) == 0) //the hit is in part of the map     {     // here what do you want to do...     } }

this?

for more TraceLine : https://forums.alliedmods.net/showth...=66076?t=66076

Quote:
new hit = get_tr2(trace, TR_pHit)
// What was hit by the traceline. It will either be a player index,
// entity index, 0 (part of map), or -1 (didn't hit anything;
// doesn't happen with player tracelines).

Last edited by Porta0123; 07-02-2014 at 09:58.
Porta0123 is offline
xPossible
Junior Member
Join Date: Jul 2014
Old 07-03-2014 , 05:49   Re: Wall hit
Reply With Quote #5

Quote:
Originally Posted by Porta0123 View Post
Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_forward(FM_TraceLine, "traceline_forward"); } public traceline_forward(Float:start[3], Float:end[3], conditions, id, trace) {     if(get_tr2(trace, TR_pHit) == 0) //the hit is in part of the map     {     // here what do you want to do...     } }

this?

for more TraceLine : https://forums.alliedmods.net/showth...=66076?t=66076
Nope, it doesn't work. I have check, when i do dmg to victim (another team players) everything is okay, but i need check when i do dmg to wall, ground or other object
xPossible is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-02-2014 , 16:30   Re: Wall hit
Reply With Quote #6

I would defenitely hook the TraceAttack from ham, providing that is called on map hit.
__________________
Black Rose is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-03-2014 , 07:36   Re: Wall hit
Reply With Quote #7

As stated before, Ham_TraceAttack.
PHP Code:
RegisterHam(Ham_TraceAttack"player""Ham_TraceAttack_pre"0)

public 
Ham_TraceAttack_pre(victimattackerFloat:damageFloat:direction[3], tracehandledamagebits)
{
    if(!
is_user_connected(victim) && is_user_alive(attacker))
    {
// here it goes
    
}

    return 
HAM_IGNORED;

__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness

Last edited by GuskiS; 07-03-2014 at 10:12.
GuskiS is offline
xPossible
Junior Member
Join Date: Jul 2014
Old 07-03-2014 , 07:49   Re: Wall hit
Reply With Quote #8

Quote:
Originally Posted by GuskiS View Post
As stated before, Ham_TraceAttack.
PHP Code:
RegisterHam(Ham_TraceAttack"player""Ham_TraceAttack_pre"0)

public 
Ham_TraceAttack_pre(victimattackerFloat:damageFloat:direction[3], tracehandledamagebits)
{
    if(!
is_user_connected(victim) && !is_user_alive(attacker))
    {
// here it goes
    
}

    return 
HAM_IGNORED;

It doesn't work
xPossible is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-07-2014 , 14:24   Re: Wall hit
Reply With Quote #9

Quote:
Originally Posted by GuskiS View Post
As stated before, Ham_TraceAttack.
PHP Code:
RegisterHam(Ham_TraceAttack"player""Ham_TraceAttack_pre"0)

public 
Ham_TraceAttack_pre(victimattackerFloat:damageFloat:direction[3], tracehandledamagebits)
{
    if(!
is_user_connected(victim) && is_user_alive(attacker))
    {
// here it goes
    
}

    return 
HAM_IGNORED;

__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
xPossible
Junior Member
Join Date: Jul 2014
Old 07-07-2014 , 14:25   Re: Wall hit
Reply With Quote #10

I try it, but it doesn't work
xPossible 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 21:11.


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