搜索
楼主: 点通粉丝

CS1.5僵尸感染版技术难题求助-KK进来解决一下

[复制链接]
发表于 2011-3-13 09:33:07 | 显示全部楼层 来自 中国–内蒙古–巴彦淖尔
OP_O3_O4_O5.amxx   关掉了吗?
回复

使用道具 举报

发表于 2011-3-13 11:25:12 | 显示全部楼层 来自 中国–广东–东莞
花了我五点通币,发现没csdm这个头文件!:L
谁能发个上来,研究研究:lol
回复

使用道具 举报

 楼主| 发表于 2011-3-13 23:13:49 | 显示全部楼层 来自 中国–广东–广州
12# kk阿朗
大哥是不是这个???????????
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <csdm>
  4. #include <engine>
  5. #include <fakemeta>


  6. #define MAXMENUPOS 34

  7. new g_Aliases[MAXMENUPOS][] = {"usp","glock","deagle","p228","elites","fn57","m3","xm1014","mp5","tmp","p90","mac10","ump45","ak47","galil","famas","sg552","m4a1","aug","scout","awp","g3sg1","sg550","m249","vest","vesthelm","flash","hegren","sgren","defuser","nvgs","shield","primammo","secammo"}
  8. new g_Aliases2[MAXMENUPOS][] = {"km45","9x19mm","nighthawk","228compact","elites","fiveseven","12gauge","autoshotgun","smg","mp","c90","mac10","ump45","cv47","defender","clarion","krieg552","m4a1","bullpup","scout","magnum","d3au1","krieg550","m249","vest","vesthelm","flash","hegren","sgren","defuser","nvgs","shield","primammo","secammo"}



  9. public plugin_init()
  10. {
  11.         register_plugin("Zombie Vince drop","1.1.2","Vincent")

  12.         register_clcmd("buy", "generic_block")
  13.         register_clcmd("buyammo1", "generic_block")
  14.         register_clcmd("buyammo2", "generic_block")
  15.         register_clcmd("buyequip", "generic_block")
  16.         register_clcmd("cl_autobuy", "generic_block")
  17.         register_clcmd("cl_rebuy", "generic_block")
  18.         register_clcmd("cl_setautobuy", "generic_block")
  19.         register_clcmd("cl_setrebuy", "generic_block")

  20.         csdm_setstyle("preset")
  21.        
  22.         register_logevent("event_new_round", 2, "0=World triggered", "1=Round_Start")
  23. }



  24. public event_new_round()
  25. {
  26.         set_task(1.0 , "killhostage" , 5008)

  27. }







  28. ///////////////////////////////////////////////////////////////////////

  29. stock RemoveEntityAll(name[])
  30. {
  31.         new ent = engfunc(EngFunc_FindEntityByString, 0, "classname", name)
  32.         new temp
  33.         while (ent)
  34.         {
  35.                 temp = engfunc(EngFunc_FindEntityByString, ent, "classname", name)
  36.                 //engfunc(EngFunc_RemoveEntity, ent)
  37.                 set_pev(ent, pev_origin, Float:{8192.0,8192.0,8192.0})
  38.                 ent = temp
  39.         }
  40. }


  41. public killhostage()
  42. {
  43.         RemoveEntityAll("hostage_entity")
  44.         //RemoveEntityAll("trigger_camera")        //make a big mistake
  45.        
  46. }



  47. public generic_block(id, level, cid)
  48. {
  49.         return PLUGIN_HANDLED
  50. }


  51. public client_command(id)
  52. {
  53.         new arg[13]
  54.         if (read_argv(0, arg, 12) > 11)
  55.                 return PLUGIN_CONTINUE
  56.         new a = 0
  57.         do {
  58.                 if (equali(g_Aliases[a], arg) || equali(g_Aliases2[a], arg)) {
  59.                         return PLUGIN_HANDLED
  60.                 }
  61.         } while(++a < MAXMENUPOS)
  62.         return PLUGIN_CONTINUE
  63. }
复制代码
回复

使用道具 举报

发表于 2011-3-13 23:17:54 | 显示全部楼层 来自 中国–广东–东莞
是头文件,
  1. #include <csdm>
复制代码
去你的include文件里面找个叫csdm的文件发上来
回复

使用道具 举报

 楼主| 发表于 2011-3-13 23:18:23 | 显示全部楼层 来自 中国–广东–广州
13# 点通粉丝

突然有个想法不知可否实现
以下为出生送手雷闪光烟雾代码
不知可不可以加段判断代码上去.来适别.如果是僵尸的话.就不送呢?????????
  1. // Thank fysiks

  2. #include <amxmodx>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. #include <fun>

  6. #define PLUGIN_NAME "Free Equips"
  7. #define PLUGIN_VERSION "1.1"
  8. #define PLUGIN_AUTHOR "BBQ"

  9. #pragma semicolon 1

  10. new gEnableEquips;

  11. public plugin_init()
  12. {
  13.         register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
  14.         RegisterHam( Ham_Spawn, "player", "free_equips", 1 );
  15.         gEnableEquips = register_cvar( "free_equips", "1" );
  16. }

  17. public free_equips(id)
  18. {
  19.         if( is_user_alive( id ) && get_pcvar_num( gEnableEquips ) && get_user_flags(id) & ADMIN_USER )
  20.         {
  21.                 // Both Teams
  22.                 //give_item ( id,"weapon_knife");
  23.                 give_item ( id,"weapon_hegrenade");
  24.                 give_item ( id,"weapon_hegrenade");
  25.                 give_item ( id,"weapon_hegrenade");
  26.                 give_item ( id,"weapon_hegrenade");
  27.                 give_item ( id,"weapon_hegrenade");
  28.                 give_item ( id,"weapon_flashbang");
  29.                 give_item ( id,"weapon_flashbang");
  30.                 give_item ( id,"weapon_smokegrenade");               
  31.                 cs_set_user_nvg( id, 1);
  32.                 cs_set_user_armor ( id, 0, CsArmorType:2 );
  33.                
  34.                 switch( get_user_team(id) )
  35.                 {
  36.                         case 1:
  37.                         {
  38.                                 // Team 1
  39.                         }
  40.                         case 2:
  41.                         {
  42.                                 // Team 2
  43.                                 cs_set_user_defuse( id, 1, 0, 0, 205 );
  44.                         }
  45.                 }
  46.         }
  47. }
复制代码
回复

使用道具 举报

发表于 2011-4-14 11:48:26 | 显示全部楼层 来自 中国–河北–石家庄
我想到个想法 就是判断 变成僵尸后给僵尸加-1个手雷。。 不知道可以不?
回复

使用道具 举报

 楼主| 发表于 2011-4-14 23:24:03 | 显示全部楼层 来自 中国–广东–广州
是头文件,#include
去你的include文件里面找个叫csdm的文件发上来
kk阿朗 发表于 2011-3-13 23:17


这个文件吗
  1. /**
  2. * (C)2003-2005 David "BAILOPAN" Anderson
  3. * Counter-Strike Deathmatch (CSDM) 2.00 Module Includes
  4. */

  5. #if defined _csdm_included
  6.   #endinput
  7. #endif
  8. #define _csdm_included

  9. #pragma library csdm

  10. #define        CSDM_VERSION        "2.00"

  11. #define        CFG_READ                0                //Line is being read normally
  12. #define        CFG_RELOAD                1                //Section is being parsed from the start
  13. #define        CFG_DONE                2                //Section is done being parsed

  14. #define DEFAULT_ARMOR                100

  15. #define MAX_WEAPONS                 32
  16. #define MAX_SECONDARY                 8
  17. #define MAX_PRIMARY                 18

  18. stock ACTIVE_CVAR[] = "csdm_active"

  19. /************
  20. * FORWARDS *
  21. ************/

  22. //Called right before a death message is sent.  Return value has no effect.
  23. forward csdm_PreDeath(killer, victim, headshot, const weapon[]);

  24. //Called right after a death message is handled.  
  25. //return PLUGIN_HANDLED will block CSDM from doing any physical respawning.
  26. forward csdm_PostDeath(killer, victim, headshot, const weapon[]);

  27. //Called after a player is physically respawned,
  28. // but before the spawn handler is called.  Returning PLUGIN_HANDLED
  29. // will block CSDM from calling the set spawn handler.
  30. //Note! this will only be called if CSDM internally respawns or you use
  31. // csdm_respawn().
  32. forward csdm_PreSpawn(player, bool:fake);

  33. //Called after a player is physically respawned,
  34. // and after all spawn handling is completed.
  35. forward csdm_PostSpawn(player, bool:fake);

  36. //Called when the round is restarted
  37. forward csdm_RoundRestart();

  38. /***********
  39. * NATIVES *
  40. ***********/

  41. //To retrieve/set angles and v_angles, pass up to two more vectors
  42. native csdm_getpos(player, Float:origin[3], ...);

  43. native csdm_setpos(player, const Float:origin[3], ...);

  44. //Returns the number of registered spawn styles
  45. native csdm_spawnstyles();

  46. //Retrieves the name of a spawn style by index (indices start at 0)
  47. native csdm_styleinfo(style_index, name[], maxlength);

  48. //Adds a spawn style handler
  49. native csdm_addstyle(const name[], const function[]);

  50. //Sets the current spawn style handler by name.
  51. //The handler registered to this name will be called after every spawn.
  52. native csdm_setstyle(const name[]);

  53. //Returns the current style id
  54. native csdm_curstyle();

  55. //Respawns a player correctly under the CSDM spawn system.
  56. native csdm_respawn(player);

  57. //Forces a "fake" respawn on the player - sort of like a ResetHUD
  58. native csdm_fakespawn(player);

  59. //Registers a hook on the config reader
  60. //The forward looks like this:
  61. //forward my_cfg_reader(read_mode, const line[], const section[])
  62. native csdm_reg_cfg(const sectionName[], const handler[]);

  63. //Gives an item.  Same as give_item from fun.
  64. native csdm_give_item(player, const item_name[]);

  65. //Forces a player to drop a weapon
  66. native csdm_force_drop(player, const weapon[], remove=1);

  67. //Schedules a weapon for removal.  0 seconds means immediate
  68. //delay specifies whether it should wait 0.1 seconds or not (0 for immediate lookup)
  69. native csdm_remove_weapon(player, const weapon[], seconds, delay);


  70. //Reloads the config file
  71. native csdm_reload_cfg();

  72. //Returns whether CSDM is active
  73. native csdm_active();

  74. //returns cache information into each array slot
  75. // 0 - number of free items in spawn task cache
  76. // 1 - number of free task in general task cache
  77. // 2 - number of hot tasks (ones in use)
  78. // 3 - number of cached weapon removals in table
  79. // 4 - number of live weapon removals in table
  80. // 5 - number of weapon find tasks in cache
  81. // in general, 0+5+4 should about equal 1+2
  82. // do not edit the vers parameter.
  83. native csdm_cache(ar[6], vers=2)

  84. /**
  85. * Natives defined by csdm_main
  86. */

  87. //Returns the handle for the main CSDM menu, letting you modify it.
  88. native csdm_main_menu();

  89. /*** ************ ***
  90. *** HELPER STUFF
  91. ***/

  92. #define        SLOT_PRIMARY        1
  93. #define        SLOT_SECONDARY        2
  94. #define        SLOT_KNIFE                3
  95. #define        SLOT_GRENADE        4
  96. #define        SLOT_C4                        5

  97. #define        _TEAM_T                        1
  98. #define        _TEAM_CT                2

  99. //Weapon slot lookup table
  100. stock g_WeaponSlots[] = {
  101.                 0,
  102.                 2,        //CSW_P228
  103.                 0,
  104.                 1,        //CSW_SCOUT
  105.                 4,        //CSW_HEGRENADE
  106.                 1,        //CSW_XM1014
  107.                 5,        //CSW_C4
  108.                 1,        //CSW_MAC10
  109.                 1,        //CSW_AUG
  110.                 4,        //CSW_SMOKEGRENADE
  111.                 2,        //CSW_ELITE
  112.                 2,        //CSW_FIVESEVEN
  113.                 1,        //CSW_UMP45
  114.                 1,        //CSW_SG550
  115.                 1,        //CSW_GALIL
  116.                 1,        //CSW_FAMAS
  117.                 2,        //CSW_USP
  118.                 2,        //CSW_GLOCK18
  119.                 1,        //CSW_AWP
  120.                 1,        //CSW_MP5NAVY
  121.                 1,        //CSW_M249
  122.                 1,        //CSW_M3
  123.                 1,        //CSW_M4A1
  124.                 1,        //CSW_TMP
  125.                 1,        //CSW_G3SG1
  126.                 4,        //CSW_FLASHBANG
  127.                 2,        //CSW_DEAGLE
  128.                 1,        //CSW_SG552
  129.                 1,        //CSW_AK47
  130.                 3,        //CSW_KNIFE
  131.                 1        //CSW_P90
  132.         };
  133.        
  134. //Maximum backpack ammo lookup table
  135. stock g_MaxBPAmmo[] = {
  136.                 0,
  137.                 52,        //CSW_P228
  138.                 0,
  139.                 90,        //CSW_SCOUT
  140.                 1,        //CSW_HEGRENADE
  141.                 32,        //CSW_XM1014
  142.                 1,        //CSW_C4
  143.                 100,//CSW_MAC10
  144.                 90,        //CSW_AUG
  145.                 1,        //CSW_SMOKEGRENADE
  146.                 120,//CSW_ELITE
  147.                 100,//CSW_FIVESEVEN
  148.                 100,//CSW_UMP45
  149.                 90,        //CSW_SG550
  150.                 90,        //CSW_GALIL
  151.                 90,        //CSW_FAMAS
  152.                 100,//CSW_USP
  153.                 120,//CSW_GLOCK18
  154.                 30,        //CSW_AWP
  155.                 120,//CSW_MP5NAVY
  156.                 200,//CSW_M249
  157.                 21,        //CSW_M3
  158.                 90,        //CSW_M4A1
  159.                 120,//CSW_TMP
  160.                 90,        //CSW_G3SG1
  161.                 2,        //CSW_FLASHBANG
  162.                 35,        //CSW_DEAGLE
  163.                 90,        //CSW_SG552
  164.                 90,        //CSW_AK47
  165.                 0,        //CSW_KNIFE
  166.                 100//CSW_P90
  167.         };
  168.        
  169. stock getWepId(wp[])
  170. {
  171.         if (equali(wp, "weapon_p228")) {
  172.                 return CSW_P228
  173.         } else if (equali(wp, "weapon_scout")) {
  174.                 return CSW_SCOUT
  175.         } else if (equali(wp, "weapon_hegrenade")) {
  176.                 return CSW_HEGRENADE
  177.         } else if (equali(wp, "weapon_xm1014")) {
  178.                 return CSW_XM1014
  179.         } else if (equali(wp, "weapon_c4")) {
  180.                 return CSW_C4
  181.         } else if (equali(wp, "weapon_mac10")) {
  182.                 return CSW_MAC10
  183.         } else if (equali(wp, "weapon_aug")) {
  184.                 return CSW_AUG
  185.         } else if (equali(wp, "weapon_smokegrenade")) {
  186.                 return CSW_SMOKEGRENADE
  187.         } else if (equali(wp, "weapon_elite")) {
  188.                 return CSW_ELITE
  189.         } else if (equali(wp, "weapon_fiveseven")) {
  190.                 return CSW_FIVESEVEN
  191.         } else if (equali(wp, "weapon_ump45")) {
  192.                 return CSW_UMP45
  193.         } else if (equali(wp, "weapon_sg550")) {
  194.                 return CSW_SG550
  195.         } else if (equali(wp, "weapon_galil")) {
  196.                 return CSW_GALIL
  197.         } else if (equali(wp, "weapon_famas")) {
  198.                 return CSW_FAMAS
  199.         } else if (equali(wp, "weapon_usp")) {
  200.                 return CSW_USP
  201.         } else if (equali(wp, "weapon_glock18")) {
  202.                 return CSW_GLOCK18
  203.         } else if (equali(wp, "weapon_awp")) {
  204.                 return CSW_AWP
  205.         } else if (equali(wp, "weapon_mp5navy")) {
  206.                 return CSW_MP5NAVY
  207.         } else if (equali(wp, "weapon_m249")) {
  208.                 return CSW_M249
  209.         } else if (equali(wp, "weapon_m3")) {
  210.                 return CSW_M3
  211.         } else if (equali(wp, "weapon_m4a1")) {
  212.                 return CSW_M4A1
  213.         } else if (equali(wp, "weapon_tmp")) {
  214.                 return CSW_TMP
  215.         } else if (equali(wp, "weapon_g3sg1")) {
  216.                 return CSW_G3SG1
  217.         } else if (equali(wp, "weapon_flashbang")) {
  218.                 return CSW_FLASHBANG
  219.         } else if (equali(wp, "weapon_deagle")) {
  220.                 return CSW_DEAGLE
  221.         } else if (equali(wp, "weapon_sg552")) {
  222.                 return CSW_SG552
  223.         } else if (equali(wp, "weapon_ak47")) {
  224.                 return CSW_AK47
  225.         } else if (equali(wp, "weapon_knife")) {
  226.                 return CSW_KNIFE
  227.         } else if (equali(wp, "weapon_p90")) {
  228.                 return CSW_P90
  229.         }
  230.        
  231.         return 0
  232. }
复制代码
回复

使用道具 举报

发表于 2018-11-4 18:59:48 | 显示全部楼层 来自 中国–辽宁–鞍山
是大幅度释放奋斗速度
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表