AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Shop [v4.5 | 20 March 2022] (https://forums.alliedmods.net/showthread.php?t=332186)

pan0s 04-28-2021 20:28

[L4D2] Shop [v4.5 | 20 March 2022]
 
8 Attachment(s)
Description:
Well, it is a plugin updated from [L4D2] Item buying System v1.36
I re-coded the source and updated more functions.
Attachment 189348
Attachment 189349
Attachment 189350
Attachment 194332
Update Log:
Spoiler

Features:
  • Native functions call
  • Save functions (Using SQLite Database, no need to setup anything)
  • Support Dedicated or Listen server
  • Support !buy <item> command
  • Points Transfer
  • Handling Fee (for Points Transfer only)
  • More useful information for clients
  • Collected all items into the shop
  • Special Functions (Trial / Permanent)
  • Special Bag (Enable/Disable Special Functions)
  • Admin Menu (Reward, Confiscate, Set)
  • Log actions into the .log file
  • Multiple Languages
  • New code style
  • etc.

Current Special Functions (SF):
Extra items:
How to use?
  • Type !buy in the game to open Shop menu.
  • Type !buy <item> in the game to buy an item by command.
  • type !admin and find 'Shop Commands' to open the shop admin menu.
  • type !rb or !repeatbuy to repeatedly buy.
  • type !kill to suicide.
  • Edit an item cost in the cfg to -1 to disable the item.
  • You can copy others plugin functions to make your own special functions.

When will save points?
To avoid making the server lag, I just added two triggers for it.
  • Round end
  • Player disconnected

Native functions:
Spoiler


Notice:
If you found any bugs, please feel free to let me know.

Pre-Installation:
Nope. (all file included in .zip)

Installation:
Just unzip it to the sourcemod directory.

Translations:
  • en - pan0s
  • zho - pan0s
  • chi - pan0s

Contact me:
Steam


Way to add a new SF:
You can refer l4d2_shop_XXXX, XXXX is SF file name.
Spoiler


Ways to add a new Item:
Spoiler


https://forums.alliedmods.net/showpo...1&postcount=52
https://forums.alliedmods.net/showpo...1&postcount=89

Use pan0s.inc v1.2 to compile all .sp

VladimirTk 04-28-2021 21:32

Re: [L4D2] Shop (29 April 2021)
 
Excellent contribution, right now I will try it, would suggestions be accepted? :D

VladimirTk 04-28-2021 21:36

Re: [L4D2] Shop (29 April 2021)
 
I register this after using it in Versus / confrontation

L 04/28/2021 - 20:28:00: [SM] Blaming: l4d2_shop.smx
L 04/28/2021 - 20:28:00: [SM] Call stack trace:
L 04/28/2021 - 20:28:00: [SM] [0] IsClientConnected
L 04/28/2021 - 20:28:00: [SM] [1] Line 28, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\include\pan0s.inc::IsValidClient
L 04/28/2021 - 20:28:01: [SM] [2] Line 2037, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\l4d2_shop.sp::GetPlayerList
L 04/28/2021 - 20:28:01: [SM] [3] Line 1942, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\l4d2_shop.sp::MenuPlayerList
L 04/28/2021 - 20:28:01: [SM] [4] Line 1906, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\l4d2_shop.sp::MenuPointValuesLis tHandler

pan0s 04-28-2021 21:54

Re: [L4D2] Shop (29 April 2021)
 
Quote:

Originally Posted by VladimirTk (Post 2745342)
Excellent contribution, right now I will try it, would suggestions be accepted? :D

Yes, you can make any suggestion.

Quote:

Originally Posted by VladimirTk (Post 2745343)
I register this after using it in Versus / confrontation

L 04/28/2021 - 20:28:00: [SM] Blaming: l4d2_shop.smx
L 04/28/2021 - 20:28:00: [SM] Call stack trace:
L 04/28/2021 - 20:28:00: [SM] [0] IsClientConnected
L 04/28/2021 - 20:28:00: [SM] [1] Line 28, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\include\pan0s.inc::IsValidClient
L 04/28/2021 - 20:28:01: [SM] [2] Line 2037, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\l4d2_shop.sp::GetPlayerList
L 04/28/2021 - 20:28:01: [SM] [3] Line 1942, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\l4d2_shop.sp::MenuPlayerList
L 04/28/2021 - 20:28:01: [SM] [4] Line 1906, E:\steamcmd\l4d2_sv\left4dead2\addons\sourcem od\scripting\l4d2_shop.sp::MenuPointValuesLis tHandler

Did you compile it? or just install .smx?
I need more error information to fix it, something likes that Client index 0 is not valid.

btw, you may try delete IsClientConnected(IsClientConnected) function on pan0s.inc or delete the checking IsValidClient(i) on line 2037 of l4d2_shop. Then, compile it and try again.

VladimirTk 04-28-2021 22:25

Re: [L4D2] Shop (29 April 2021)
 
Quote:

Originally Posted by pan0s (Post 2745345)
Yes, you can make any suggestion.



Did you compile it? or just install .smx?
I need more error information to fix it, something likes that Client index 0 is not valid.

btw, you may try delete IsClientConnected(IsClientConnected) function on pan0s.inc or delete the checking IsValidClient(i) on line 2037 of l4d2_shop. Then, compile it and try again.

can you add me to your steam account? (My Steam 1133298511) I would not like to fill this post with messages but I will still report errors, right now i'm busy but when i finish i will compile it as it tells me


My english is terrible

Elite Biker 04-29-2021 02:45

Re: [L4D2] Shop (29 April 2021)
 
[All above was Removed]

- Suggestions:


- Remove the sm_kill command it's just annoying Or give an option to remove it in the CFG.
- Available to disable category's in the CFG.
- (Survivors Only) Add an effect item called "Sugar Rush" it acts like adrenaline. (sm_buy sugar).
- Permanent Fire skin (It adds fire on top of the player and hands maybe)
-
Add a changelog to let us know what is going on and what you fixed or not.
- Add Autobuy (sm_autobuy) menu that whenever you don't have it, It will buy it if you have the points and you have to manually enable the items that you want to autobuy them in one round in the CFG you will be available change the items/weapons that you can choice what can be "autobuy".


- Last words:

I really loved the plugin i really would be very happy if this plugin will be one of the best (Within in the shops category plugins i mean).
The only things it missing is testing and giving more description what your plugin can do.


mikaelangelis 04-29-2021 02:59

Re: [L4D2] Shop (29 April 2021)
 
Could you assign a moveable object as Shop checkpoint? E.g: shop assigned to a Trash bin, or alarmed car.... whenever a survivor wants to buy items, he/she needs to reach that object and press E (use) key

pan0s 04-29-2021 05:41

Re: [L4D2] Shop (29 April 2021)
 
Quote:

Originally Posted by VladimirTk (Post 2745355)
can you add me to your steam account? (My Steam 1133298511) I would not like to fill this post with messages but I will still report errors, right now i'm busy but when i finish i will compile it as it tells me


My english is terrible

I have added you.

Quote:

Originally Posted by Elite Biker (Post 2745378)
(I'm using a listen server to test)



- Problems I am having:


What is the "Gold/Blue/Gray" Ammo?
You can't disable category's.
transfer money/admin setpoints don't work.


- Sadly didn't check:

Can you sm_buy <stuff>?


- Suggestions:


- Remove the sm_kill command it's just annoying Or give an option to remove it in the CFG.
- Available to disable category's in the CFG.
- (Survivors Only) Add an effect item called "Sugar Rush" it acts like adrenaline. (sm_buy sugar).
- Permanent Fire skin (It adds fire on top of the player and hands maybe)
-
Add a changelog to let us know what is going on and what you fixed or not.
- Add Autobuy (sm_autobuy) menu that whenever you don't have it, It will buy it if you have the points and you have to manually enable the items that you want to autobuy them in one round in the CFG you will be available change the items/weapons that you can choice what can be "autobuy".


- Last words:

I really loved the plugin i really would be very happy if this plugin will be one of the best (Within in the shops category plugins i mean).
The only things it missing is testing and giving more description what your plugin can do.


  1. What is the "Gold/Blue/Gray" Ammo? it means Laser tag
  2. transfer money/admin setpoints don't work. Tell me the maximum players can be joined into your server (I have just tested the plugin on 4 players co-op server), and can it display the menu normally? (Select action, Select point, select users?)
  3. sm_buy <stuff> yup, it can be supported.
  4. sm_kill I will add an option to disable !kill on cfg.
  5. Well, if you want to add special functions(SF), you need to provide the source code for me.
  6. About the category disabling/enabling, um... now the item can be disabled by setting the cost to -1, but it can still be supported too.
  7. To disable SF, I prefer doing that by setting the cost to -1 on next version. (Can't buy, Can't use)

Thank you for your comments. I just use it on the 4-players co-op server, so there may be some problems over 4 players.
it seems the problems that are just the checking client index now.
Add me Discord by id pan#6098, I will send the next version plugin to u. After testing, I will release it here.

Quote:

Originally Posted by mikaelangelis (Post 2745379)
Could you assign a moveable object as Shop checkpoint? E.g: shop assigned to a Trash bin, or alarmed car.... whenever a survivor wants to buy items, he/she needs to reach that object and press E (use) key

do you mean native .inc and creating 'use plugin' function for other plugins to get/set functions? If yes, um... I will refer other plugin to try doing that becuz I have no experience for it..

pan0s 04-29-2021 12:18

Re: [L4D2] Shop v2.2 (30 April 2021)
 
v2.2 (30 April 2021) updated, please remove the old cfg file to get the latest cfg file,

mikaelangelis 04-29-2021 13:16

Re: [L4D2] Shop (29 April 2021)
 
Quote:

Originally Posted by pan0s (Post 2745389)


do you mean native .inc and creating 'use plugin' function for other plugins to get/set functions? If yes, um... I will refer other plugin to try doing that becuz I have no experience for it..

Yeah, like... when you press E (use) key to interact with object, buy menu panel will display. Do you know extinguisher flamethrower plugin by silvers? it is kinda like that


All times are GMT -4. The time now is 14:16.

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