- | Afiseaza codul
#include <amxmodx> #include <cstrike> #include <fun> #include <fakemeta> #include <hamsandwich> #define PLUGIN "Furien V.I.P Knives" #define VERSION "1.0" #define AUTHOR "dRaGoNeLy" #define ADMIN_VIP ADMIN_LEVEL_H #define IsPlayer(%0) (1 <= %0 <= MaxPlayers) new const szTag[] = "[AMXX]"; new const szContact[] = "[email protected]"; new const Model1[66] = "models/furien/v_dual_katana.mdl"; new const Model2[66] = "models/furien/v_axe.mdl"; new const Model3[66] = "models/furien/v_daedric.mdl"; new bool:DualKatana[32]; new bool:Axe[32]; new bool:Daedric[32]; new MaxPlayers; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); RegisterHam(Ham_TakeDamage, "player", "ClCmdDamage") register_event("CurWeapon", "ClCmdModels", "be", "1=1") register_clcmd("say /vipshop", "ClCmdKnivesTest") MaxPlayers = get_maxplayers() } public plugin_precache() { precache_model(Model1) precache_model(Model2) precache_model(Model3) } public client_putinserver(id) { DualKatana[id] = false; Axe[id] = false; Daedric[id] = false; } public client_disconnect(id) { DualKatana[id] = false; Axe[id] = false; Daedric[id] = false; } public ClCmdModels(id) { if(get_user_weapon(id) == CSW_KNIFE && DualKatana[id]) { set_pev(id, pev_viewmodel2, Model1) } if(get_user_weapon(id) == CSW_KNIFE && Axe[id]) { set_pev(id, pev_viewmodel2, Model2) } if(get_user_weapon(id) == CSW_KNIFE && Daedric[id]) { set_pev(id, pev_viewmodel2, Model3) } } public ClCmdDamage(iVictim, iInflictor, iAttacker, Float:fDamage) { if(iInflictor == iAttacker && DualKatana[iAttacker] || Axe[iAttacker] || Daedric[iAttacker] && IsPlayer(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE) { SetHamParamFloat(4, fDamage * 2.0) return HAM_HANDLED; } return HAM_IGNORED; } public ClCmdKnivesTest(id) { if(get_user_flags(id) & ADMIN_VIP) { if(get_user_team(id) == 1 && is_user_alive(id)) { ClCmdKnives(id) } else { client_print(id, print_chat, "%s Nu ai acces pentru a accesa meniul!", szTag); } } else { client_print(id, print_chat, "%s Doar V.I.P poate accesa meniul! Contact Y!M: %s", szTag, szContact); } return 1; } public ClCmdKnives(id) { new szMenu = menu_create("\yFurien \rV.I.P \wKnives", "ClCmdKnives2") menu_additem(szMenu, "Dual Katana \y[ \r2X Damage \y] \w- \y16000$", "1") menu_additem(szMenu, "Axe \y[ \r2X Damage \y] \w- \y16000$", "2") menu_additem(szMenu, "Daedric \y[ \r2X Damage \y] \w- \y16000$", "3") menu_setprop(szMenu, MPROP_EXITNAME, "Exit Menu") menu_display(id, szMenu, 0) return 1; } public ClCmdKnives2(id, szMenu, item) { if(item == MENU_EXIT) { menu_destroy(szMenu); return 1; } new money = cs_get_user_money(id); switch(item) { case 0: { if(money < 16000) { client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag) } else { give_item(id, "weapon_knife") DualKatana[id] = true; Axe[id] = false; Daedric[id] = false; ClCmdModels(id) client_print(id, print_chat, "%s Ti-ai cumparat un Dual Katana!", szTag); cs_set_user_money(id, money - 16000); } } case 1: { if(money < 16000) { client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag) } else { give_item(id, "weapon_knife") DualKatana[id] = false; Axe[id] = true; Daedric[id] = false; ClCmdModels(id) client_print(id, print_chat, "%s Ti-ai cumparat un Axe!", szTag); cs_set_user_money(id, money - 16000); } } case 2: { if(money < 16000) { client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag) } else { give_item(id, "weapon_knife") DualKatana[id] = false; Axe[id] = false; Daedric[id] = true; ClCmdModels(id) client_print(id, print_chat, "%s Ti-ai cumparat un Daedric!", szTag); cs_set_user_money(id, money - 16000); } } } menu_destroy(szMenu); return 1; }
-daca mor ramane sk-ul
daca pierd runda la t ramane sk-ul la ct