Raised This Month: $ Target: $400
 0% 

[SOLVED]Players flashed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
stupok
Veteran Member
Join Date: Feb 2006
Old 07-02-2007 , 14:34   Re: Players flashed
Reply With Quote #6

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:
#include <amxmodx> #define PLUGIN  "Flash Victims" #define VERSION "1.0" #define AUTHOR  "stupok69" #define MAX_PLAYERS 32 new bool:has_been_flashed[MAX_PLAYERS+1] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("ScreenFade", "FlashedEvent", "be", "4=255", "5=255", "6=255", "7>199") // ty v3x } public client_connect(id)     has_been_flashed[id] = false public FlashedEvent(id) {     has_been_flashed[id] = true     set_task(0.1, "display_flashed") } public display_flashed() {     new count         for(new i = 1; i < MAX_PLAYERS+1; i++)     {         if(has_been_flashed[i])         {             count++             has_been_flashed[i] = false         }     }     client_print(0, print_chat, "%i people have been flashed", count) }

Last edited by stupok; 07-02-2007 at 14:45.
stupok 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 21:23.


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