Raised This Month: $ Target: $400
 0% 

Some nade questions.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-29-2007 , 17:58   Re: Some nade questions.
Reply With Quote #8

Quote:
Originally Posted by Rolnaaba View Post
How can I catch where an he-gernade explodes, and the origin of the explosion.
Here's a way to get the grenade origin and the owner:
Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
	register_forward(FM_EmitSound, "EmitSound");
}

public EmitSound(entity, channel, const sound[])
{
	if(!pev_valid(entity))
		return FMRES_IGNORED;

	if(!contain(sound, "hegrenade-"))
	{
		new Float:origin[3], owner;
		pev(entity, pev_origin, origin);
		pev(entity, pev_owner, owner);

		client_print(owner, 3, "Grenade origin: %f %f %f", origin[0], origin[1], origin[2]);
	}

	return FMRES_IGNORED;
}
That should work.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.

Last edited by v3x; 05-29-2007 at 19:56.
v3x is offline
 



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 10:40.


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