View Single Post
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