Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <amxmisc>
- #include <fakemeta>
- public plugin_precache(){
- precache_model("models/HNSmodelsBySerMajor/v_knife.mdl")
- precache_model("models/HNSmodelsBySerMajor/p_knife.mdl")
- precache_model("models/HNSmodelsBySerMajor/v_hegrenade.mdl")
- precache_model("models/HNSmodelsBySerMajor/p_hegrenade.mdl")
- precache_model("models/HNSmodelsBySerMajor/v_flashbang.mdl")
- precache_model("models/HNSmodelsBySerMajor/p_flashbang.mdl")
- precache_model("models/HNSmodelsBySerMajor/v_smokegrenade.mdl")
- precache_model("models/HNSmodelsBySerMajor/p_smokegrenade.mdl")
- }
- public plugin_init() {
- register_plugin("HnsMdlMod", "1.0", "SerMajor")
- register_clcmd("say /hnsmdl", "MenuShow")
- }
- public MenuShow(id)
- {
- new menu = menu_create("Hns Model Menu By SerMajor", "MenuHandler") // הכותרת , MenuHandler בהמשך.
- menu_additem(menu, " Hns", "1", 0)
- menu_additem(menu, "Normal", "2", 0)
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, menu, 0)
- }
- public MenuHandler(id, menu, item)
- {
- if( item == MENU_EXIT )
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- new data[6], szName[33];
- new acces, callback;
- menu_item_getinfo(menu, item, acces, data,charsmax(data), szName,charsmax(szName), callback)
- new key = str_to_num(data);
- switch(key)
- {
- case 1: {
- if (read_data(2) == CSW_KNIFE){
- set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_knife.mdl")
- set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_knife.mdl")
- }
- if (read_data(2) == CSW_HEGRENADE){
- set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_hegrenade.mdl")
- set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_hegrenade.mdl")
- }
- if (read_data(2) == CSW_FLASHBANG){
- set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_flashbang.mdl")
- set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_flashbang.mdl")
- }
- if (read_data(2) == CSW_SMOKEGRENADE){
- set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_smokegrenade.mdl")
- set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_smokegrenade.mdl")
- }
- client_print(id, print_chat, "You Do The HNS Models!")
- }
- case 2: {
- if (read_data(2) == CSW_KNIFE){
- set_pev(id, pev_viewmodel2, "models/v_knife.mdl")
- set_pev(id, pev_weaponmodel2, "models/p_knife.mdl")
- }
- if (read_data(2) == CSW_HEGRENADE){
- set_pev(id, pev_viewmodel2, "models/v_hegrenade.mdl")
- set_pev(id, pev_weaponmodel2, "models/p_hegrenade.mdl")
- }
- if (read_data(2) == CSW_FLASHBANG){
- set_pev(id, pev_viewmodel2, "models/v_flashbang.mdl")
- set_pev(id, pev_weaponmodel2, "models/p_flashbang.mdl")
- }
- if (read_data(2) == CSW_SMOKEGRENADE){
- set_pev(id, pev_viewmodel2, "models/v_smokegrenade.mdl")
- set_pev(id, pev_weaponmodel2, "models/p_smokegrenade.mdl")
- }
- client_print(id, print_chat, "You DO The Normal Models!")
- }
- }
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement