PDA

View Full Version : DoD Bleeding (v1.0) *HLStats proof!*


FeuerSturm
08-04-2007, 12:41 PM
This plugin was originally made by Zor and i will
continue work on it with his permission!

//
// DESCRIPTION:
// ============
//
// This Plugin will add some realism to your servers!
// - Wounded players will start to bleed and lose health
// until they bandage their wounds!
// - While bandaging they can only use their melee weapon!
// - If you don't bandage you bleed to death!
// - Bleeding is handled like every other standard weapon,
// if you shoot someone and he bleeds to death, you receive
// the kill and the deathmessage will show you as the killer!
// - HLStats proof! Bleeding kills are handled like kills with
// any other standard weapon and will be listed in the stats!
//

//
// USAGE (cvars for amxx.cfg):
// ===========================
//
// dod_bleeding_enabled <1/0> = enable/disable DoD Bleeding by default
// 1 = Bleeding is enbaled
// 0 = Bleeding is disabled
//
// dod_bleeding_mindamage <#> = set amount of damage that a player has to
// take to start bleeding.
// set it to 0 to make players start bleeding
// no matter how much damage was caused,
// choose a higher value if you don't want people
// to start bleeding after only small damage by
// for example a detonating grenade some meters away.
//
// dod_bleeding_bleedbyworld <1/0> = enable/disable bleeding after falling down
// and losing health or being hit by a mortar
// on dod_caen for example.
// 1 = start bleeding by "world" damages
// 0 = only start bleeding by weapon damage
//
// dod_bleeding_dmgcenter <#> = set how many healthpoints a player that is
// bleeding loses per second for body center hits
//
// dod_bleeding_dmgextremities <#> = set how many healthpoints a player that is
// bleeding loses per second for body extremities hits
//
// dod_bleeding_messages <#> = set how many times bleeding players should
// get the "Your are Bleeding" announcement after
// they managed to bandage the first time
//
// Please Note:
// No matter to what value (other than 0)
// you set this, the player will always get the
// announcement until he manages to bandage for the
// first time, then it counts as first message!
// So usually setting this to 1 does the trick and
// players won't be announced anymore after they found
// out how to bandage!
//

//
// CHANGELOG:
// ==========
//
// This plugin was originally made by Zor,
// as it was kind of abandoned i will continue
// work on it with Zor's permission!
//
// - 04.08.2007 Version 0.9
// - imported Zor's version "0.4a"
// - changed cvar names
// - changed to pcvar usage
// - removed motd, client-commands & setinfos
// from now on the "use"-key is the only way
// to bandage!
// - replaced Engine with FakeMeta module
// - added hudmessage as announcement for
// bleeding players
// - added textmessage after respawn for players
// that were bleeding but did not bandage
// - added multilanguage support for those
// announcements
// - blocked "suicide" logmessage and replaced it
// with a "X killed Y with bleeding" message
// - completely HLStats proof now! Bleeding kills are
// handled like any other standard weapon's kills,
// now more "suicides" because of bleeding!
// A nice little icon for your HLStats is included
// as well!
// - finally fixed "deployed"-bug, players with a
// deployed mg/bar/fg42 now undeploy and switch
// to knife/spade as well when bandaging
// - fixed bots not switching to melee weapons when
// bandaging
//
// - 09.08.2007 Version 1.0
// - fixed blood squeezing "out of the air" instead
// of the bleeding player.
// - fixed overhead-icons disappearing
// - added cvar "dod_bleeding_bleedbyworld" to define if
// players should start to bleed after falling off and
// losing health.(set to 1) or if they schould just
// start bleeding after beeing hit by a weapon (set to 0)
// - added cvar "dod_bleeding_mindamage" to define the minimum
// of damage that has to be caused to a player to start bleeding.
// - moved announcement hudmessage to the left of the screen, so it
// doesn't influence players view while finishing their firefight
// before bandaging
//

Please be sure do download the sprites the plugin uses and
place into the folder "/dod/sprites/" on your gameserver!

A nice little pic for your HLStats is included as well, if you
are running HLStats for your server and have access to the
"hlstatsimg" folder, be sure to grab it as well!

If you want to see a preview of the HLStats, please don't
hesitate to take a look at my HLStats (http://www.clan-sod.eu/sites/index.php?show=5) and browse to "Weapon statistics"!

If you experience any problems, please let me know!

Enjoy!

diamond-optic
08-04-2007, 07:04 PM
im definitly gonna be trying this out :D


one thing with the logging (for stats) ... you should add the 'weaponstats' & 'weaponstats2' detail msgs to log hitplace, damage, etc.. for stats that will show the extra detail (such as psychostats) ..not totally sure how hlstats works as ive never used it..

but here is an example of what i use in one part of dod smoke grenades 2 if you're interested

log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"smoke_grenade^") (shots ^"0^") (hits ^"1^") (kills ^"1^") (headshots ^"0^") (tks ^"%d^") (damage ^"%d^") (deaths ^"0^") (score ^"0^")",name,userid,steam,teamname,friendlyfire,smoke_dam age)
log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"smoke_grenade^") (head ^"0^") (chest ^"1^") (stomach ^"0^") (leftarm ^"0^") (rightarm ^"0^") (leftleg ^"0^") (rightleg ^"0^")",name,userid,steam,teamname)
tho im sure some of the entries in the message wont really apply or have any use with the bleeding.. maybe none will lol.. but i just figured i'd mention it :P


also.. a cvar (or even a define) to control the delay between bleeding would be nice.. i think every second is too much personally and it gets rather annoying to hear the bleeding sound when you have a bunch of idiots playing that cant seem to figure out how to press their use key for 30 seconds

another thing i find 'annoying' is when you fall or walk of a place with a small drop.. where you lose only a few HP (some maps have spawn exits like this) and you start bleeding.. i dont really think you should be bleeding after a 2dmg fall lol.. maybe a minimum damage cvar would be a good idea.. set to like 20 or something sorta low.. but not really low..

and maybe something to think about for the future.. like different degrees of bleeding depending on the wound.. like i would assume you'd bleed alot more/faster after being hit with a 50cal round then you would from a 9mm.. or say like getting hit by an explosion..

diamond-optic
08-04-2007, 09:08 PM
also if you're interested.. here's a red blood drop sprite

diamond-optic
08-05-2007, 12:26 AM
i noticed occasionally players no longer had the team icons over their heads..

im guessing its the bug with dod_set_user_kills (http://www.dodplugins.net/forums/showthread.php?t=859)

setting the refresh to 0 and adding the frags message after it will fix that.
like this:
new kills = dod_get_user_kills(killer)+1

dod_set_user_kills(killer,kills,0)

message_begin(MSG_BROADCAST, get_user_msgid("Frags"), {0,0,0}, 0);
write_byte(killer);
write_short(kills);
message_end();tho getting the msgid in plugin init would be better then getting each time obviously

FeuerSturm
08-05-2007, 10:30 AM
i currently have about 5 version of the plugin on the hdd and in
one version i used updated the frags manually, don't know why i didn't
post that version :confused: thanks for the hint though! :D

as for the sprite: as all other sprites are white in dod, i'll stay with
it, or you maybe have a colored "bandaging" sprite as well?

as for the bleeding repeat time, i'll add a cvar to adjust it.

as for the amount of damage, i can add some weapon groups
like light, heavy, rifles, mg, shells so users can adjust it themselfes
by cvars.

adding a cvar for the minimum amount of damage you start to bleed
is no problem either.

as for falldamage, you won't start bleeding, you only start bleeding
if you're hit by a weapon, or did i post the version with that you always bleed?
i'll check that!

diamond-optic
08-05-2007, 11:56 AM
lol confused yourself with the different versions... lol ive done that before

anyway.. im loving it..and im surprised that ppl on my server havent bitched 'too' much about it.. tho like everything i put on.. they just gotta get use to it

tho one complaint alot of ppl are giving me is the hud msg being right in the center of the screen.. since it comes up right when you start bleeding and often theyre in the process of getting killed by me lol.. having it more towards like the left side of the screen or so might make it less 'in the way' of where you're aiming..

otherwise.. this is great lol.. awesome job!

FeuerSturm
08-05-2007, 03:53 PM
you were absolutely right, i posted an earlier version,
i will upload the latest version (bleeding only when damaged by weapons,
frags update without losing icon) after i added some of the features you suggested.

(like always) thanks for your feedback !

FeuerSturm
08-09-2007, 03:19 PM
//
// - 09.08.2007 Version 1.0
// - fixed blood squeezing "out of the air" instead
// of the bleeding player.
// - fixed overhead-icons disappearing
// - added cvar "dod_bleeding_bleedbyworld" to define if
// players should start to bleed after falling off and
// losing health.(set to 1) or if they schould just
// start bleeding after beeing hit by a weapon (set to 0)
// - added cvar "dod_bleeding_mindamage" to define the minimum
// of damage that has to be caused to a player to start bleeding.
// - moved announcement hudmessage to the left of the screen, so it
// doesn't influence players view while finishing their firefight
// before bandaging
//

Enjoy the new Version and please inform me about any issues!

knife108
08-16-2007, 08:12 AM
I had placed the blood_icon.spr and bandage_icon.spr into the server folder "/dod/sprites/"

when I start the server, it show :

Fatal error

Mod_NumforName:Bleeding_sprites/blood_icon.spr not found

How to ?

knife108
08-16-2007, 08:51 AM
oh I find the bug.

just like this:



"Sprites/blood_icon.spr",
"Sprites/bandage_icon.spr",
"Sprites/blood.spr",
"Sprites/bloodspray.spr"

knife108
08-16-2007, 09:11 AM
I don't wanna show the bleeding,killername,killeruserid,killersteam,kille rteam,victimname,victimuserid,victimsteam,victimte am on the screen !



how to change the code ?

Thx

FeuerSturm
08-16-2007, 07:07 PM
I don't wanna show the bleeding,killername,killeruserid,killersteam,kille rteam,victimname,victimuserid,victimsteam,victimte am on the screen !



how to change the code ?

Thx

erm?

It's not showing any of those information in game, it's just logging that info
that HLStats or PsychoStats can use them.

Could you show me a screenshot or explain exactly what you mean?

diamond-optic
08-16-2007, 07:18 PM
why did you change the folders?
"Bleeding_Sprites/blood_icon.spr",
"Bleeding_Sprites/bandage_icon.spr",
"Bleeding_Sprites/blood.spr",
"Bleeding_Sprites/bloodspray.spr"
the blood and bloodspray already come with dod/halflife (not sure which tbh) and ppl would have to go in the gcf files and get them themselves and move them to those folders on the server for them to work...

also if your using this folder for the sprites now.. you should probably change the directory structure of the sprites zip file as well as the instructions of where to install them on the initial post..

FeuerSturm
08-16-2007, 07:26 PM
why did you change the folders?
"Bleeding_Sprites/blood_icon.spr",
"Bleeding_Sprites/bandage_icon.spr",
"Bleeding_Sprites/blood.spr",
"Bleeding_Sprites/bloodspray.spr"
the blood and bloodspray already come with dod/halflife (not sure which tbh) and ppl would have to go in the gcf files and get them themselves and move them to those folders on the server for them to work...

also if your using this folder for the sprites now.. you should probably change the directory structure of the sprites zip file as well as the instructions of where to install them on the initial post..

shit, that was a "replace all" error, i changed some names and didn't notice
that it changed the folders as well!

i'll correct that!

FeuerSturm
08-16-2007, 07:29 PM
Everyone please download the plugin again!

Sorry for the mistake, i corrected the folders, they're now
pointing to "dod/sprites/" again!

TigerMan4
12-15-2007, 01:53 AM
are there any noticable lag issues with this plugin ? like with the gore plugin ?

Sohood
02-27-2010, 02:42 PM
From the Respository Zor includes a dod_bleeding_motd.html file, that If I remember correctly years ago when I had this plugin running on my servers it would automatically pop up upon connecting to the server. Where do I put this file? Under addons/configs/ or in my fast download directory?

diamond-optic
02-28-2010, 12:33 AM
theres nothing in the plugin source that seems to use anything like that..

and i see in the change log for v0.9 that it says "- removed motd"

Sohood
03-02-2010, 02:24 PM
No worries, I went into the respository and grabbed zor's version of the bleeding plugin, which has the motd pop up. For some reason, Storm's version, the use key doesn't work anymore, whatever that reason being I decided to go with zor's version.

Thanks anyway.