Raised This Month: $319 Target: $400
 79%   Almost there!

Display Damage with Sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
isLie
New Member
Join Date: Oct 2017
Old 08-11-2020 , 01:17   Display Damage with Sprite
Reply With Quote #1

Sprite Damage

Greeting, It's my first post, and sorry for my bad English.

GIF : https://imgur.com/a/GK5Q7XB

[Description]
Show Damage but not using HUD anymore, and I add a crit chance into it, if you don't like it then you can turn it off by cvar.
If you know how to use it, it also can display other custom number, I've made a native for it.

[Cvars]
Code:
sprdmg_velo "8.0"			Spr eject speed
sprdmg_rander "160.0"			Transparency for spr
sprdmg_gravity "0.04"			Gravity for spr
sprdmg_expire "15.0"			How fast will spr disappear
sprdmg_RGB "255 255 255"		Non-crit color
sprdmg_critRGB "255 122 0"		Crit color
sprdmg_critchance "25"			Crit chance
sprdmg_multiplier "1.5"			Crit Damage Multiplier
sprdmg_randomRGB "1/0"			Random Color Switch
[Files]
Code:
sprite_damage.sma
Digit_01 ~ Digit_05.spr
CritDigit_01 ~ CritDigit_05.spr
These sprites is most important thing in this plugin, I made it by AfterEffects,
each digit use a spr, it all inside sprite_damage.rar.

[Edit]
Added HamBot Support. (It may causes double damage display if you are using SyPB or other bots that isn't ZBOT.
Added Random Color Cvar

Download and enjoy.
Attached Files
File Type: sma Get Plugin or Get Source (sprite_damage.sma - 294 views - 7.0 KB)
File Type: zip sprite_damage.zip (86.1 KB, 208 views)
File Type: sma Get Plugin or Get Source (sprite_damage_randomcolor.sma - 166 views - 7.3 KB)
File Type: sma Get Plugin or Get Source (sprite_damage_randomcolorV2.sma - 196 views - 7.6 KB)

Last edited by isLie; 08-20-2020 at 04:13.
isLie is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-11-2020 , 05:59   Re: Display Damage with Sprite
Reply With Quote #2

Uploading compiled plugins is not allowed. You should remove the .amxx file from the archive.
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 08-11-2020 , 06:38   Re: Display Damage with Sprite
Reply With Quote #3

isLie

For myself, I took this option Damaga, because I wanted someone to implement it for a long time - raising the numbers up,moving for the victim,the convenience of settings.

Here is only that specifically not liked,so this Full pack...
But it can be cut out.
It is unclear why the render was registered there...

And sprites were thrown in a heap,and you could do everything in one

You should also add support for bots, so you can at least test them when there is no online service.And so be it..

PHP Code:
new bool:bHamBot false;
public 
client_putinserver(id)    
{
    if(!
bHamBot && is_user_bot(id))    
        {
        
bHamBot true
        set_task
(0.1"Register_HamBot"id)
    }
}

public 
Register_HamBot(id
{
    
RegisterHamFromEntity(Ham_TakeDamageid"fw_TakeDamage")

Thanks !
__________________
МультиМод CS 83.222.97.124:27015


Last edited by MayroN; 08-11-2020 at 07:05.
MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
isLie
New Member
Join Date: Oct 2017
Old 08-11-2020 , 10:53   Re: Display Damage with Sprite
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
Uploading compiled plugins is not allowed. You should remove the .amxx file from the archive.
Thanks for remind me, already remove it.
isLie is offline
isLie
New Member
Join Date: Oct 2017
Old 08-11-2020 , 11:17   Re: Display Damage with Sprite
Reply With Quote #5

Quote:
Originally Posted by MayroN View Post
isLie

For myself, I took this option Damaga, because I wanted someone to implement it for a long time - raising the numbers up,moving for the victim,the convenience of settings.

Here is only that specifically not liked,so this Full pack...
But it can be cut out.
It is unclear why the render was registered there...

And sprites were thrown in a heap,and you could do everything in one

You should also add support for bots, so you can at least test them when there is no online service.And so be it..

PHP Code:
new bool:bHamBot false;
public 
client_putinserver(id)    
{
    if(!
bHamBot && is_user_bot(id))    
        {
        
bHamBot true
        set_task
(0.1"Register_HamBot"id)
    }
}

public 
Register_HamBot(id
{
    
RegisterHamFromEntity(Ham_TakeDamageid"fw_TakeDamage")

Thanks !
Sorry that I tested it with SyPB, so I didn't notice that I need to register it for zbot,
I'm not sure what do you mean about merge sprites in one, could you show some example for me please?
Also, what about
Quote:
It is unclear why the render was registered there...
could you explain more about this?
Thanks.
isLie is offline
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 08-11-2020 , 15:18   Re: Display Damage with Sprite
Reply With Quote #6

isLie
I will write you a personal message in Russian, for you, as I understand your language, Russian.

You won't understand me in English by translator)

Expect)
__________________
МультиМод CS 83.222.97.124:27015

MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
Midnight Kid
Junior Member
Join Date: Aug 2017
Location: Chornobay, Ukraine
Old 08-19-2020 , 04:41   Re: Display Damage with Sprite
Reply With Quote #7

Super. I'll take it.
Midnight Kid is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-23-2020 , 04:27   Re: Display Damage with Sprite
Reply With Quote #8

One look at video. Amazing!

The packaging and omission of install instructions need attention.
Quote:
FATAL ERROR (shutting down): Mod_NumForName: sprites/P_Reality/Digit_01.spr not found
.
├── addons
│** └── amxmodx
│** └── scripting
│** └── sprite_damage.sma
└── sprites
├── CritDigit_01.spr
├── CritDigit_02.spr
├── CritDigit_03.spr
├── CritDigit_04.spr
├── CritDigit_05.spr
├── Digit_01.spr
├── Digit_02.spr
├── Digit_03.spr
├── Digit_04.spr
└── Digit_05.spr

4 directories, 11 files


Testers shouldn't have to know code to figure out where the sprites go. Quick glance I thought you were renaming them. Script and package with directory and files that crash servers MUST match.

This can be easily maintained to get rid of double images and de-shackle the cstrike-only modification. Why add support for one bot to ruin it for the majority? Please place a CVAR or something so it senses and adjusts. For future references I suggest at 'minimal' undo stuff that makes matters worse.

Code:
/************  *CHANGE LOG*  ************  * 2020-12-23  spinx  * 1.0 to 1.1 - All mod support, fix double image, stop crash, reorganize package. */ #include <amxmodx> #include <amxmisc> . . .     half_life         = get_cvar_pointer("mp_teamplay"); } public plugin_precache() {     for (new i = 0;i < MAX_DIGIT;i++)     {         formatex(damage_spr[i][0], charsmax(damage_spr[][]), "sprites/sprite_damage/Digit_0%d.spr", i + 1)         if( !file_exists(damage_spr[i][0]))         {             server_print("Check the sprite...%s...halting to prevent crash.",damage_spr[i][0]);             pause( "a" );         }         else         precache_model(damage_spr[i][0])         formatex(damage_spr[i][1], charsmax(damage_spr[][]), "sprites/sprite_damage/CritDigit_0%d.spr", i + 1)         if( !file_exists(damage_spr[i][1]))         {             server_print("Check the sprite...%s...halting to prevent crash.",damage_spr[i][1]);             pause( "d" );         }         else         precache_model(damage_spr[i][1])     } } public plugin_natives()     register_native("make_damage_spr", "native_make_damage_spr", 1) public client_putinserver(id) if (cstrike_running() && !bHamBot && is_user_bot(id))     {         bHamBot = true         set_task(0.1, "Register_HamBot", id)     } public Register_HamBot(id)     RegisterHamFromEntity(Ham_TakeDamage, id, "fw_TakeDamage") . . . public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damagebits) . . .     if(cstrike_running() || !cstrike_running() && get_pcvar_num(half_life))     if (get_user_team(attacker) == get_user_team(victim))         return HAM_IGNORED; . . .

Code:
Check the sprite...sprites/sprite_damage/Digit_01.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/CritDigit_01.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/Digit_02.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/CritDigit_02.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/Digit_03.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/CritDigit_03.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/Digit_04.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/CritDigit_04.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/Digit_05.spr...halting to prevent crash. Check the sprite...sprites/sprite_damage/CritDigit_05.spr...halting to prevent crash.

Avoid posting multiple versions when 1 with CVAR for random color option will due and make post less convoluted.

If you did the bulk of this like I suspect you have then you should be working in a gaming factory some place.
Quote:
Originally Posted by isLie View Post
Sprite Damage
[Edit]
Added HamBot Support. (It may causes double damage display if you are using SyPB or other bots that isn't ZBOT.
Added Random Color Cvar
Looking at what we know you did and stated was adding some bot code that ruins a bunch of stuff that was already working? Once corrected and working regularly, I've never seen anything like it.

Add to OP something like this.

INSTRUCTIONS: Extract sprites to sprites/sprite_damage.

.
├── sprite_damage
│** ├── CritDigit_01.spr
│** ├── CritDigit_02.spr
│** ├── CritDigit_03.spr
│** ├── CritDigit_04.spr
│** ├── CritDigit_05.spr
│** ├── Digit_01.spr
│** ├── Digit_02.spr
│** ├── Digit_03.spr
│** ├── Digit_04.spr
│** └── Digit_05.spr
└── sprite_damage.tar

Hands down best DAMAGE plugin. Thank you.
Attached Files
File Type: sma Get Plugin or Get Source (sprite_damage.sma - 90 views - 9.1 KB)
File Type: tar sprite_damage.tar (910.0 KB, 51 views)
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake 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 07:19.


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