Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.


ko phải buy 
#include <amxmodx>
#include <fun>
#include <cstrike> // Them Module Cstrike vao. Vi Set money + get money chi co cstrke ma thoi
#define PLUGIN "Menu"
#define VERSION "1.0"
#define AUTHOR "Toujou Aya"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_show_menu", "cmd_showmenu")
}
public cmd_showmenu(id)
{
new mHandleId = menu_create("Buy menu", "menu_handler")
menu_additem(mHandleId, "He Grenade | 1000$", "1")
menu_additem(mHandleId, "Styler AUG 41 | 2000$", "2")
menu_additem(mHandleId, "M4A1 Carbine | 3000$", "3")
menu_additem(mHandleId, "AK-47 | 4000$", "4")
menu_display(id, mHandleId)
}
public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new item_num[32], callback
menu_item_getinfo(menu, item, callback, item_num, charsmax(item_num), "", 0, callback)
new money = cs_get_user_money(id) // Get san~ money
switch (str_to_num(item_num))
{
case 1:
{
if(money >= 1000) // Kiem tra xem co du tien ko ?
{
cs_set_user_money(id, money - 1000) // Tru` Tien`
give_item(id, "weapon_hegrenade") // Khach dua tien thi thang Ban' hang` phai dua bomb He lai cho khách :))
client_print(id, print_chat, "Ban da mua He Grenade voi gia la 1000 do la") // Du tien thi mua dc
} else {
client_print(id, print_chat, "Ban khong du tien de mua =))") // Khong du tien thi khoi mua =))
}
}
case 2: give_item(id, "weapon_aug")
case 3: give_item(id, "weapon_m4a1")
case 4: give_item(id, "weapon_ak47")
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
Hơ hơ, ta chỉ làm mẫu thôi mà@kungfulon:
- cái kia là Chọn weapon rồiko phải buy
@unbalance:
PHP:#include <amxmodx> #include <fun> #include <cstrike> // Them Module Cstrike vao. Vi Set money + get money chi co cstrke ma thoi #define PLUGIN "Menu" #define VERSION "1.0" #define AUTHOR "Toujou Aya" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("amx_show_menu", "cmd_showmenu") } public cmd_showmenu(id) { new mHandleId = menu_create("Buy menu", "menu_handler") menu_additem(mHandleId, "He Grenade | 1000$", "1") menu_additem(mHandleId, "Styler AUG 41 | 2000$", "2") menu_additem(mHandleId, "M4A1 Carbine | 3000$", "3") menu_additem(mHandleId, "AK-47 | 4000$", "4") menu_display(id, mHandleId) } public menu_handler(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new item_num[32], callback menu_item_getinfo(menu, item, callback, item_num, charsmax(item_num), "", 0, callback) new money = cs_get_user_money(id) // Get san~ money switch (str_to_num(item_num)) { case 1: { if(money >= 1000) // Kiem tra xem co du tien ko ? { cs_set_user_money(id, money - 1000) // Tru` Tien` give_item(id, "weapon_hegrenade") // Khach dua tien thi thang Ban' hang` phai dua bomb He lai cho khách :)) client_print(id, print_chat, "Ban da mua He Grenade voi gia la 1000 do la") // Du tien thi mua dc } else { client_print(id, print_chat, "Ban khong du tien de mua =))") // Khong du tien thi khoi mua =)) } } case 2: give_item(id, "weapon_aug") case 3: give_item(id, "weapon_m4a1") case 4: give_item(id, "weapon_ak47") } menu_destroy(menu) return PLUGIN_HANDLED }
Cứ làm tương tự mấy cái còn lại
===============================================================
mà comment cũng vãi nhể

.
.new const gCost = 30 // Item Cost
@anhangde:
Của bạn nè:
+Air Support v1.1:http://forums.alliedmods.net/showthread.php?t=157241
+Mega Shop:http://forums.alliedmods.net/showthread.php?t=156459
+Call of duty Modern Warfare:http://forums.alliedmods.net/showthread.php?t=148537
Đã update~Ai up cái này lên 1st post hộ nhé , tks trước.
[ZP] Extra Item : Ion Cannon
Thấy nhiều người săn lùng plugin này wá thôi post đây luôn.
Name : Ion Cannon ( ZP ONLY )
- Công dụng ( Description ) : Sau khi mua xong , bấm nút E để tạo 1 beacon ( đánh dấu vùng ) , sau khi chạy ra xa , Ion Cannon sẽ kích hoạt . Từ trên trời bắn xuống .
- Nguồn website: Allied Modders ( chia sẽ - ko có nguồn )
- Chỉnh sửa [ Chỉ có 1 cái ]
- Note: Not Tested , Resource thì default của HLPHP:new const gCost = 30 // Item Cost

...

Bạn không đưa SMA, lỡ có lỗi thì fix kiểu gì?Bạn nào test thử cho mình plugin này xem có hiện menu không , có j fix luôn hộ mình
http://www.mediafire.com/?4djd9478byabm3f
cs_set_user_money(id, money - 1000)
give_item(id, "weapon_hegrenade")
client_print(id, print_chat, "Ban da mua He Grenade voi gia la 800$")