AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Power shop (https://forums.alliedmods.net/showthread.php?t=263337)

Arkarr 05-23-2015 09:06

[TF2] Power shop
 
29 Attachment(s)
[TF2] Power Shop



https://puu.sh/rooCC/910797c17e.png
So... I made this plugin long time ago. I made it quickly and badly. I rewrote it a bit, and added a database system to save the purchases. The main objective of this plugin is to replace Überupgrade wich has been reported to be buggy.

Original idea : https://forums.alliedmods.net/showpo...25&postcount=1

https://puu.sh/rooCG/944b44999e.png
Here is the list of avaible features for now :
  • Fully configurable shop items through a easy config file
  • Translations ! By the way, I need help for that.
  • Easy to configure
  • Easy to installation (drag-n-drop)
  • Unlimited ammount of items
  • Cool HUD :3

https://puu.sh/rooCK/066043be6c.png

Before anything, make sure you have installed :

[TF2] TF2 Attributes

1) Download the SMX file.
2) Put the smx file in the PLUGINS folder.
3) Download the translation file and put it in translations folder.
4) Download and edit the shop configuration file to your needs. (configs/TF2_PSitems.cfg)
Exemple of configuration (thanks to secondtimesold)
Spoiler

6) Navigate to the database configuration file (configs/database.cfg) and add an entry like this at the end of the file, but before the last '}' :
Code:

        [...]
        "powershop"
        {
                "driver"                        "default"
                "host"                        "MY HOST IP"
                "database"                        "PowerShop"
                "user"                        "MY DATABASE USER"
                "pass"                        "MY PASSWORD"
        }

Obviously, replace MY HOST IP by your database host's IP, MY DATABASE USER by your database's user and MY PASSWORD by your user's database password.
7) REBOOT THE SERVER OR CHANGE THE MAP!

https://puu.sh/rooCt/e894d3eab4.png
sm_credits - Display the number of credits you have.
sm_shop - Display the shop menu
Require : Admin flag - cheats
sm_addcredit - Add a specific ammount of credit to a player.

https://puu.sh/rooAd/55c1dba974.png
A configuration file is automatically generated at the first run of this plugin. Althoug, here is a list of cvar :

Code:

// This file was auto-generated by SourceMod (v1.8.0.5967)
// ConVars for plugin "TF2PowerShop.smx"


// Configuration name in database.cfg, by default, all results are saved in the sqlite database.
// -
// Default: "storage-local"
sm_tf2ps_configuration_name "powershop"

// How much credit to deduct when you die.
// -
// Default: "5"
// Minimum: "0.000000"
sm_tf2ps_death_deduction "5"

// How much credits to give on kill.
// -
// Default: "3"
// Minimum: "0.000000"
sm_tf2ps_kill_credits "3"

// Restric the command !shop to 1 team only. (-1 no restriction, 0 RED only, 1 BLU only)
// -
// Default: "-1"
// Minimum: "-1.000000"
// Maximum: "1.000000"
sm_tf2ps_shop_restriction "-1"

// How much credits to give on team loose x 3.
// -
// Default: "30"
// Minimum: "0.000000"
sm_tf2ps_teamLooseX3_credits "30"

// How much credits to give on team win.
// -
// Default: "10"
// Minimum: "0.000000"
sm_tf2ps_teamWin_credits "10"

// How much credits to give on every 90 seconds.
// -
// Default: "10"
// Minimum: "0.000000"
sm_tf2ps_time_credits "10"

sm_tf2ps_HUD_position_x "0.14"
sm_tf2ps_HUD_position_y "0.90"

https://puu.sh/rooCU/f0cc0f7c77.png
Nothing, really. Just feel free to ask.

https://puu.sh/rooCk/5e5ba6f955.png
None found yet. Produce strange things when reloading the plugin with player inside server.

https://puu.sh/rooCN/00e99ea989.png
<none>

http://puu.sh/rNitX/6e8e51b58d.png
https://github.com/Arkarr/TF2-PowerShop

Enjoy !

Logs :
Spoiler

deadmau54 05-23-2015 09:12

Re: [TF2] Sh*tty power shop (as requested)
 
Thanks for this ^^

Arkarr 05-23-2015 09:15

Re: [TF2] Sh*tty power shop (as requested)
 
Quote:

Originally Posted by deadmau54 (Post 2300098)
Thanks for this ^^

Anytime, not finished.

deadmau54 05-23-2015 09:29

Re: [TF2] Sh*tty power shop (as requested)
 
Few quick suggestions:
• Credits displayed on screen (lower left)
• !credits displays 'You have X credits.' in chat
• 'You gained X credits.' message printed to client in chat upon gaining credits
• Back button in menu sections (that takes you back to main menu)
• Upgrade information shouldn't have numbers at the beginning of lines
• Jump height should have higher max limit

Btw, spending points doesn't really work, whatever you're buying gets upgraded, but points don't change.
And weapon upgrades don't work either.

PS: Thanks so much for doing this, I really appreciate it.

Arkarr 05-23-2015 09:42

Re: [TF2] Sh*tty power shop (as requested)
 
Quote:

Originally Posted by deadmau54 (Post 2300105)
Few quick suggestions:
• Credits displayed on screen (lower left)
• !credits displays 'You have X credits.' in chat
• 'You gained X credits.' message printed to client in chat upon gaining credits
• Back button in menu sections (that takes you back to main menu)
• Upgrade information shouldn't have numbers at the beginning of lines
• Jump height should have higher max limit

Btw, spending points doesn't really work, whatever you're buying gets upgraded, but points don't change.
And weapon upgrades don't work either.

PS: Thanks so much for doing this, I really appreciate it.

Not gonna fix it now, too bored. But, sure will do it sometimes...
Fixed some. Also, if you really appreciate it, yu can always give me a few bucks, you know, I have to eat :3

Pomp 05-23-2015 12:28

Re: [TF2] Sh*tty power shop (as requested)
 
Cool plugin.
- bug: you gain credits if you kill yourself or type "explode" in console
- bug: bodies don't become gold after you kill them with upgrade
- bug: health on soldier doesn't go after 350, even though it says 1000. Health regen adds more after 350, even if it's not intended to
- bug: my players are reporting that the rate of fire doesn't work
- bug: "back" button doesn't work *sometimes* in upgrades menu when you don't have enough credits... I'm not sure for what though
- suggestion: move credits to a different location; my server has spells enabled and spells overwrite the credits text
- suggestion: add a cvar to give points for assists
- suggestion: secondary ammo regen
- suggestion: input from my players - "minicrit after kill" upgrade
- suggestion: input from my players - "clip size" upgrade
- suggestion: command to view other players' credits
- suggestion: ability to give other players from your credit

I think I'll keep adding there forever

Happy DODs player 05-23-2015 12:42

Re: [TF2] Sh*tty power shop (as requested)
 
Wil test this, Looks good.

Arkarr 05-23-2015 12:58

Re: [TF2] Sh*tty power shop (as requested)
 
- bug: bodies don't become gold after you kill them with upgrade
You sure ? It worked fine on my server.
- bug: "back" button doesn't work *sometimes* in upgrades menu when you don't have enough
Strange as well.

Suggestion looks cool. I will add that.

Quote:

Originally Posted by Happy DODs player (Post 2300171)
Wil test this, Looks good.

Thanks ♥

Pomp 05-23-2015 13:05

Re: [TF2] Sh*tty power shop (as requested)
 
Quote:

Originally Posted by Arkarr (Post 2300180)
- bug: bodies don't become gold after you kill them with upgrade
You sure ? It worked fine on my server.
- bug: "back" button doesn't work *sometimes* in upgrades menu when you don't have enough
Strange as well.

Suggestion looks cool. I will add that.


Thanks ♥

what exactly happens is the body turns gold just for half a second and then becomes normal, falling on ground and such

Chdata 05-23-2015 14:06

Re: [TF2] Sh*tty power shop (as requested)
 
difference between uber upgrades?


All times are GMT -4. The time now is 00:21.

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