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
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.