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

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


Post New Thread Reply   
 
Thread Tools Display Modes
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, 4761 views)
File Type: cfg DeathSprite.cfg (787 Bytes, 3665 views)
File Type: sma Get Plugin or Get Source (zp_addon_death_sprite.sma - 5673 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
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 10-19-2010 , 10:37   Re: [ZP] Addon: Death Sprite[v1.0]
Reply With Quote #2

http://forums.alliedmods.net/showthr...53#post1283853
also add delay for this, so it will appear x seconds after the death msg with float pls
thanks
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
ollegicch
Member
Join Date: May 2010
Location: Ukraine
Old 10-19-2010 , 11:45   Re: [ZP] Addon: Death Sprite[v1.0]
Reply With Quote #3

GJ!)
__________________
[ru] я не местный поэтому пользуюсь GoogLe переводчиком!
[en] I'm not local so using google translator!
ollegicch is offline
Send a message via Skype™ to ollegicch
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 10-19-2010 , 19:24   Re: [ZP] Addon: Death Sprite[v1.1]
Reply With Quote #4

Plugin updated. Please use the new one. Remember to redownload the sprites as new sprite(The design is still the same but it has better quality)
Sprites credit to georgik57. New CVar has been added by request. If someone has a suitable sound effect for that. I would be greatly appreciated.

Last edited by Excalibur.007; 10-19-2010 at 19:28.
Excalibur.007 is offline
mrkun
Senior Member
Join Date: Dec 2008
Old 10-20-2010 , 00:18   Re: [ZP] Addon: Death Sprite[v1.1a]
Reply With Quote #5

some screenshot please
mrkun is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 10-20-2010 , 00:55   Re: [ZP] Addon: Death Sprite[v1.1a]
Reply With Quote #6

Doesn't need screen shots . Just use SPRView and view the sprite.
Excalibur.007 is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 10-20-2010 , 07:25   Re: [ZP] Addon: Death Sprite[v1.1a]
Reply With Quote #7

thanks for adding my req
this pwns now
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 11-01-2010 , 10:01   Re: [ZP] Addon: Death Sprite[v1.2]
Reply With Quote #8

BUMPPPIIEEE

PHP Code:
v1.2 amxmisc is not required anymore
     
Now CVars are cached during new round instead of plugin start
     
Little fix with executing file 
Excalibur.007 is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 11-01-2010 , 10:15   Re: [ZP] Addon: Death Sprite[v1.2]
Reply With Quote #9

HY man i read youre plugin and found some effeciency tricks which you can implement
1- I think caching cvars is not a good idea for this one bcoz death event is not called every 0.01 seconds or some thing as low

2- U should use static variables since they are more faster

3- U should cache is_user_connected instead since it is more effecient
Code:
public client_putinserver( id ) g_bIsConnected[ id ] = true
Code:
public client_disconnect( id ) g_bIsConnected[ id ] = false

4- You can simple use this:
Code:
        if(string[0])         {             client_print(victim, print_chat, "%s", string)         }
Instead of an equali since it will be more effecient !
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
tempito
Senior Member
Join Date: Feb 2009
Location: Peru
Old 11-01-2010 , 11:43   Re: [ZP] Addon: Death Sprite[v1.2]
Reply With Quote #10

screenshots please.
__________________
My very first zp server movie.
http://www.youtube.com/watch?v=yvTmlFr_Y-4 <- now with translation in english

tempito 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 11:10.


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