• Looking a teargas SWEP
    5 replies, posted
Would anyone have a teargas swep or even a old one thats broken :) 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? [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index189b.html[/url]
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.
[QUOTE=ideal-gaming;39555098]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.[/QUOTE] You dint even mention that in your original question...terrible.
[QUOTE=Benjiko99;39561509]You dint even mention that in your original question...terrible.[/QUOTE] 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 [url]http://wiki.garrysmod.com/page/Libraries/net[/url] for sending the messages.
Sorry, you need to Log In to post a reply to this thread.