Raised This Month: $433 Target: $400
 108% 

[L4D2] Shop


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Explait
Junior Member
Join Date: Oct 2019
Plugin ID:
6986
Plugin Version:
1.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    l4d2 Shop
    Old 03-16-2020 , 06:00   [L4D2] Shop
    Reply With Quote #1

    This plugin adds a store to l4d2 games to open a store and buy something just type !shop in the chat (or sm_shop in the console), for admins there is a command !givemoney with this command you can give players money for example: !givemoney pewdiepie 100000.
    If your friend does not have enough money, just share your money a little: enter !pay your friendís name and the amount of money.


    ----Creators-----
    Coder, SHOP,FUNCTIONS - https://steamcommunity.com/profiles/76561198858326120/
    Coder, MENU - https://steamcommunity.com/id/luckymate
    ----Creators-----

    ----New Updates-----
    1.zombie killing system - using this system you will receive a different amount of credits for zombies for example (boomer - 25) (smoker - 50)

    2.Adding store settings - Using the settings, you can change the number of credits for killing zombies

    3.Fixing Bugs
    ----New Updates-----

    -------NEXT Updates------


    Cars will be scattered throughout the map, with which you can use the store.

    You can add new products and change them.-------NEXT Updates------

    have fun!
    Attached Thumbnails
    Click image for larger version

Name:	awegarg.PNG
Views:	47
Size:	9.1 KB
ID:	180246  
    Attached Files
    File Type: smx [L4D2] Store.smx (11.3 KB, 19 views)
    File Type: sp Get Plugin or Get Source ([L4D2] Store.sp - 39 views - 22.1 KB)

    Last edited by Explait; 03-19-2020 at 17:16.
    Explait is offline
    Explait
    Junior Member
    Join Date: Oct 2019
    Old 03-16-2020 , 08:44   Re: [L4D2] Shop
    Reply With Quote #2

    Quote:
    Originally Posted by BloodyBlade View Post
    Смешивание стилей не очень хорошо.
    * Converted plugin source to the latest syntax. Requires SourceMod 1.8 or newer.
    Please update your post)

    Thank you, this is my second plugin, I am glad that people help me)
    Explait is offline
    mikaelangelis
    Member
    Join Date: Oct 2017
    Old 03-19-2020 , 09:02   Re: [L4D2] Shop
    Reply With Quote #3

    Can you designate shop command to an object like a vendor machine only so when we reach a vendor machine, we can use only shop, not anytime and anywhere?
    mikaelangelis is offline
    Explait
    Junior Member
    Join Date: Oct 2019
    Old 03-19-2020 , 15:39   Re: [L4D2] Shop
    Reply With Quote #4

    Quote:
    Originally Posted by mikaelangelis View Post
    Can you designate shop command to an object like a vendor machine only so when we reach a vendor machine, we can use only shop, not anytime and anywhere?

    ok, now I will do the update)
    Explait is offline
    mikaelangelis
    Member
    Join Date: Oct 2017
    Old 03-23-2020 , 15:13   Re: [L4D2] Shop
    Reply With Quote #5

    Quote:
    Originally Posted by Explait View Post
    ok, now I will do the update)
    glad to hear ur working on that feature
    mikaelangelis is offline
    L4D2Noob
    Junior Member
    Join Date: Mar 2020
    Location: Moscow
    Old 03-28-2020 , 15:45   Re: [L4D2] Shop
    Reply With Quote #6

    Hey guys! I attached a version of the plugin that I edited for my server. Her changes:
    • Reduced the number of bonuses issued for killing infected
    • Defibrillator and full HP cut out for balance
    • Fixed a bug with a double purchase of adrenaline
    • Prices increased by 2 times
    • Fully translated into Russian

    But I still did not understand how to limit the use of the !Shop command? So that it can be used every 4 minutes. Help pills :-)
    Attached Files
    File Type: sp Get Plugin or Get Source ([L4D2] Store.sp - 2 views - 19.3 KB)
    __________________

    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    L4D2Noob
    Junior Member
    Join Date: Mar 2020
    Location: Moscow
    Old 03-28-2020 , 18:17   Re: [L4D2] Shop
    Reply With Quote #7

    Quote:
    Originally Posted by L4D2Noob View Post
    Hey guys! I attached a version of the plugin that I edited for my server. Her changes:
    • Reduced the number of bonuses issued for killing infected
    • Defibrillator and full HP cut out for balance
    • Fixed a bug with a double purchase of adrenaline
    • Prices increased by 2 times
    • Fully translated into Russian

    But I still did not understand how to limit the use of the !Shop command? So that it can be used every 4 minutes. Help pills :-)
    HTML Code:
    public Action HinT(int client, int args) // создаем функцию для комманды)
    {
    	Menu menu = CreateMenu(MeleeMenuHandler);
    	SetMenuTitle(menu, "Твои деньги %d", g_iCredits[client]);
    
    	AddMenuItem(menu, "option1", "Оружие");
    	AddMenuItem(menu, "option2", "Рукопашное");
    	AddMenuItem(menu, "option3", "Остальное");
    	DisplayMenu(menu, client, MENU_TIME_FOREVER);
    	SetMenuExitButton(menu, true);
    
    	// Timer
    	int currentTime = GetTime();
        if (cooldownTimes[client] != -1 && cooldownTimes[client] > currentTime)
        {
            ReplyToCommand(client, "Эй, ты слишком часто используешь магазин, подожди ка!");
            return Plugin_Handled;
        }
        // ayy at this point they're thing is -1 (they haven't used it before) or their cooldown is OK
        
        cooldownTimes[client] = currentTime + 240;
    	//End Timer
    	
    	return Plugin_Handled;
    }
    The code that is above, it creates a menu and starts counting the Cooldown at the same time.

    How to make it right so that either the menu opens or the Cooldown starts?
    __________________


    Last edited by L4D2Noob; 03-28-2020 at 18:27.
    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    L4D2Noob
    Junior Member
    Join Date: Mar 2020
    Location: Moscow
    Old 03-28-2020 , 18:46   Re: [L4D2] Shop
    Reply With Quote #8

    Quote:
    Originally Posted by L4D2Noob View Post
    HTML Code:
    public Action HinT(int client, int args) // создаем функцию для комманды)
    {
    	Menu menu = CreateMenu(MeleeMenuHandler);
    	SetMenuTitle(menu, "Твои деньги %d", g_iCredits[client]);
    
    	AddMenuItem(menu, "option1", "Оружие");
    	AddMenuItem(menu, "option2", "Рукопашное");
    	AddMenuItem(menu, "option3", "Остальное");
    	DisplayMenu(menu, client, MENU_TIME_FOREVER);
    	SetMenuExitButton(menu, true);
    
    	// Timer
    	int currentTime = GetTime();
        if (cooldownTimes[client] != -1 && cooldownTimes[client] > currentTime)
        {
            ReplyToCommand(client, "Эй, ты слишком часто используешь магазин, подожди ка!");
            return Plugin_Handled;
        }
        // ayy at this point they're thing is -1 (they haven't used it before) or their cooldown is OK
        
        cooldownTimes[client] = currentTime + 240;
    	//End Timer
    	
    	return Plugin_Handled;
    }
    The code that is above, it creates a menu and starts counting the Cooldown at the same time.

    How to make it right so that either the menu opens or the Cooldown starts?
    So it works!

    Spoiler
    __________________

    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    L4D2Noob
    Junior Member
    Join Date: Mar 2020
    Location: Moscow
    Old 03-28-2020 , 18:53   Re: [L4D2] Shop
    Reply With Quote #9

    My version (1.3)
    • Dollar icon removed
    • The store can be used once every 90 seconds
    Attached Files
    File Type: sp Get Plugin or Get Source ([L4D2] Store.sp - 0 views - 19.8 KB)
    File Type: smx [L4D2] Store.smx (9.1 KB, 1 views)
    __________________

    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    Balloons
    Junior Member
    Join Date: Feb 2020
    Old 03-28-2020 , 19:10   Re: [L4D2] Shop
    Reply With Quote #10

    Is there a way of adding a 'previous' button after selecting any of the sub menus? Or have the player start with a certain amount of cash?
    Balloons is offline
    Reply


    Thread Tools
    Display Modes

    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 12:05.


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