[SourceMod] Lives Donator 1.0.0.2

This Section is all about Coding in C/C++ / Lua / SourcePawn for now...
Post Reply
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

[SourceMod] Lives Donator 1.0.0.2

Post by TESLA-X4 »

A simple SourceMod plugin to enable players to donate lives to others. Players with no lives left (and who are in limbo) can be revived upon successful donation.

Configuration:
Unnecessary for plugin.

Commands & Console Variables:
donatelives <#userid|name> <number of lives to donate>
donatelife <#userid|name> <number of lives to donate>
livesdonate <#userid|name> <number of lives to donate>
lifedonate <#userid|name> <number of lives to donate>
givelives <#userid|name> <number of lives to donate>
givelife <#userid|name> <number of lives to donate>
All of the above are aliases of one another and therefore perform the same action - donate lives to the specified target (immunity levels are ignored, so players can donate lives to admins). Because SourceMod automatically adds chat trigger variants for registered commands, simply prefix the command with '!' or '/' to use it in chat (e.g. donatelives (console) → !donatelives (chat)).

Dependencies:
- Obsidian Conflict SourceMod Extension (bundled with OC), but can be recompiled to remove the dependency.

Installation:
- Place donatelives.smx into the /sourcemod/plugins directory.
- Place donatelives.phrases.txt into the /sourcemod/translations directory.

Changelog:

Code: Select all

Version 1.0.0.2
-----------------------
! Changed code to utilize the OC_PlayerLives() native from the official Obsidian Conflict Extension (can be recompiled to remove dependency and use legacy method)
+ Added support for translations

Version 1.0.0.1
-----------------------
Initial (public) release
+ Added textual feedback colorization for select messages
+ Added new command aliases: givelives, givelife

Version 1.0.0
-----------------------
Initial (private) release
Notes:
In case you haven't already noticed, this is a plugin for server operators, not clients.

Known Bugs/Limitations:
No known issues at this time.

Download:
Get Plugin or Get Source
Browse all released versions here.
Last edited by TESLA-X4 on Tue May 31, 2011 3:52 pm, edited 3 times in total.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: [SourceMod] Lives Donator

Post by Neico »

It would've been better if you'd used our SM extension which handles the complete process internal instead of hacking around and making it up by yourself (makes me only want to restrict anything from being accessed unless explicitly wanted...)
Image
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: [SourceMod] Lives Donator

Post by TESLA-X4 »

Done, I've updated it to make use of the OC extension and to add support for translations.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: [SourceMod] Lives Donator

Post by Neico »

nicely done I'd say :D
Image
Post Reply