AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Bacon (https://forums.alliedmods.net/showthread.php?t=217444)

mukunda 06-02-2013 18:12

[ANY] Bacon
 
7 Attachment(s)

A must have installation on all servers to allow bacon transactions and statistics.

http://www.mukunda.com/baconstrip.png

With this plugin, players can finally share what they love most with their closest friends. Players can type !bacon <friend's name> ingame to pass some of their bacon to that player. If they change their mind, they can invoke !nobacon <bad friend's name> to take away their bacon.

Features
:bee: Threaded SQL powered bacon management.
:bee: Transaction throttling to prevent bacon from clogging up your system.
:bee: Localization support.
:bee: Ability to give the server bacon.
:bee: Cleanup feature in case the bacon gets out of control. The server will eat all of the bacon.
:bee: Automatic updating to keep your bacon smelling great! (requires updater)
:bee: Fresh Delicious Bacon
Command List

:bacon!:sm_bacon <player>
Give bacon to player. If no argument is given, it will show how much bacon you have. Specify "server" to give bacon to the server. The server can also give bacon to players.
:bacon!:sm_nobacon <player>
Take bacon from player. Specify "server" to take your bacon away from the server.
Alias: sm_takebacon
:bacon!:sm_mostbacon
Prints who has the most bacon.
:bacon!:sm_drop_bacon [server command]
Cleanup function as mentioned in the features. Destroys all bacon. :grrr:
Warning: will halt server for up to two (2) seconds.
Any player can only give up to one (1) bacon to another player. And (of course) any of these commands can be used in chat with the chat trigger prefix (i.e. !bacon, !nobacon, !mostbacon)

CVars

A cvar configuration file will be generated automatically at cfg/sourcemod/plugin.bacon.cfg for you when you run bacon for the first time.

Recommended to delete this file after updates to get the most out of your bacon!

Public CVar: serves_bacon
Servers can now be easily checked if bacon service is available!
sm_bacon_notify <0,1,2>
Controls who sees bacon transactions take place.

0 = Do not notify players when bacon is given or taken.
1 = Target of transaction sees a message.
2 = Everyone sees a message.
3 = Everyone sees a gift message. (DEFAULT) (NEW)

Visual Examples:
(MODE1) "<player> gave you some bacon" is seen by the target.
(MODE2) "<player> gave some bacon to <player>" is seen by everyone.
(MODE3) "<player> has received a gift: Bacon" is seen by everyone

Colors for mode3 are supported for CSS (I think),TF2, and CSGO
sm_bacon_cooldown <decimal number>
Controls how long clients must wait between execution of bacon transactions.
Default = 7.77
Units are in seconds.
Changing this resets all cooldowns.
sm_bacon_topcount <1-10>
Controls how many Bacon Masters are printed to people who use !mostbacon
Default = 1
Installation :fox:

Copy files from the archive provided below into your sourcemod folder. A mapchange or a server restart is required for the system to function.

Optional: Install Updater to keep your bacon bug free (ew!) and tasty!

1.1.0 NOTICE: The database operations are now using GetSteamAccountID which is a sourcemod 1.5 feature. If you aren't already using the latest and greatest SourceMod, you will need to upgrade to use this plugin (until the near future when 1.5 is a reality of course).

Localization

Special thanks to the people who have contributed to making Bacon available in every language!
  • German translations by mikazoid

Changes

Keep track of whats happening to your bacon:
Code:

// 1.1.2
//  minor bugfix
//  german translations provided by mikazoid
//
// 1.1.1
//  attempted to fix sql escape string thingy
//
// 1.1.0 9:33 AM 6/12/2013
//  removed [SM] tags from code, if these are desired, place them in the translations
//  added some delicious colors
//  added gift emulation layer
//  added public cvar
//  added sm_bacon_topcount
//  lowered default bacon cooldown
//  improved database access (all existing bacon will be erased, sorry!)
//
// 1.0.3b 9:57 PM 6/5/2013
//  localization improvements (grammar flexibility)
//  notify options added
//  cooldown options added
//  freshened up bacon
//  added user manual
//
// 1.0.2b
//  fixed memory leak
//  enhanced plugin description
//  added updater support
//  freshened up bacon


Screenshots

Below are a few pictures of the delectable system in progress. The first one shows me typing in a bacon command--attempting to give myself some of my bacon.

Of course, in the second picture it shows that it is a strict rule that one simply cannot give himself bacon, and it can only be shared with others.

Picture #3 shows me demanding bacon via abuse of SourceMod's admin chat feature. A person agrees to my demand directly after, and then fails to retract his decision by using an invalid bacon command. I then count my bacon by entering the bacon command without any arguments.

The purple text is not included and is actually a bug in one of my other plugins. :3

The last picture is an accurate visual the recipients when a bacon transaction takes place. (Contributed by r3dw3r3w0lf)

New in 1.1.0: Bacon gift notifications!

Sreaper 06-02-2013 21:17

Re: [ANY] Bacon
 
Very nice. Would you mind adding a screenshot to the OP?

mukunda 06-02-2013 22:00

Re: [ANY] Bacon
 
Quote:

Originally Posted by Sreaper (Post 1963419)
Very nice. Would you mind adding a screenshot to the OP?

Ah, yes. Excellent idea. Pictures say more than a thousand words after all!

thetwistedpanda 06-02-2013 22:08

Re: [ANY] Bacon
 
You sir, deserve more :bacon!:

cool_myll 06-03-2013 06:29

Re: [ANY] Bacon
 
All players have one bacon or infinite? Can we set donators to start with more bacon to give?

EDIT: The server can also give bacon to players. How?

mukunda 06-03-2013 12:39

Re: [ANY] Bacon
 
Updated with a minor memory leak fix, plus updater support to keep your bacon at its freshest!

Quote:

Originally Posted by cool_myll (Post 1963581)
All players have one bacon or infinite? Can we set donators to start with more bacon to give?

All players have infinite bacon, but they can only give one bacon to another player. The database operations are programmed in mind that every player has equal weighting with their bacon and it would be difficult to allow donators to have heavier bacon.

Quote:

Originally Posted by cool_myll (Post 1963581)
The server can also give bacon to players. How?

sm_bacon can be executed via RCON or through the server console directly to deliver bacon to players.

Powerlord 06-03-2013 16:08

Re: [ANY] Bacon
 
I love bacon and all, but... wtf? :P

mukunda 06-03-2013 16:22

Re: [ANY] Bacon
 
Quote:

Originally Posted by Powerlord (Post 1963920)
I love bacon and all, but... wtf? :P

I know it is truly hard to believe that your favorite dish is now easily sharable to your friends--without even leaving your seat! However, please dismiss all doubts and simply rejoice that this dream is now a reality.

lyric 06-03-2013 17:36

Re: [ANY] Bacon
 
Quote:

Originally Posted by Powerlord (Post 1963920)
I love bacon and all, but... wtf? :P

its one of those funny plugins

Marverlous 06-03-2013 21:31

Re: [ANY] Bacon
 
you should make it so that the player (or the whole server) will be notify in the chat when some one give them bacon, thank you


All times are GMT -4. The time now is 10:12.

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