Raised This Month: $ Target: $400
 0% 

ScreenFlash On Kill


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
eD.
Senior Member
Join Date: Oct 2009
Old 03-01-2010 , 15:24   ScreenFlash On Kill
Reply With Quote #1

ScreenFlash On Kill

Description:

When you kill someone, your image is red / green / blue for 1-2 seconds

From here change the color:

Code:
 #define  RED_KILLER 0 
 #define GREEN_KILLER 0 
 #define BLUE_KILLER 255
Changelog :

1.0 - Public release
Attached Files
File Type: sma Get Plugin or Get Source (screenflash_kill.sma - 830 views - 2.2 KB)
eD. is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-01-2010 , 15:33   Re: ScreenFlash On Kill
Reply With Quote #2

PHP Code:
#include <amxmodx>

#define PLUGIN   "ScreenFlash on kill"
#define VERSION  "1.0"
#define AUTHOR   "eD."

new gMsgScreenFade;

/* -- EDITABLE -> */

#define DURATION (6<<10)
#define HOLDTIME (5<<10)
#define FADETYPE (1<<12)

#define RED_KILLER   0
#define GREEN_KILLER   0
#define BLUE_KILLER   0

#define RED_KILLED   255
#define GREEN_KILLED   0
#define BLUE_KILLED   0

#define ALPHA      170


public plugin_init()
{
   
register_plugin(PLUGIN VERSION AUTHOR);

   
register_event("DeathMsg" "event_DeathMsg" "a" "1!0" "2!0");
   
register_cvar("sv_kill_flash""1");
   
register_cvar("sv_kill_flash_hs""0");
   
register_cvar("sv_kill_flash_self" "1");

   
gMsgScreenFade get_user_msgid("ScreenFade");
}

public 
event_DeathMsg()
{
   if( !
get_cvar_num("sv_kill_flash") )
      return 
PLUGIN_CONTINUE;

   if( 
get_cvar_num("sv_kill_flash_hs") && read_data(3) != )
      return 
PLUGIN_CONTINUE;

   new 
killer read_data(0);
   new 
victim read_data(2);

   if( 
is_user_alive(killer) && killer != victim && !is_user_bot(killer) )
   {
      
message_beginMSG_ONE_UNRELIABLE gMsgScreenFade , {0,0,0} , killer );
      
write_shortDURATION ); // duration
      
write_shortHOLDTIME ); // hold time
      
write_shortFADETYPE ); // fade type
      
write_byteRED_KILLER );
      
write_byteGREEN_KILLER );
      
write_byteBLUE_KILLER );
      
write_byteALPHA );
      
message_end();
   }

   if( !
get_cvar_num("sv_kill_flash_self") )
      return 
PLUGIN_CONTINUE;

   if( !
is_user_alive(victim) && is_user_connected(victim) && !is_user_bot(victim) )
   {
      
message_beginMSG_ONE_UNRELIABLE gMsgScreenFade , {0,0,0} , victim );
      
write_shortDURATION ); // duration
      
write_shortHOLDTIME ); // hold time
      
write_shortFADETYPE ); // fade type
      
write_byteRED_KILLED );
      
write_byteGREEN_KILLED );
      
write_byteBLUE_KILLED );
      
write_byteALPHA );
      
message_end();
   }

   return 
PLUGIN_CONTINUE;

http://forums.alliedmods.net/showpos...8&postcount=23

Stop stealing plugins.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 20:29.


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