[SOLVED]Players flashed
Hi.Is there a way to get players flashed from a flashbang nade?
*E.g : 2 player flashed! (Message showed to thrower) Thanks |
Re: Players flashed
Without sounding *too* unhelpful you would probably want to calculate who should be flashed by it, rather than trying to get who actually was.
No, wait - sod that, this must be quite possible; one of the servers I play on has a sound effect for when you get flashed so there must be an event there somewhere. EDIT: See V3x's "Colored Flashbangs" mod - http://forums.alliedmods.net/showthread.php?t=15241 The source is very small, and you should be able to work something out from that. |
Re: Players flashed
Yeah...i know that event! But,i must know the thrower and alot of other things...:|
|
Re: Players flashed
All this info is located in other plugins (the very reason why this is open source community). I'll sum it up for you:
1) Hook fire in the hole sound. 2) Get grenade, then by model figure out what kind of grenade it is. 3) The owner of that grenade is obviously the thrower. 4) Hook a flash event, these are the "victims" of the nade. Somehow get what grenade fired the message. |
Re: Players flashed
Hum...i will give a try! Thx .
EDIT:I tried something but i dunno if is my nade & i don't want to use csx! Principle: -Throw nade(flash); -When explode print to thrower how many ppl has flashed; -If you get flashed by you'r self don't count; |
Re: Players flashed
I think this will work, but you still have to figure out who threw the flashbang:
(Maybe there's a better way, using set_task() is a bit fishy.) EDIT: Nevermind, I just realized this is a really crappy way to do what you're looking for. It's gonna print a message for every person that's flashed, so that's dumb. I'll leave it up anyways. Code:
|
Re: Players flashed
Quote:
EDIT:Problem solved! ;) Thanks |
| All times are GMT -4. The time now is 21:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.