public Vmmenu_handler( id, menu, item ) { new data[6], iName[64], access, callback; menu_item_getinfo(menu, item, access, data, charsmax(data), iName, charsmax(iName), callback); new key = str_to_num( data );
switch(key) { case 1: { Guns(id); } case 2: { Health(id); } case 3: { Specialweap(id); } case 4: { menu_destroy(menu); return PLUGIN_HANDLED; }
} menu_destroy(menu); return PLUGIN_HANDLED; }
public Guns(id) { new szText[555 char]; formatex(szText, charsmax(szText), "\rBagljas \w|\y VIPSHOP"); new menu = menu_create(szText, "Guns_handler"); new money = cs_get_user_money(id);
public Guns_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], iName[64], access, callback; menu_item_getinfo(menu, item, access, data, charsmax(data), iName, charsmax(iName), callback); new key = str_to_num(data); new money = cs_get_user_money(id);
switch(key) { case 1: { if(money < 8000) { client_print(id, print_chat, "You do not have enough money"); Guns(id); return PLUGIN_HANDLED; } else { give_item(id, "weapon_g3sg1"); cs_set_user_bpammo(id, CSW_G3SG1, 200); cs_set_user_money(id, money - 8000); VipUsed[id]++; client_print(id, print_chat, "You received G3SG1"); } } case 2: { if(money < 4500) { client_print(id, print_chat, "You do not have enough money"); Guns(id); return PLUGIN_HANDLED; } else { give_item(id, "weapon_m249"); cs_set_user_bpammo(id, CSW_M249, 200); cs_set_user_money(id, money - 4500); VipUsed[id]++; client_print(id, print_chat, "You received M249"); } } case 3: { if(money < 3000) { client_print(id, print_chat, "You do not have enough money"); Guns(id); return PLUGIN_HANDLED; } else { give_item(id, "weapon_m4a1"); cs_set_user_bpammo(id, CSW_M4A1, 90); cs_set_user_money(id, money - 8000); VipUsed[id]++; client_print(id, print_chat, "You received m4a1"); } } case 4: { if(money < 4000) { client_print(id, print_chat, "You do not have enough money"); Guns(id); return PLUGIN_HANDLED; } else { give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, CSW_AK47, 90); cs_set_user_money(id, money - 4500); VipUsed[id]++; client_print(id, print_chat, "You received ak47"); } } } menu_destroy(menu); return PLUGIN_HANDLED; }
public Specialweap(id) { new szText[555 char]; formatex(szText, charsmax(szText), "\rBagljas \w|\y VIPSHOP"); new menu = menu_create(szText, "Special_handler"); new money = cs_get_user_money(id);
public Special_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], iName[64], access, callback; menu_item_getinfo(menu, item, access, data, charsmax(data), iName, charsmax(iName), callback); new key = str_to_num(data); new money = cs_get_user_money(id); new name[32]; get_user_name(id, name, 31);
switch(key) { case 1: { if(money < 9000) { client_print(id, print_chat, "You do not have enough money"); Specialweap(id); return PLUGIN_HANDLED; } else { client_cmd(id, "say /akgoldvipmenu"); cs_set_user_money(id, money - 9000); VipUsed[id]++; client_print(id, print_chat, "You received AkGold"); } } case 2: { if(money < 9000) { client_print(id, print_chat, "You do not have enough money"); Specialweap(id); return PLUGIN_HANDLED; } else { client_cmd(id, "say /m4goldenvipmenu"); cs_set_user_money(id, money - 9000); VipUsed[id]++; client_print(id, print_chat, "You received M4Gold"); } } } menu_destroy(menu); return PLUGIN_HANDLED; }
public Health(id) { new szText[555 char]; formatex(szText, charsmax(szText), "\rBagljas \w|\y VIPSHOP"); new menu = menu_create(szText, "Health_handler"); new money = cs_get_user_money(id);
if (plrClip == 0 && get_pcvar_num(cvar_uclip)) { // If the user is out of ammo.. get_weaponname(plrWeapId, plrWeap, 31) // Get the name of their weapon give_item(id, plrWeap) engclient_cmd(id, plrWeap) engclient_cmd(id, plrWeap) engclient_cmd(id, plrWeap) } return PLUGIN_HANDLED }
public make_tracer(id) { if (get_pcvar_num(cvar_goldbullets)) { new clip,ammo new wpnid = get_user_weapon(id,clip,ammo) new pteam[16]
get_user_team(id, pteam, 15)
if ((bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id]) { new vec1[3], vec2[3] get_user_origin(id, vec1, 1) // origin; your camera point. get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
if (plrClip == 0 && get_pcvar_num(cvar_uclip)) { // If the user is out of ammo.. get_weaponname(plrWeapId, plrWeap, 31) // Get the name of their weapon give_item(id, plrWeap) engclient_cmd(id, plrWeap) engclient_cmd(id, plrWeap) engclient_cmd(id, plrWeap) } return PLUGIN_HANDLED }
public make_tracer(id) { if (get_pcvar_num(cvar_goldbullets)) { new clip,ammo new wpnid = get_user_weapon(id,clip,ammo) new pteam[16]
get_user_team(id, pteam, 15)
if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4[id]) { new vec1[3], vec2[3] get_user_origin(id, vec1, 1) // origin; your camera point. get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)