Raised This Month: $51 Target: $400
 12% 

[CS:GO] Smoke throw


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Screeaam..
Senior Member
Join Date: Jun 2010
Location: Poland
Old 03-03-2015 , 09:38   [CS:GO] Smoke throw
Reply With Quote #1

Hello! How in CS:GO get event when Smoke Grenade is activate? When I throw Smoke I need to get this event and ID of thrower player.
Screeaam.. is offline
frN
Junior Member
Join Date: May 2010
Location: Poland
Old 03-03-2015 , 09:48   Re: [CS:GO] Smoke throw
Reply With Quote #2

https://wiki.alliedmods.net/Counter-...enade_detonate

Hook like any other event.
HookEvent("smokegrenade_detonate", Event_OnSmokegrenadeExplode);

+

Code:
public Action:Event_OnSmokegrenadeExplode(Handle:event, const String:name[], bool:dontBroadcast)
{
	new userid = GetEventInt(event, "userid");
}
I think so...

Last edited by frN; 03-03-2015 at 09:54.
frN is offline
Screeaam..
Senior Member
Join Date: Jun 2010
Location: Poland
Old 03-03-2015 , 18:42   Re: [CS:GO] Smoke throw
Reply With Quote #3

Thanks. Do you know how to get id's of Smokegrenade? Or hoq get origin of grenade?
Screeaam.. is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 03-03-2015 , 19:38   Re: [CS:GO] Smoke throw
Reply With Quote #4

It even supplies x y z. lol
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
frN
Junior Member
Join Date: May 2010
Location: Poland
Old 03-04-2015 , 02:36   Re: [CS:GO] Smoke throw
Reply With Quote #5

Quote:
Originally Posted by Screeaam.. View Post
Thanks. Do you know how to get id's of Smokegrenade? Or hoq get origin of grenade?
Just change the userid to entityid
frN is offline
JoB2C
AlliedModders Donor
Join Date: Jan 2014
Location: France
Old 03-04-2015 , 21:57   Re: [CS:GO] Smoke throw
Reply With Quote #6

I think you could also use OnEntityCreated, check if the classname is smokegrenade_projectile and hook its spawn. This would be executed when the smoke is thrown, not when detonating.
JoB2C 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 01:05.


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