Raised This Month: $51 Target: $400
 12% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Maku
Member
Join Date: Dec 2020
Location: United Kingdom
Old 11-15-2021 , 19:44   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #51

How do I add a custom weapon in the menu from a custom map?

I have this in a .vpk from a custom map:

Quote:
"meleeweapons" "dagger_water;leon_knife;hammer_roku;zuko;sho vel;pitchfork"
Maku is offline
pan0s
Senior Member
Join Date: Nov 2017
Old 11-18-2021 , 21:41   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #52

Quote:
Originally Posted by Maku View Post
How do I add a custom weapon in the menu from a custom map?

I have this in a .vpk from a custom map:
Very easy to do it.
Step 1.
Add the command into the (Find which shop you want to put it into)
e.g.
PHP Code:
// Shop items ------------------------------------>
...
(
Melee shop is in pan0s.inc)
stock const char g_sMelees[][] = 
{
    
"katana",                       // 0
...
    
"crowbar",                      // 14
    
"meleeweapons",                       // 15 <-ID
}; 
Step 2.
Add price ([15] must be same to above ID
PHP Code:
cvar_costs[SHOP_MELEES][15]             = CreateConVar("cvar_cost_meleeweapons","9","How many points a meleeweapons costs. -1=Disabled",CVAR_FLAGS); 
Step 3.
Add translation text (l4d2_weapons.phrases.txt):

PHP Code:
    "meleeweapons"
    
{
        
"en"        "Your New Weapon"
    

Done.

v4.3 or later:
Step 1.
Add the command into the (Find which shop you want to put it into) (find them in shop_cv.inc)
e.g.
PHP Code:
// Shop items ------------------------------------>
...
STR g_sShopMelees[][][] = 
{    
//item name                                price    Description                                Melee ID:
    
"katana",                                "9",    "buying a katana"}                        // 0
...
    , { 
"crowbar",                            "9",    "buying a crowbar"}                        // 15
    
, { "you_new_melee",                            "9",    "buying a you_new_melee"}                        // 16
}; 
Step 2.
Add translation text (l4d2_weapons.phrases.txt):

PHP Code:
    "you_new_melee"
    
{
        
"en"        "Your New Weapon"
    

Done.

Last edited by pan0s; 03-17-2022 at 23:21.
pan0s is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-03-2021 , 19:01   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #53

is way to add custom function item? i have idea to add rope plugins
https://forums.alliedmods.net/showthread.php?p=2764966
__________________

Last edited by NoroHime; 12-03-2021 at 19:02.
NoroHime is offline
pan0s
Senior Member
Join Date: Nov 2017
Old 12-07-2021 , 00:45   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #54

Quote:
Originally Posted by NoroHime View Post
is way to add custom function item? i have idea to add rope plugins
https://forums.alliedmods.net/showthread.php?p=2764966
yes, you can do it, just like what I have said#52.

Last edited by pan0s; 12-07-2021 at 00:46.
pan0s is offline
Maku
Member
Join Date: Dec 2020
Location: United Kingdom
Old 12-08-2021 , 20:49   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #55

Quote:
Originally Posted by pan0s View Post
Very easy to do it.
Step 1.
Add the command into the (Find which shop you want to put it into)
e.g.
PHP Code:
// Shop items ------------------------------------>
...
(
Melee shop is in pan0s.inc)
stock const char g_sMelees[][] = 
{
    
"katana",                       // 0
...
    
"crowbar",                      // 14
    
"meleeweapons",                       // 15 <-ID
}; 
Step 2.
Add price ([15] must be same to above ID
PHP Code:
cvar_costs[SHOP_MELEES][15]             = CreateConVar("cvar_cost_meleeweapons","9","How many points a meleeweapons costs. -1=Disabled",CVAR_FLAGS); 
Step 3.
Add translation text (l4d2_weapons.phrases.txt):

PHP Code:
    "meleeweapons"
    
{
        
"en"        "Your New Weapon"
    

Done.
It worked, thanks!
Maku is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-19-2021 , 05:46   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #56

im keep using it a mounth,today i want add gnome and cola bottles then i remember this cannot compile... i dont known how you declared your g_sMelees[][]
Code:
//// l4d2_shop.sp
//
// B:\Documents\sm1.10\l4d2_shop.sp(510) : error 017: undefined symbol "g_sMelees"
// B:\Documents\sm1.10\l4d2_shop.sp(510) : error 017: undefined symbol "g_sMelees"
// B:\Documents\sm1.10\l4d2_shop.sp(2395) : error 017: undefined symbol "g_sMelees"
// B:\Documents\sm1.10\l4d2_shop.sp(2396) : error 017: undefined symbol "g_sMelees"
//
// 4 Errors.
//
--
solved, looks your many plugins referenced pan0s.inc
but they have difference content
__________________

Last edited by NoroHime; 12-19-2021 at 06:06. Reason: solved
NoroHime is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 12-20-2021 , 12:56   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #57

Hi, Thanks for sharing this plugin, but I have some questions, if anyone can help I appreciate it.

1) I understand that it is possible to buy Specials, Witches and Tanks in the purchase system, but this option does not appear in the menu:
Does anyone have this enabled?

I compiled the plugin, without errors but with some warnings, maybe I did something that is not correct.

These configs below, is referring to the purchase of special infected, witches, tanks, mobs...etc...?

Code:
// How many points at jockey costs. -1=Disabled
// -
// Default: "7"
cvar_cost_infected_jockey "200"

// How many points at mini-event/mob costs. -1=Disabled
// -
// Default: "18"
cvar_cost_infected_mob "200"

// How many points at mega mob costs. -1=Disabled
// -
// Default: "23"
cvar_cost_infected_mob_mega "200"

// How many points a smoker costs. -1=Disabled
// -
// Default: "7"
cvar_cost_infected_smoker "200"
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie

Last edited by Mi.Cura; 12-20-2021 at 12:58.
Mi.Cura is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-21-2021 , 15:29   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #58

seems infected shop just available on infected team
__________________
NoroHime is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 12-22-2021 , 02:40   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #59

I have made a similar shop system.
You can add more special shop from my plugin
__________________

Last edited by HarryPotter; 02-05-2022 at 07:38.
HarryPotter is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 12-22-2021 , 15:43   Re: [L4D2] Shop [v2.8 | 27 July 2021]
Reply With Quote #60

Quote:
Originally Posted by HarryPotter View Post
I have made a similar shop system.
You can add more special shop from my plugin
Hello Harry Potter,
I sent you a private message
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura 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 07:01.


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