Raised This Month: $ Target: $400
 0% 

monster_tripmine in Half-Life (not CS)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vladimirok
New Member
Join Date: Jun 2009
Old 06-30-2009 , 12:29   monster_tripmine in Half-Life (not CS)
Reply With Quote #1

[EN] Hello. I need to seize the moment when a player crosses the laser ray of mine what to block its explosion and to put to death a player. Who can that ran into this problem that help please. Thank you!

[RU] Здравствуйте. Мне нужно поймать момент когда игрок пересекает лазерный луч мины что бы блокировать ее взрыв и убить игрока. Может кто то сталкивался с этой проблемой то помогите пожалуйста. Спасибо!
Vladimirok is offline
Vladimirok
New Member
Join Date: Jun 2009
Old 06-30-2009 , 14:54   Re: monster_tripmine in Half-Life (not CS)
Reply With Quote #2

Player crosses the laser ray:

register_forward(FM_TraceLine, "forward_trace_line", 1)
...
public forward_trace_line(Float:start[3], Float:dest[3], ignore_monsters, id, ptr)
{
if (pev_valid(id))
{
static class[32]
pev(id, pev_classname, class, sizeof class - 1)
if(equal(class, "monster_tripmine"))
{
new index = get_tr2(ptr, TR_pHit)
if(is_user_alive(index))
{
fm_fakedamage(index, "tripmine", 999.0, DMG_BLAST)
set_tr2(ptr, TR_pHit, -1)
return FMRES_HANDLED
}
}
}

return FMRES_IGNORED
}

But a mine bursts. How to block an explosion?
Vladimirok is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-30-2009 , 15:17   Re: monster_tripmine in Half-Life (not CS)
Reply With Quote #3

You have to block the original trace too.
__________________
Arkshine is offline
Vladimirok
New Member
Join Date: Jun 2009
Old 06-30-2009 , 18:45   Re: monster_tripmine in Half-Life (not CS)
Reply With Quote #4

But as to block original trace? Point an example please.
Vladimirok 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 15:28.


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