Raised This Month: $ Target: $400
 0% 

[L4D2] Shop [v4.5 | 20 March 2022]


Post New Thread Reply   
 
Thread Tools Display Modes
swiftswing1
Member
Join Date: Oct 2020
Old 10-24-2023 , 21:55   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #151

hi again. when i buy a melee weapon while on secondary slot, all is well. however, when i buy a melee weapon in any other slot (e.g. primary, grenade, medkit), it gives me the "failed to buy" error but i still get melee weapon. also no points are deducted from wallet. anyone else have this issue? thanks.

EDIT: i have found the problem. the shop seems to conflict with this plugin. if you turn off auto-switch on secondary pickup and buy a melee weapon, it will throw you the refund message but still give you the weapon. any possible way to fix this?

Last edited by swiftswing1; 10-25-2023 at 20:55.
swiftswing1 is offline
pan0s
Senior Member
Join Date: Nov 2017
Old 11-01-2023 , 22:58   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #152

Quote:
Originally Posted by swiftswing1 View Post
hi again. when i buy a melee weapon while on secondary slot, all is well. however, when i buy a melee weapon in any other slot (e.g. primary, grenade, medkit), it gives me the "failed to buy" error but i still get melee weapon. also no points are deducted from wallet. anyone else have this issue? thanks.

EDIT: i have found the problem. the shop seems to conflict with this plugin. if you turn off auto-switch on secondary pickup and buy a melee weapon, it will throw you the refund message but still give you the weapon. any possible way to fix this?
It is because some map may not have the melee, so there is a checking for buying melee.
PHP Code:
            else if(StrEqual(weaponName"weapon_melee"))
            {
                if (
StrContains(weaponNamemeleefalse) == -1)
                {
                       
char playerWeaponName[32];
                       
GetEntPropString(GetPlayerWeaponSlot(client1), Prop_Data"m_strMapSetScriptName"playerWeaponNamesizeof(playerWeaponName));
                    if(
StrEqual(playerWeaponNamemelee))
                    {
                        
isSucceed true;
                    }
                }
            } 
if you don't need the checking, just add
PHP Code:
bool BuyMelee(int client, const char[] meleeint price)
{
    if(!
g_bPointsOn) return false;
    if(
IsSurvivorDeadEx(clientmelee)) return false;

    
bool isSucceed false;
    if (
Checkout(clientmeleepricefalse))
    {

         
isSucceed true//add
         
CheatCommand(client"give"melee); 
__________________

Last edited by pan0s; 11-01-2023 at 23:01.
pan0s is offline
swiftswing1
Member
Join Date: Oct 2020
Old 11-04-2023 , 21:38   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #153

i'll check it out. thanks for replying.
swiftswing1 is offline
S.A.S
Member
Join Date: Jul 2023
Old 12-17-2023 , 12:27   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #154

Code:
SourceMod error session started
Exception reported: Client 7 is not in game
Blaming: l4d2_shop.smx
Call stack trace:
ThrowError
Line 700, \scripting\include\pan0s.inc::CPrintToChat
Line 1418, l4d2_shop.sp::KillClient
Line 2939, l4d2_shop.sp::HandleMenuSuicide
Error log file session closed.
S.A.S is offline
Misagi_Maxim
Junior Member
Join Date: Jul 2022
Old 12-29-2023 , 16:20   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #155

Quote:
Originally Posted by pan0s View Post
Translations:
Please "TR" translation.

Last edited by DarkDeviL; 12-30-2023 at 07:03. Reason: Adjusted full quote to fit the relation to the post.
Misagi_Maxim is offline
lawkmlaw
Junior Member
Join Date: Mar 2016
Old 04-24-2024 , 03:55   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #156

thanks for sharing









搬屋公司提供專業的搬家服務,涵蓋住宅和商業搬遷。我們的團隊精通安全高效的搬運技巧,保證您的財物安全 無憂。
lawkmlaw is offline
Misagi_Maxim
Junior Member
Join Date: Jul 2022
Old 05-01-2024 , 23:15   Re: [L4D2] Shop [v4.5 | 20 March 2022]
Reply With Quote #157

Quote:
Originally Posted by pan0s View Post
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

After installing this mod, the server crashes during the game and resets itself. Will you release an update for this?
Misagi_Maxim is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:08.


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