Raised This Month: $ Target: $400
 0% 

Can someone help me ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-28-2011 , 13:28   Re: Can someone help me ?
Reply With Quote #2

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

new const PLUGIN[] = "grenadeshop"
new const VERSION[] = "0.1"
new const AUTHOR[] = "quark"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /nades""grenadeshop")
    
register_clcmd("say nades""grenadeshop")
}

public 
grenadeshop(id)
{
    if(
is_user_alive(id))
    {
        new 
ShopMenu menu_create("Nades Shop""shop_handler")
        
menu_additem(ShopMenu"Blast Nades (500$)""1"id)
        
menu_additem(ShopMenu"Fire Nades (750$)""2"id)
        
menu_additem(ShopMenu"Frost Nades (500$)""3"id)
        
menu_setprop(ShopMenuMPROP_EXITMEXIT_ALL);
        
menu_setprop(ShopMenuMPROP_NUMBER_COLOR"\y");
        
menu_display(idShopMenu0)
    }
    return 
PLUGIN_CONTINUE
}

public 
shop_handler(idShopMenuitem)
{
    new 
money cs_get_user_money(id)
    switch(
item)
    {
        case 
0:
        {
            if(
money >= 500)
            {
                new 
setmoney money 500
                cs_set_user_money
(idclamp(setmoney050000))
                
give_item(id"weapon_hegrenade")
                
client_print(idprint_chat"You have Blast Nade")
            }
            else 
client_print(idprint_chat"You Dont Have Now Money")
        }
        case 
1:
        {
            if(
money >= 750)
            {
                new 
setmoney money 750
                cs_set_user_money
(idclamp(setmoney050000))
                
give_item(id"weapon_flashbang")
                
client_print(idprint_chat"You have Fire Nade")
            }
            else 
client_print(idprint_chat"You Dont Have Now Money")
        }
        case 
2:
        {
            if(
money >= 500)
            {
                new 
setmoney money 500
                cs_set_user_money
(idclamp(setmoney050000))
                
give_item(id"weapon_smokegrenade")
                
client_print(idprint_chat"You Have Frost Nade")
            }
            else 
client_print(idprint_chat"You Dont Have Now Money")
        }
    }

Thanks for using my code @ JailBreakShop but next time leave the #include <amxmodx> in it..
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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 14:21.


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