Raised This Month: $51 Target: $400
 12% 

Red Screen for few Seconds on kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
broke
Junior Member
Join Date: Mar 2006
Old 03-01-2006 , 07:47   Red Screen for few Seconds on kill
Reply With Quote #1

Hi,
Im searching a plugin:

When I kill an enemy my screen turns for a few seconds(0.5) red like blood and fade back to normal screen. I couldn`t find anything like this.

broke
broke is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-01-2006 , 08:02  
Reply With Quote #2

Code:
#include <amxmodx> public plugin_init() {     register_plugin("?", "1.0", "No-One")     register_event("DeathMsg", "DeathEvent", "a") } public DeathEvent() {     new id = read_data(1)     message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id);     write_short(~0) // duration     write_short(3) // hold time     write_short(0x0000) // flags     write_byte(255) // red     write_byte(0) // green     write_byte(0) // blue     write_byte(150) // alpha     message_end() }
think this would work
[ --<-@ ] Black Rose is offline
broke
Junior Member
Join Date: Mar 2006
Old 03-01-2006 , 08:45  
Reply With Quote #3

Yeah, it works fine . Thanks a lot.

But the Duration is to long. What variables do i have to change?

broke
broke is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-01-2006 , 10:49  
Reply With Quote #4

Code:
write_short(~0) // duration write_short(3) // hold time
i think ~0 means "as long as possible" or sumthin'... im not sure set both to 1?
[ --<-@ ] Black Rose is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-01-2006 , 11:18  
Reply With Quote #5

I believe this code would crash the server at fall death. You have to check if killer != 0.
VEN is offline
broke
Junior Member
Join Date: Mar 2006
Old 03-01-2006 , 11:34  
Reply With Quote #6

Quote:
Originally Posted by VEN
I believe this code would crash the server at fall death. You have to check if killer != 0.
At first kill the server crashed. But now it seems to work.

Test here:
83.243.87.15:27015

broke

edit: it crashed again :/. How to solve this problem?
broke is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-01-2006 , 12:14  
Reply With Quote #7

add that: if (!id) return
after: new id... and before message_begin...
VEN is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-01-2006 , 12:53  
Reply With Quote #8

Code:
register_event("DeathMsg", "DeathEvent", "a", "1>0", "2>0")
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 05-14-2006 , 11:20  
Reply With Quote #9

how can u make this to work just when u kill someone with a headshot??

or when u kill someone to fade in green, and when u kill with headshot fade to red..

thanx
spunko is offline
Send a message via MSN to spunko
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-14-2006 , 13:51  
Reply With Quote #10


Code:
#include <amxmodx> #define PLUGIN  "ScreenFlash on kill" #define VERSION "0.1" #define AUTHOR  "v3x" #define HS_ONLY 1 new gMsgScreenFade; public plugin_init() {     register_plugin(PLUGIN , VERSION , AUTHOR); #if HS_ONLY == 1     register_event("DeathMsg" , "event_DeathMsg" , "a" , "1!0" , "2!0" , "3=1"); #else     register_event("DeathMsg" , "event_DeathMsg" , "a" , "1!0" , "2!0"); #endif     gMsgScreenFade = get_user_msgid("ScreenFade"); } public event_DeathMsg() {     new killer = read_data(1);     new victim = read_data(2);     if(is_user_alive(killer) && killer != victim)     {         message_begin( MSG_ONE_UNRELIABLE , gMsgScreenFade , {0,0,0} , killer );         write_short( 1<<10 );         write_short( 1<<10 );         write_short( 1<<12 );         write_byte( 0 );         write_byte( 0 );         write_byte( 200 );         write_byte( 75 );         message_end();     } }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 14:09.


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