Raised This Month: $ Target: $400
 0% 

Shop Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
RiFGanG
Member
Join Date: May 2015
Location: AL-Houceïma, Morroco
Old 07-15-2015 , 12:28   Shop Menu
Reply With Quote #1

This Plugin Shop Menu

Code:
1. Grenade HE [6000$]
2. Grenade Flash [4000$]
3. Gravity [8000$]
4. AWP [15000$]
5. 150HP [7000$]
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <xs>
#include <nvault>
#include <engine>
#include <colorchat>

#define PLUGIN "Shop Menu"
#define VERSION "1.0"
#define AUTHOR "BooHLaaL"

new cash[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /shop""CmdShop"0);
    
register_clcmd("say shop""CmdShop"0);
    
}


public 
CmdShop(id)
{

    new 
menu menu_create("\r[R#G] \yShop Menu:""CmdShop_Get");
    
    
menu_additem(menu"\yGrenade HE \d[\r6000$\d]""1"0);
    
menu_additem(menu"\yGrenade Flash \d[\r4000$\d]""2"0);
    
menu_additem(menu"\yGravity \d[\r8000$\d]""4"0);
    
menu_additem(menu"\yAWP \d[\r15000$\d]""5"0);
    
menu_additem(menu"\y150 HP \d[\r7000$\d]""6"0);

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);

    
menu_display(idmenu0);

}

public 
CmdShop_Get(idmenuitem)
{

    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }


    new 
data[6], szName[64];
    new 
accesscallback;

    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);

    
cash[id] = cs_get_user_money(id);
    
    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1:
        {
            if(
cash[id] > 6000)
            {
                
ColorChat(idGREEN"^4[R#G] ^1You Bought ^4[Grenade HE]");
                
cs_set_user_money(idcash[id] - 6000);
                
give_item(id"weapon_hegrenade");
            }
            else {
                
ColorChat(idGREEN"^4[R#G] ^1You Don't Have Enough ^4[Money]");
            }
        }
        case 
2:
        {
           if(
cash[id] > 4000)
            {
                
ColorChat(idGREEN"^4[R#G] ^1You Bought ^4[Grenade Flash]");
                
cs_set_user_money(idcash[id] - 4000);
                
give_item(id"weapon_flashbang");
            }
            else {
                
ColorChat(idGREEN"^1[R#G] ^1You Don't Have Enough ^4[Money]");
            }           
        }
        case 
4:
        {
            if(
cash[id] > 8000)
            {
                
ColorChat(idGREEN"^4[R#G] ^1You Bought ^4[Gravity]");
                
cs_set_user_money(idcash[id] - 8000);
                
set_user_gravity(id0.25);
            }
            else {
                
ColorChat(idGREEN"^4[R#G] ^1You Don't Have Enough ^4[Money]");
            }
        }
        case 
5:
        {
            if(
cash[id] > 15000)
            {
                
ColorChat(idGREEN"^4[R#G] ^1You Bought ^4[AWP]");
                
cs_set_user_money(idcash[id] - 15000);
                
give_item(id"weapon_awp");
            }
            else {
                
ColorChat(idGREEN"^4[R#G] ^1You Don't Have Enough ^4[Money]");
            }
        }
        case 
6:
        {
            if(
cash[id] > 7000)
            {
                
ColorChat(idGREEN"^4[R#G] ^1You Bought ^4[150 HP]");
                
cs_set_user_money(idcash[id] - 7000)
                
set_user_health(id150);
            }
            else {
                
ColorChat(idGREEN"^4[R#G] ^1You Don't Have Enough ^4[Money]");            
                return 
0
                
}
            }
        }
    } 
__________________
AL-Houceïma

[RiF#GanG] - [RiF#BoYs] - [Bario#Briro] - [Morroco]
RiFGanG is offline
 


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 23:18.


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