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

BaseBuilder Vipshop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AweTTcs
Junior Member
Join Date: Dec 2021
Old 11-21-2022 , 11:40   BaseBuilder Vipshop
Reply With Quote #1

Hello, I am currently in need of a vip shop for my basebuilder server (CS 1.6)

Title Of Menu: Bagljas | VIPSHOP

Options For Menu:

1. Guns
2. Health

GUNS:
1. G3SG1 [$8000]
2. M249 [$4500]
0. Exit

HEALTH:
1. 100 [$1000]
2. 150 [$3000]
3. 200 [$4000]
AweTTcs is offline
samir_dz
Junior Member
Join Date: Oct 2022
Old 11-21-2022 , 17:53   Re: BaseBuilder Vipshop
Reply With Quote #2

Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

public plugin_init()
{
    register_plugin("Custom Shop", "1.0", "ZaX")

    register_clcmd("say /vs", "ClcmdMenu")
    register_clcmd("say /vshop", "ClcmdMenu")
    register_clcmd("say /vipshop", "ClcmdMenu")
}

public ClcmdMenu(id)
{
	
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
    {
        client_print(id, print_chat, "Only the Vips Can use VIP Shop");
        
        return PLUGIN_HANDLED;
    }
    if( cs_get_user_team(id) == CS_TEAM_CT)
    {
    new szMenu = menu_create("Bagljas | \rVIPSHOP", "szMenuHandler")

    menu_additem(szMenu, "Guns", "0", 0)
    menu_additem(szMenu, "Health", "1", 0)

    menu_setprop( szMenu, MPROP_EXIT, MEXIT_ALL )

    menu_display(id, szMenu, 0)
}
}
public szMenuHandler(id, szMenu, item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(szMenu)
        return PLUGIN_HANDLED
    }

    switch(item)
    {
        case 0: OpenGunsMenu(id)
        case 1: OpenHealthMenu(id)
    }
    return PLUGIN_CONTINUE
}

public OpenGunsMenu(id)
{

    new szGunsMenu = menu_create("Bagljas | \rVIPSHOP", "szGunsMenuHandler")
    menu_additem(szGunsMenu, "G3SG1 \r[$8000]", "0", 0)
    menu_additem(szGunsMenu, "M249 \r[$4500]", "1", 0)
    menu_setprop( szGunsMenu, MPROP_EXIT, MEXIT_ALL )
    menu_display(id, szGunsMenu, 0)
}

public szGunsMenuHandler(id, szGunsMenu, item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(szGunsMenu)
        return PLUGIN_HANDLED
    }

    switch(item)
    {
        case 0:
        {
            if(cs_get_user_money(id) < 8000)
            {
                client_print(id, print_chat, "No enough money!")
                return PLUGIN_HANDLED
            }
            give_item(id, "weapon_g3sg1")
            cs_set_user_bpammo(id, CSW_G3SG1, 90)
            cs_set_user_money(id, cs_get_user_money(id) - 8000)
        }
        case 1:
        {
            if(cs_get_user_money(id) < 4500)
            {
                client_print(id, print_chat, "No enough money!")
                return PLUGIN_HANDLED
            }
            give_item(id, "weapon_m249")
            cs_set_user_bpammo(id, CSW_M249, 200)
            cs_set_user_money(id, cs_get_user_money(id) - 4500)
        }
    }
    return PLUGIN_CONTINUE
}


public OpenHealthMenu(id)
{

    new szHealthMenu = menu_create("Bagljas | \rVIPSHOP", "szHealthMenuHandler")
    menu_additem(szHealthMenu, "Health \y100 \r[$1000]", "0", 0)
    menu_additem(szHealthMenu, "Health \y150 \r[$3000]", "1", 0)
    menu_additem(szHealthMenu, "Health \y200 \r[$4000]", "2", 0)
    menu_setprop( szHealthMenu, MPROP_EXIT, MEXIT_ALL )
    menu_display(id, szHealthMenu, 0)
}

public szHealthMenuHandler(id, szHealthMenu, item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(szHealthMenu)
        return PLUGIN_HANDLED
    }

    switch(item)
    {
        case 0:
        {
            if(cs_get_user_money(id) < 1000)
            {
                client_print(id, print_chat, "No enough money!")
                return PLUGIN_HANDLED
            }
            set_user_health(id, get_user_health(id) + 100)
            cs_set_user_money(id, cs_get_user_money(id) - 1000)
        }
        case 1:
        {
            if(cs_get_user_money(id) < 3000)
            {
                client_print(id, print_chat, "No enough money!")
                return PLUGIN_HANDLED
            }
            set_user_health(id, get_user_health(id) + 150)
            cs_set_user_money(id, cs_get_user_money(id) - 3000)
        }
        case 2:
        {
            if(cs_get_user_money(id) < 4000)
            {
                client_print(id, print_chat, "No enough money!")
                return PLUGIN_HANDLED
            }
            set_user_health(id, get_user_health(id) + 200)
            cs_set_user_money(id, cs_get_user_money(id) - 4000)
        }
    }
    return PLUGIN_CONTINUE
}
samir_dz is offline
AweTTcs
Junior Member
Join Date: Dec 2021
Old 11-22-2022 , 13:17   Re: BaseBuilder Vipshop
Reply With Quote #3

Thank you very much
AweTTcs is offline
MaryWashington
New Member
Join Date: Jan 2023
Old 01-18-2023 , 05:16   Re: BaseBuilder Vipshop
Reply With Quote #4

Thanks for the info.
MaryWashington 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 13:37.


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