AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Question] How to get the ID of thrown nade in HL1 (https://forums.alliedmods.net/showthread.php?t=239954)

Realbout 05-06-2014 02:16

[Question] How to get the ID of thrown nade in HL1
 
Hello, people. I'm new here :)
I don't know about Pawn scripting very much, so please understand if this isn't very much of what to be asked.

I tried to fix the code of 'Glow All In One' by Zenith77,
(Link here : https://forums.alliedmods.net/showth...71724?p=171724)

To make it work properly in Sven Co-op.

I tried this plugin in Sven Co-op and checked that glowing and streaming work well, but nade glowing just doesn't work.

So I opened up the code, and looked up these two:

Code:

register_event("SendAudio","eventGrenade","bc","2=%!MRAD_FIREINHOLE")
and

Code:

public eventGrenade(id) {
 
 if( g_GlowNadeColor[id] != GLOW_NULL )
 {
  set_task(0.1, "makeNadeGlow", id )
 }
 
}
 
 
public makeNadeGlow(id) {
 
 new grenade
 grenade = get_grenade(id)
 
 if( grenade ) {
  set_rendering(grenade, kRenderFxGlowShell, g_GlowNadeCustomColor[id][0],
  g_GlowNadeCustomColor[id][1], g_GlowNadeCustomColor[id][2],
  kRenderNormal, 150 )
  }
 
}

I don't really get all of what these things are saying, but it pretty looks like Half Life(or Sven Co-op) doesn't understand the registered event above.

I searched through the forum for about 20 minutes and just couldn't find the answer.

The question is : How can I make 'Half Life' detect players' grenade and make it glow?

Thank you for reading this.

Bos93 05-06-2014 03:53

Re: [Question] How to get the ID of thrown nade in HL1
 
swapped, where is glow ?

NiHiLaNTh 05-06-2014 04:06

Re: [Question] How to get the ID of thrown nade in HL1
 
gren_throw works only in CS/CZ not in HL. You probably need to hook FM_SetModel

Shooting King 05-06-2014 04:23

Re: [Question] How to get the ID of thrown nade in HL1
 
Frostnades.

Realbout 05-06-2014 05:16

Re: [Question] How to get the ID of thrown nade in HL1
 
Quote:

Originally Posted by Shooting King (Post 2134314)

Thanks a lot, everyone. Looks like I got the idea.

Still I'm too lazy to make a use of that :)

Anyways, thank you very much.


All times are GMT -4. The time now is 09:46.

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