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

HE Damage Effect 0.2


Post New Thread Reply   
 
Thread Tools Display Modes
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-29-2008 , 19:49   Re: HE Damage Effect 0.2
Reply With Quote #111

Quote:
Originally Posted by v3x View Post
oh errr I doo nawt kno eederr
That's like encrypted talk to someone that doesn't speak english:
freetranslation.com
english: oh errr I doo nawt kno eederr
spanish oh errr yo doo nawt kno eederr
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
AIA-Shogun
Member
Join Date: Jul 2006
Location: France
Old 10-01-2008 , 03:14   Re: HE Damage Effect 0.2
Reply With Quote #112

Hi all

I have tested this plugin v1.5b and i don't hear the sound "deaf_sound.wav".
In CZ the volume don't return to normal

I have done modification in the plugin to correct this.

I hope you like this one.

(sorry for my english)
Attached Files
File Type: sma Get Plugin or Get Source (he_damage_effect.sma - 1659 views - 2.2 KB)

Last edited by AIA-Shogun; 10-01-2008 at 03:22.
AIA-Shogun is offline
Send a message via MSN to AIA-Shogun
Juniorey
Junior Member
Join Date: Jan 2008
Old 10-14-2008 , 00:04   Re: HE Damage Effect 0.2
Reply With Quote #113

Quote:
Originally Posted by AIA-Shogun View Post
Hi all

I have tested this plugin v1.5b and i don't hear the sound "deaf_sound.wav".

In CZ the volume don't return to normal.

I have done modification in the plugin to correct this.

I hope you like this one.

(sorry for my english)
That also happens to me, but i´m running CS 1.6 (cs16full_v7 + cs16patch_full_v27). The screen goes to the strange angle, i get the red flash, the sound goes off but... no return.

I got go to the Options - Audio and manually set the volume back to "normal".

Gonna test your modified version.
Juniorey is offline
Old 11-09-2008, 07:14
jaaaalot
This message has been deleted by jaaaalot. Reason: ops
jaaaalot
Senior Member
Join Date: Oct 2008
Old 11-28-2008 , 11:41   Re: HE Damage Effect 0.2
Reply With Quote #114

what are the rgb line :
PHP Code:
message_begin(MSG_ONEgMsgScreenShake, {0,0,0} ,id)
  
write_short1<<14 );
  
write_short1<<14 );
  
write_short1<<14 );
  
message_end();
  
message_begin(MSG_ONE_UNRELIABLEgMsgScreenFade, {0,0,0}, id);
  
write_short1<<10 );
  
write_short1<<10 );
  
write_short1<<12 );
  
write_byte225 );
  
write_byte);
  
write_byte);
  
write_byte125 );
  
message_end
i wanna make rgb pcvars
jaaaalot is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 12-21-2008 , 08:57   Re: HE Damage Effect 0.2
Reply With Quote #115

anyfing like this but for a flash one?
Owyn is offline
Send a message via ICQ to Owyn
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-27-2008 , 06:23   Re: HE Damage Effect 0.2
Reply With Quote #116

Go to line #51 and change 4 to 25.
__________________
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
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 02-08-2009 , 01:38   Re: HE Damage Effect 0.2
Reply With Quote #117

And here is my version :
Edited a bit...

Quote:
Originally Posted by jaaaalot View Post
what are the rgb line :
PHP Code:
message_begin(MSG_ONEgMsgScreenShake, {0,0,0} ,id)
  
write_short1<<14 );
  
write_short1<<14 );
  
write_short1<<14 );
  
message_end();
  
message_begin(MSG_ONE_UNRELIABLEgMsgScreenFade, {0,0,0}, id);
  
write_short1<<10 );
  
write_short1<<10 );
  
write_short1<<12 );
  
write_byte225 );
  
write_byte);
  
write_byte);
  
write_byte125 );
  
message_end
i wanna make rgb pcvars
PHP Code:
message_begin(MSG_ONEgMsgScreenShake, {0,0,0} ,id)
  
write_short1<<14 );
  
write_short1<<14 );
  
write_short1<<14 );
  
message_end();
  
message_begin(MSG_ONE_UNRELIABLEgMsgScreenFade, {0,0,0}, id);
  
write_short1<<10 );
  
write_short1<<10 );
  
write_short1<<12 );
  
write_byte225 ); // RED
  
write_byte); // GREEN
  
write_byte); // BLUE
  
write_byte125 ); // ALPHA (TRANSPARENCY)
  
message_end
Attached Files
File Type: zip sounds_and_sma.zip (534.5 KB, 398 views)

Last edited by Costin83; 02-08-2009 at 10:28.
Costin83 is offline
Send a message via Yahoo to Costin83
Old 02-08-2009, 10:24
Costin83
This message has been deleted by Costin83. Reason: double post...
oldbush
New Member
Join Date: Feb 2009
Location: China
Old 02-16-2009 , 05:58   Re: HE Damage Effect 0.2
Reply With Quote #118

edit further

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
new gMsgScreenShake gMsgScreenFade gMaxPlayers;
new const 
HE_SOUND_1[] = "misc/earring.wav"// 10 sec.
new const HE_SOUND_2[] = "misc/heartbeat.wav"// 9 sec.
new const HE_SOUND_3[] = "misc/breathe.wav"// 7 sec
 
#define CVAR_STATUS "he_damage_effect"
public plugin_init()
{
 
register_plugin("HE damage effect""0.2""v3x");
 
register_forward(FM_EmitSound,"fw_emitsound");
 
register_event("Damage""event_Damage" "b""2>0" );
 
register_cvar(CVAR_STATUS "1");
 
gMsgScreenShake get_user_msgid("ScreenShake");
 
gMsgScreenFade get_user_msgid("ScreenFade");
 
gMaxPlayers get_maxplayers();
}
public 
plugin_precache()
{
 
precache_sound(HE_SOUND_1);
 
precache_sound(HE_SOUND_2);
 
precache_sound(HE_SOUND_3);
}
public 
client_connect(id)
{
 if(!
is_user_bot(id))
 {
  
client_cmd(id"volume 1.0");
 }
}
public 
event_Damage(id)
{
 if(
get_cvar_num(CVAR_STATUS) <= || !is_user_connected(id) || !is_user_alive(id) || is_user_bot(id))
  return;
 new 
iWeapIDattacker get_user_attacker(idiWeapID);
 if(!
is_user_connected(attacker))
  return;
 
 if(
iWeapID == 4)
 {
  while(
task_exists(id))
   
remove_task(id);
 
  new 
playerorigin[3]
  new 
heorigin[3]
  
heorigin[0] = read_data(4)
  
heorigin[1] = read_data(5)
  
heorigin[2] = read_data(6)
  
get_user_origin(id,playerorigin)
  new  
distance  floatroundget_distance(playerorigin,heorigin)/32.00)
  if (
distance <= 5set_task(0.5"volume_up_1"id); 
  new 
Float:EffectMin 5.0 distance/2;
  if (
EffectMin 0EffectMin 0.0 ;
  new 
Float:EffectMax EffectMin 1;
  
MakeScreenShake(id,EffectMin,EffectMax);
 
  
message_begin(MSG_ONE_UNRELIABLE gMsgScreenFade , {0,0,0}, id);
  
write_short(1<<10);
  
write_short(1<<5);
  
write_short(1<<12);
  
write_byte(225);
  
write_byte(0);
  
write_byte(0);
  
write_byte(125);
  
message_end();
 }
}
public 
fw_emitsound(entity,channel,const sample[],Float:volume,Float:attenuation,fFlags,pitch)
 {
 
// plugin disabled
 
if(get_cvar_num(CVAR_STATUS) <= 0)
  return 
FMRES_IGNORED;
 
 
// not a hegrenade exploding
 
if(!equali(sample,"weapons/debris1.wav") && !equali(sample,"weapons/debris2.wav") && !equali(sample,"weapons/debris3.wav"))
  return 
FMRES_IGNORED;
 
// hegrenade explode
 
hegrenade_explode(entity);
 return 
FMRES_IGNORED;
 }
 
 public 
hegrenade_explode(greindex)
 {
 
// invalid entity
 
if(!pev_valid(greindex)) return;
 
// get origin of explosion
 
new Float:origin[3];
 new 
Float:playerorigin[3];
 
pev(greindex,pev_origin,origin);
 new 
Float:EffectMin 0.1
 
new Float:EffectMax 0.2
 
 
for (new <= gMaxPlayers ++){
  if( !
is_user_connected) || !is_user_alive(i) || is_user_bot(i))
   continue;
 
  
entity_get_vector(iEV_VEC_originplayerorigin);
  new 
distance floatroundvector_distance(playerorigin,origin)/32.00);
  if ((
distance <= 15) && (distance >= 10 )) MakeScreenShake(i,EffectMin,EffectMax);
 }
 
 
 }
public 
MakeScreenShake(id,Float:EffectMin,Float:EffectMax){
 new 
Float:fVec[3];
 
fVec[0] = random_float(EffectMin,EffectMax);
 
fVec[1] = random_float(EffectMin,EffectMax);
 
fVec[2] = random_float(EffectMin,EffectMax);
 
entity_set_vector(idEV_VEC_punchanglefVec);
 
 
message_begin(MSG_ONEgMsgScreenShake, {0,0,0}, id)
 
write_short(1<<14);
 
write_short(1<<14);
 
write_short(1<<14);
 
message_end();
}
 
public 
volume_up_1(id)
{
 
client_cmd(id"volume 0");
 
set_task(1.0"volume_up_2"id);
}
public 
volume_up_2(id)
{
 
client_cmd(id"volume 0.1");
 
client_cmd(id"spk ^"%s^""HE_SOUND_1);
 
client_cmd(id"spk ^"%s^""HE_SOUND_2);
 
set_task(6.0"volume_up_3"id);
}
public 
volume_up_3(id)
{
 
client_cmd(id"spk ^"%s^""HE_SOUND_3);
 
set_task(4.0"volume_up_4"id);
}
public 
volume_up_4(id)
{
 
client_cmd(id"volume 0.2");
 
set_task(1.0"volume_up_5"id);
}
public 
volume_up_5(id)
{
 
client_cmd(id"volume 0.3");
 
set_task(0.8"volume_up_6"id);
}
public 
volume_up_6(id)
{
 
client_cmd(id"volume 0.4");
 
set_task(0.6"volume_up_7"id);
}
public 
volume_up_7(id)
{
 
client_cmd(id"volume 0.6");
 
set_task(0.4"volume_up_8"id);
}
public 
volume_up_8(id)
{
 
client_cmd(id"volume 0.8");
 
set_task(0.2"volume_up_9"id);
}
public 
volume_up_9(id)
{
 
client_cmd(id"volume 1.0");

oldbush is offline
Send a message via MSN to oldbush
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 02-17-2009 , 08:37   Re: HE Damage Effect 0.2
Reply With Quote #119

Quote:
Originally Posted by oldbush View Post
edit further
Tip: Try to split the effects in two: set_task for sound & set_task for shake/fade effect and remove them only if necassary.
Ex: You are hit by a HE close enough to hear the sound effects, then another HE hits you, but from further distance, not enough to deaf you....
Now you will remain deaf.... (because you removed the task)
Not a good thing

Hope you understand what I mean. I didn't explain verry well.....
Costin83 is offline
Send a message via Yahoo to Costin83
oldbush
New Member
Join Date: Feb 2009
Location: China
Old 02-18-2009 , 00:59   Re: HE Damage Effect 0.2
Reply With Quote #120

Quote:
Originally Posted by Costin83 View Post
Tip: Try to split the effects in two: set_task for sound & set_task for shake/fade effect and remove them only if necassary.
Ex: You are hit by a HE close enough to hear the sound effects, then another HE hits you, but from further distance, not enough to deaf you....
Now you will remain deaf.... (because you removed the task)
Not a good thing

Hope you understand what I mean. I didn't explain verry well.....
I see, what about this?
PHP Code:
public event_Damage(id)
{
 if(
get_cvar_num(CVAR_STATUS) <= || !is_user_connected(id) || !is_user_alive(id) || is_user_bot(id))
  return;
 new 
iWeapIDattacker get_user_attacker(idiWeapID);
 if(!
is_user_connected(attacker))
  return;
 
 if(
iWeapID == 4)
 {  
  new 
playerorigin[3]
  new 
heorigin[3]
  
heorigin[0] = read_data(4)
  
heorigin[1] = read_data(5)
  
heorigin[2] = read_data(6)
  
get_user_origin(id,playerorigin)
  new  
distance  floatroundget_distance(playerorigin,heorigin)/32.00)
  if (
distance <= 5) {
   while(
task_exists(id))
    
remove_task(id);
   
set_task(0.5"volume_up_1"id);
  } 
  new 
Float:EffectMin 5.0 distance/2;
  if (
EffectMin 0EffectMin 0.0 ;
  
MakeScreenShake(id,EffectMin,EffectMin+1);
 
  
message_begin(MSG_ONE_UNRELIABLE gMsgScreenFade , {0,0,0}, id);
  
write_short(1<<10);
  
write_short(1<<5);
  
write_short(1<<12);
  
write_byte(225);
  
write_byte(0);
  
write_byte(0);
  
write_byte(125);
  
message_end();
 }

oldbush is offline
Send a message via MSN to oldbush
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 05:28.


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