Can someone help me ?

Can someone update my plugin



Plugin 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(PLUGIN, VERSION, AUTHOR)



register_clcmd("say /shop", "grenadeshop")

}



public grenadeshop(id)

{

if(is_user_alive(id))

{

new ShopMenu = menu_create("Grenade Shop", "shop_handler")

menu_additem(ShopMenu, "HE 750$", "1", id)

menu_additem(ShopMenu, "FB 500$", "2", id)

menu_additem(ShopMenu, "SM 500$", "3", id)

menu_setprop(ShopMenu, MPROP_EXIT, MEXIT_ALL);

menu_display(id, ShopMenu, 0)

}

}



public shop_handler(id, ShopMenu, item)

{

new money = cs_get_user_money(id)

switch(item)

{

case 0:

{

if(money >= 750)

{

new setmoney = money - 750

cs_set_user_money(id, clamp(setmoney, 0, 50000))

give_item(id, "weapon_hegrenade")

client_print(id, print_chat, "You have earned an HE GRENADE!")

}

else client_print(id, print_chat, "You dont have enought money")

}

case 1:

{

if(money >= 500)

{

new setmoney = money - 500

cs_set_user_money(id, clamp(setmoney, 0, 50000))

give_item(id, "weapon_flashbang")

client_print(id, print_chat, "You have earned an FLASHBANG GRENADE!")

}

else client_print(id, print_chat, "You dont have enought money")

}

case 2:

{

if(money >= 500)

{

new setmoney = money - 500

cs_set_user_money(id, clamp(setmoney, 0, 50000))

give_item(id, "weapon_smokegrenade")

client_print(id, print_chat, "You have earned an SMOKE GRENADE!")

}

else client_print(id, print_chat, "You dont have enought money")

}

}

}





Orignal From: Can someone help me ?

No comments

Not a single link is allowed to submit in comment :o