Raised This Month: $100 Target: $400
 25% 

Death And Damage 1.1 - 13/03/10


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Hawk552 (427)
Asd'
Senior Member
Join Date: Jun 2009
Location: Argentina
Old 09-28-2009 , 15:18   Death And Damage 1.1 - 13/03/10
Reply With Quote #1

Description:
This plugin it does is create a ScreenShake/ScreenFade on damage or die.

There are 4 modes of screenfade colors:
Quote:
* amx_fademodes_damage/death 0: This mode is the default mode, the screenfade is white color.
* amx_fademodes_damage/death 1: This mode is the define mode, the screenfade color is determined for cvars.
* amx_fademodes_damage/death 2: This mode is the random mode, the screenfade is random color.
* amx_fademodes_damage/death 3: This mode is the team mode, the screenfade is red or blue color.
Cvars:
Quote:
amx_fadeduration_damage 1:
XXX: Define the time duration of the screenfade in damage.

amx_fadeduration_death 10:
XXX: Defines the time duration of the screenfade in death.

amx_fadecolors_damage 250 0 0 250:
XXX: Defines the color of screenfade in damage.

amx_fadecolors_death 0 0 0 250:
XXX: Defines the color of screenfade in death.

amx_shakeduration_damage 1:
XXX: Define the time duration of the screenshake in damage.

amx_fademodes_damage/death 0:
0: Active the default mode.
1: Active the define mode.
2: Active the random mode.
3: Active the team mode.
Credits:
Quote:
IneedHelp
Changelog:
Quote:
Version 1.0:
- Fixed plugin.
- Updated plugin.
Version 1.1:
- Updated Thread.
- Fixed all errors/bugs found.
- Optimization.
Attached Files
File Type: sma Get Plugin or Get Source (DeathDamage.sma - 5205 views - 6.3 KB)
__________________

Last edited by Asd'; 07-08-2010 at 00:23.
Asd' is offline
Send a message via MSN to Asd'
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 09-28-2009 , 15:20   Re: Death & Damage Realistic.
Reply With Quote #2

.Rar -> .zip

Sounds cool. I'll try it out later when I get some time.
fang is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 09-28-2009 , 15:21   Re: Death & Damage Realistic.
Reply With Quote #3

PHP Code:
public plugin_precache()
{
    
// Sounds precache
    
for (new 0sizeof HumanPaini++)
        
engfunc(EngFunc_PrecacheSoundHumanPain[i])
    for (new 
0sizeof HumanDeadi++)
        
engfunc(EngFunc_PrecacheSoundHumanDead[i])



PHP Code:
public plugin_precache()
{
    
// Sounds precache
    
for (new 0sizeof HumanPaini++)
        
engfunc(EngFunc_PrecacheSoundHumanPain[i])
    for (new 
0sizeof HumanDeadi++)
        
engfunc(EngFunc_PrecacheSoundHumanDead[i])

__________________
alan_el_more is offline
Old 09-28-2009, 15:26
Asd'
This message has been deleted by Asd'.
larito
Veteran Member
Join Date: Nov 2008
Location: Argentina- Mendoza
Old 09-28-2009 , 16:17   Re: Death & Damage Realistic.
Reply With Quote #4

Very nice, but you donīt copy my message of "customize start/end" XD
larito is offline
Send a message via MSN to larito
Old 09-28-2009, 16:18
Asd'
This message has been deleted by Asd'.
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-28-2009 , 16:21   Re: Death & Damage Realistic.
Reply With Quote #5

Quote:
Originally Posted by Asd' View Post
PHP Code:
////////////////////////// Customization start here //////////////////////////

// Killed
const RedKilled 0
const GreenKilled 0
const BlueKilled 0
const AlphaKilled 200

// Damage
const Red 250
const Green 0
const Blue 0
const Alpha 200

// Fade
const Fade 0x0000
const UnitSecond = (1<<12)

// Sounds realistics
new const HumanPain[][] = { "RealisticSD/HumanPain1.wav""RealisticSD/HumanPain2.wav""RealisticSD/HumanPain3.wav""RealisticSD/HumanPain4.wav""RealisticSD/HumanPain5.wav""RealisticSD/HumanPain6.wav" }
new const 
HumanDead[][] = { "RealisticSD/HumanDead1.wav""RealisticSD/HumanDead2.wav""RealisticSD/HumanDead3.wav""RealisticSD/HumanDead4.wav""RealisticSD/HumanDead5.wav" }

////////////////////////// Customization end here ////////////////////////// 
Make cvars for the colors.
Make a cvar for the fade duration.
There is no need to customize the fade flag.
Read a .ini file for custom sounds if server owners want to change them.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 09-28-2009, 16:26
Asd'
This message has been deleted by Asd'.
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 09-28-2009 , 17:04   Re: Death & Damage Realistic.
Reply With Quote #6

PHP Code:
    Red register_cvar("amx_reddmg""250")
    
Green register_cvar("amx_greendmg""0")
    
Blue register_cvar("amx_bluedmg""0")
    
Alpha register_cvar("amx_alphadmg""200"
Could be --->

PHP Code:
    new pColor 
    
    
//Plugin Init
    
pColor register_cvar("amx_damage_color","250 0 0 200"// R G B ALPHA
    
    
    
    //Then, in your function --->
    
    
new szPcvarColor[32], szRed[4], szGreen[4], szBlue[4], szAlpha[4]
    
get_pcvar_string(pColorszPcvarColor31)
    
parse(szPcvarColor,szRed,3,szGreen,3,szBlue,3,szAlpha,3)
    
    
//...
    
message_begin(MSG_ONE_UNRELIABLEScreenFade_victim)
    
write_short(UnitSecond*get_pcvar_num(FadeTimeDmg))
    
write_short(UnitSecond*0)
    
write_byte(clamp(str_to_num(szRed),0,255))
    
write_byte(clamp(str_to_num(szGreen),0,255))
    
write_byte(clamp(str_to_num(szBlue),0,255))
    
write_byte(str_to_num(szAlpha))
    
message_end() 

Also in

PHP Code:
public Killed(victim)

__________________
Find my plugins here..

Ex - Spanish Moderator.

Last edited by Starsailor; 09-28-2009 at 17:08.
Starsailor is offline
Old 09-28-2009, 17:14
Asd'
This message has been deleted by Asd'.
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 09-28-2009 , 17:29   Re: Death & Damage Realistic.
Reply With Quote #7

PHP Code:
public Killed(victim)
{
        
message_begin(MSG_ONE_UNRELIABLEScreenFade_victim)
        
write_short(get_pcvar_num(FadeTimeKilled))
        
write_short(10000)
        
write_short(Fade)
        
write_byte(get_pcvar_num(RedKilled))
        
write_byte(get_pcvar_num(GreenKilled))
        
write_byte(get_pcvar_num(BlueKilled))
        
write_byte(get_pcvar_num(AlphaKilled))
        
message_end()
    }
    
    
// Damage
public TKDamage(victimattackerFloat:damage)
{
    if (
victim != attacker && damage 0)
    {
            
message_begin(MSG_ONE_UNRELIABLEScreenFade_victim)
            
write_short(UnitSecond*get_pcvar_num(FadeTimeDmg))
            
write_short(UnitSecond*0)
            
write_byte(get_pcvar_num(Red))
            
write_byte(get_pcvar_num(Green))
            
write_byte(get_pcvar_num(Blue))
            
write_byte(get_pcvar_num(Alpha))
            
message_end() 
FAIL.

See Here

Sholud be
PHP Code:
public Killed(victim)
{
            
message_begin(MSG_ONE_UNRELIABLEScreenFade_victim)
            
write_short(UnitSecond*get_pcvar_num(FadeTimeKilled))
            
write_short(UnitSecond*0//..IDK if this is correct
            
write_short(Fade)
            
write_byte()//R
            
write_byte()//G
            
write_byte()//B
            
write_byte()//Alpha
            
message_end()
            
public 
TKDamage(victimattackerFloat:damage)
{
    if (
victim != attacker && damage 0)
    {
            
message_begin(MSG_ONE_UNRELIABLEScreenFade_victim)
            
write_short(UnitSecond*get_pcvar_num(FadeTimeDmg))
            
write_short(UnitSecond*0)
            
write_short(Fade)
            
write_byte()//R
            
write_byte()//G
            
write_byte()//B
            
write_byte()//Alpha
            
message_end() 
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
Old 09-28-2009, 17:34
Asd'
This message has been deleted by Asd'.
Old 09-28-2009, 18:23
Asd'
This message has been deleted by Asd'.
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 09-28-2009 , 22:44   Re: Death & Damage Realistic.
Reply With Quote #8

good plugin and ...remember me "i am your father" hahaha (L)
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Old 09-28-2009, 22:45
Asd'
This message has been deleted by Asd'.
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 09-28-2009 , 22:47   Re: Death & Damage Realistic.
Reply With Quote #9

Good Job Negracow;D
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
10100011
BANNED
Join Date: Sep 2009
Old 09-29-2009 , 00:29   Re: Death & Damage Realistic.
Reply With Quote #10

Title
---->
Realistic damage & death
10100011 is offline
Reply


Thread Tools
Display Modes

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 08:49.


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