View Single Post
Plugin Info:     Modification:          Category:          Approver:   ConnorMcLeod (74)
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 02-22-2011 , 21:13   Bullet Damage with new HudMessages | UPDATED 10/04/11
Reply With Quote #1

PLUGIN : Bullet Damage with Director Hud Message and HudMessage 2.0


: | Description | :

This plugin show Director Hud Message or HudMessage when you hit or you are hit by damage.

First, you can write /showbd to disable/enable the bullet damages display for you.

Colors : ( DEFAULT )
Victims see a red HUD.
Attackers see a green HUD.
When the Victim does damage to himself OR a player shoot a teammate, he sees an orange HUD.

: | Cvars | :

** Bullet_Damage_Mode :
- 0 = It only uses the Director Hud Message --> DEFAULT
- 1 = It Uses HudMessage when the victim is far from the attacker AND when the victim & attacker are near it uses Director Hud Message.

** Bullet_Damage_Distance :[Only work when Bullet_Damage_Mode is set to 1]
- When the attacker and the victim are at X distance, we will use HudMessage. --> DEFAULT = 600

** Bullet_Damage_ShowWalls :
- 0 : Disabled ( DEFAULT )
- 1 : Don't show the damage you did when you shot through a wall

** Bullet_Show_Spec :
- 0 : Disabled
- 1 : Show the HudMessage / Director Hud Message to the spectator ( DEFAULT )

** Bullet_Hs_Mode
- 0 : Disabled
- 1 : Always show Director Hud Message on HeadShot
- 2 : Show : "HEADSHOT" to : Victim & Attacker ( DEFAULT )

** Show_Accumulated_Damage :
- 0 : Disabled
- 1 : Show the accumulated damages for the last 5.0 seconds ( Automatically HudMessage ).
( Position : mid-top of the screen )

** Color_RGB_Victim :
- Color of the Message : RGB ( DEFAULT = 255000000 )

** Color_RGB_Attacker
- Color of the Message : RGB ( DEFAULT = 000255000 )

** Color_RGB_Ourself_Teammate
- Color of the Message : RGB ( DEFAULT = 255102021 )

** Bullet_Text_Mode
- 0 : DIRECTOR HUD MESSAGE SIZE
- 1 : HUD MESSAGE SIZE

THERE IS TWO TYPE OF SIZE : HUD MESSAGE SIZE ( 1 ) = NORMAL SIZE AND DIRECTOR HUD MESSAGE ( 0 ) = BIG SIZE

** Bullet_Show_Mode ( DEFAULT = Arch of Circle )
- 0 : Circle ---> http://**************/photo/my-images/843/circlen.jpg/
- 1 : Vertical ---> http://**************/photo/my-images/706/verticalt.jpg/
- 2 : Horizontal ---> http://**************/photo/my-images...rizontala.jpg/
- 3 : Arch of circle ---> http://img855.**************/img855/6...clevictime.jpg

: | Natives | :

PHP Code:
bd_show_damageindexdamagestyleAttacker 
:::
Show damages to a player.

----------------------------------------------------------------

PHP Code:
bd_show_textindexAttackertext[] ) 
:::
Show a text to the player, example :

It will display the message : SPAWN to the player 1 = Attacker style, ( Default color = green & position = right )

PHP Code:
#if defined _bulletdamage_included
    #endinput
#endif
#define _bulletdamage_included


/*
*    style :
*        0 = Show Director HudMessage
*        1 = Show HudMessage
*    Attacker :
*        0 = Index isn't the attacker ( Default = Show red color at the left )
*        1 = Index is the attacker ( Default = Show green color at the right )
*/
native bd_show_damageindexdamagestyleAttacker )

/*
*    Attacker :
*        0 = Index isn't the attacker ( Default = Show red color at the left )
*        1 = Index is the attacker ( Default = Show green color at the right )
*/
native bd_show_textindexAttackertext[] ) 
: | Credits | :


- Arkshine for this : http://forums.alliedmods.net/showthread.php?t=149210

- ConnorMcLeod for a lot of optimizations and take the RGB in one CVAR : http://forums.alliedmods.net/showthread.php?t=62224

- Schmurgel1983 : http://forums.alliedmods.net/showthr...34#post1436434 ( Help with the bd_show_text native )

- Big Thanks to Micapat

: | ScreenShots | :


Click on the pictures.
Click image for larger version

Name:	bullet1m.jpg
Views:	23694
Size:	74.5 KB
ID:	88213
Click image for larger version

Name:	bulletshowhs.jpg
Views:	11351
Size:	32.8 KB
ID:	88214
Click image for larger version

Name:	showbulletdamage.jpg
Views:	13734
Size:	38.5 KB
ID:	88215
Click image for larger version

Name:	showbulletdamageequalvn.jpg
Views:	7478
Size:	31.3 KB
ID:	88216
Click image for larger version

Name:	vertical.jpg
Views:	12191
Size:	95.7 KB
ID:	90480 ( Vertical )
Click image for larger version

Name:	horizontal.jpg
Views:	13472
Size:	97.4 KB
ID:	90479 ( Horizontal )
Click image for larger version

Name:	circle.jpg
Views:	16023
Size:	94.8 KB
ID:	90478 ( Circle )
Click image for larger version

Name:	arc_cercle_victime.jpg
Views:	17530
Size:	79.9 KB
ID:	90489 ( Arch of circle )
http://img607.**************/img607/3982/sansreih.jpg ==> Accumulated damage

PHP Code:
            "CHANGE LOG :"                                   
            "1.0" 
First                            
            
"1.1" Adding Bullet Damage Mode                           
            
"1.2" Adding Bullet Damage Walls                       
            
"1.3" Spectators see damage                           
            
"1.4" Cvar Bullet_Hs_Mode                            
            
"1.5" New Natives                               
            
"1.6" Text SIZE    
            
"1.7" Bullet Show Mode    
            
"1.8" : New structure
            
"1.9" Say command Accumulated damages
            
"2.0" : Final Version 
I hope this plugin will be useful.

*****Servers using this plugin*****
Attached Files
File Type: inc bulletdamage.inc (862 Bytes, 9259 views)
File Type: sma Get Plugin or Get Source (bullet_damage.sma - 19139 views - 15.6 KB)
__________________

Last edited by bboygrun; 10-04-2011 at 17:39. Reason: Adding the new SMA.
bboygrun is offline