Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Addon: Death Sprite[v1.4]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 10-19-2010 , 10:16   [ZP] Addon: Death Sprite[v1.4]
Reply With Quote #1

Description
Simple plugin. When a valid victim dies, a sprite will show on his death location. Message will be shown(Customizable)

Key features
- Useful CVars
- Simple config(.cfg) file
- Bug-free
- No hardcoded paths
- Multiple sprites
- Random sprites or specified sprites via CVars

CVars
Code:
// [Toggle On/Off]
zp_death_sprite "1" // [0 - Disable | 1 - Enable] Default: 1

// [Death sprite's brightness]
zp_death_sprite_brightness "255" // [0 - Darkest | 255 - Brightest] Default: 255

// [What message?] | NOTE: To disable this, replace it with zp_death_sprite_message ""
zp_death_sprite_message "[R]est.[i]n.[P]eace. - Grim Reaper" // [Max letters(including spaces) - 192]
//Default: [R]est.[i]n.[P]eace. - Grim Reaper

// [Delay to show sprite in decimals]
zp_death_sprite_delay "1.0" // E.g. 5.0, 3.5 , 2.7 | Default: 1.0

// [Random or specified sprite] | NOTE: It can be changed during in-game
zp_death_sprite_play "0" // [0 - Random || 1 ~ MAX_SPRITES (See source code for more info) - Specified] Default: 0

// NOTE: All CVars are updated every new round.
Customization
1. At line 5~9, you should see this
PHP Code:
// Customization(You do not need to add "sprites/")
new const DEATH_SPRITE[][] =
{
    
"93skull1" // zp_death_sprite_play 1

2. Then, change 93skull1 to your custom sprite. File extension is NOT REQUIRED. And you DO NOT need to add "sprites/" It's already formatted.

Multiple sprite support
Change
PHP Code:
// Customization(You do not need to add "sprites/")
new const DEATH_SPRITE[][] =
{
    
"93skull1" // zp_death_sprite_play 1



PHP Code:
// Customization(You do not need to add "sprites/")
new const DEATH_SPRITE[][] =
{
    
"93skull1"// zp_death_sprite_play 1
    
"YOUR_SPRITE_NAME" // zp_death_sprite_play 2

To change the max sprites can be used:
PHP Code:
// Max sprites
const MAX_SPRITES 
Note: You see zp_death_sprite_play 1/2 as a comment.
It will show you how zp_death_sprite_play works.
Ignore it if you wish to use it as random.


Version history
PHP Code:
v1.0 Initial release
v1.1 
Updated config file with default values
     
- New CVar zp_death_sprite_delay
     
Same spritebut better quality Thanks georgik57
v1.1a 
Now you do not need to add .spr
v1.2 
amxmisc is not required anymore
     
Now CVars are cached during new round instead of plugin start
     
Little fix with executing file
v1.2a 
Optimization (Thanks abdul_rehman)
     - 
MSG_BROADCAST to MSG_PVS (Thanks abdul_rehman)
v1.3 Fixed a code
     
Multiple sprite support
     
Random or specified sprite via CVar
v1.4 
Change bool to bit 
Bugs/Suggestions
Post it! If you've a run time error, please debug it and post it WITH debug. Bugs posted WITHOUT debug will be ignored. Suggestions are welcomed.

Installation
1. Put 93skull1.spr into cstrike/sprites
2. Put .amxx to plugins folder OR compile it locally
3. Add plugin name WITH .amxx into plugins-zplague.ini
4. Put DeathSprite.cfg into your configs folder

I want it for other mods!
It is works for other mods. It only requires AMXModX.

Only zombies version (Requested by Dolph_Ziggler)
CLICK HERE

Note:
- Why it doesn't show the sprite when it's enabled?
Answer: Check CVar zp_death_sprite_play and MAX_SPRITES. It MUST NOT be lesser than 0 and more than the value MAX_SPRITES is assigned to.

Credits
georgik57 - Better quality skull sprite
abdul_rehman - Optimizations
Attached Files
File Type: zip sprites.zip (7.6 KB, 4793 views)
File Type: cfg DeathSprite.cfg (787 Bytes, 3681 views)
File Type: sma Get Plugin or Get Source (zp_addon_death_sprite.sma - 5698 views - 3.7 KB)

Last edited by Excalibur.007; 06-14-2011 at 02:51. Reason: Added only zombie version on post.
Excalibur.007 is offline
 



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 15:24.


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