Advertisement
Guest User

HnsMdlMod Problem

a guest
Jun 19th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.88 KB | None | 0 0
  1.    
  2.  
  3.     #include <amxmodx>
  4.     #include <cstrike>
  5.     #include <amxmisc>
  6.     #include <fakemeta>
  7.      
  8.     public plugin_precache(){
  9.         precache_model("models/HNSmodelsBySerMajor/v_knife.mdl")
  10.         precache_model("models/HNSmodelsBySerMajor/p_knife.mdl")
  11.         precache_model("models/HNSmodelsBySerMajor/v_hegrenade.mdl")
  12.         precache_model("models/HNSmodelsBySerMajor/p_hegrenade.mdl")
  13.         precache_model("models/HNSmodelsBySerMajor/v_flashbang.mdl")
  14.         precache_model("models/HNSmodelsBySerMajor/p_flashbang.mdl")
  15.         precache_model("models/HNSmodelsBySerMajor/v_smokegrenade.mdl")
  16.         precache_model("models/HNSmodelsBySerMajor/p_smokegrenade.mdl")
  17.     }
  18.      
  19.     public plugin_init() {
  20.         register_plugin("HnsMdlMod", "1.0", "SerMajor")
  21.         register_clcmd("say /hnsmdl", "MenuShow")
  22.     }
  23.      
  24.     public MenuShow(id)
  25.     {
  26.         new menu = menu_create("Hns Model Menu By SerMajor", "MenuHandler") // הכותרת , MenuHandler בהמשך.
  27.         menu_additem(menu, "        Hns", "1", 0)
  28.         menu_additem(menu, "Normal", "2", 0)
  29.        
  30.         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
  31.        
  32.         menu_display(id, menu, 0)
  33.     }
  34.      
  35.     public MenuHandler(id, menu, item)
  36.     {
  37.         if( item == MENU_EXIT )
  38.         {
  39.             menu_destroy(menu);
  40.             return PLUGIN_HANDLED;
  41.         }
  42.         new data[6], szName[33];
  43.         new acces, callback;
  44.         menu_item_getinfo(menu, item, acces, data,charsmax(data), szName,charsmax(szName), callback)
  45.         new key = str_to_num(data);
  46.         switch(key)
  47.         {
  48.             case 1: {
  49.             if (read_data(2) == CSW_KNIFE){
  50.                     set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_knife.mdl")
  51.                     set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_knife.mdl")
  52.             }
  53.            
  54.                     if (read_data(2) == CSW_HEGRENADE){
  55.                     set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_hegrenade.mdl")
  56.                     set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_hegrenade.mdl")
  57.             }
  58.          
  59.                     if (read_data(2) == CSW_FLASHBANG){
  60.                     set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_flashbang.mdl")
  61.                     set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_flashbang.mdl")
  62.             }
  63.          
  64.                             if (read_data(2) == CSW_SMOKEGRENADE){
  65.                     set_pev(id, pev_viewmodel2, "models/HNSmodelsBySerMajor/v_smokegrenade.mdl")
  66.                     set_pev(id, pev_weaponmodel2, "models/HNSmodelsBySerMajor/p_smokegrenade.mdl")
  67.             }
  68.      
  69.                 client_print(id, print_chat, "You Do The HNS Models!")
  70.             }
  71.             case 2: {
  72.             if (read_data(2) == CSW_KNIFE){
  73.                     set_pev(id, pev_viewmodel2, "models/v_knife.mdl")
  74.                     set_pev(id, pev_weaponmodel2, "models/p_knife.mdl")
  75.             }
  76.            
  77.                     if (read_data(2) == CSW_HEGRENADE){
  78.                     set_pev(id, pev_viewmodel2, "models/v_hegrenade.mdl")
  79.                     set_pev(id, pev_weaponmodel2, "models/p_hegrenade.mdl")
  80.             }
  81.          
  82.                     if (read_data(2) == CSW_FLASHBANG){
  83.                     set_pev(id, pev_viewmodel2, "models/v_flashbang.mdl")
  84.                     set_pev(id, pev_weaponmodel2, "models/p_flashbang.mdl")
  85.             }
  86.          
  87.                             if (read_data(2) == CSW_SMOKEGRENADE){
  88.                     set_pev(id, pev_viewmodel2, "models/v_smokegrenade.mdl")
  89.                     set_pev(id, pev_weaponmodel2, "models/p_smokegrenade.mdl")
  90.             }
  91.          
  92.                 client_print(id, print_chat, "You DO The Normal Models!")
  93.             }
  94.             }
  95.         menu_destroy(menu);
  96.         return PLUGIN_HANDLED;
  97.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement