Looking a teargas SWEP

Would anyone have a teargas swep or even a old one thats broken :slight_smile:

I looked into making my own but im not sure how to use DrawMotionBlur right so thats why i would not mind a broken one, that way i can at least learn how to use it

Did you look here for a little help?

Yeh i had a look at it but i could not figure out how to make it only an area effect, so say if someone was 100 units near the nade it would effect them.

You dint even mention that in your original question…terrible.

I didnt need to as i was not asking how i would do it, i was asking would anyone have a grenade so i can look at how it works…

In your entity’s think function, search for players using ents.FindInSphere, store them in some list. If a player isn’t already in that list, send a networked message “StartTeargas” to him. Retrieve this message clientside and then apply the teargas effect until the “EndTeargas” message was received. On serverside, if a player from the list wasn’t found in the sphere, call “EndTeargas” on him. Also call “EndTeargas” in the OnRemove hook.
I’d recommend http://wiki.garrysmod.com/page/Libraries/net for sending the messages.