搜索
楼主: jiangwe5082

1.5如何让匪徒埋C4后停止回合时间?代码该如何写啊!求救

[复制链接]
 楼主| 发表于 2017-5-4 09:43:10 | 显示全部楼层 来自 辽宁丹东
本帖最后由 jiangwe5082 于 2017-5-4 11:06 编辑
jiangwe5082 发表于 2017-5-3 20:42
我运行后了 提示这个错误!哪点需要改进!
L 05/03/2017 - 20:38:45: Start of error session.
...



L 05/03/2017 - 20:38:45: [ORPHEU] Function "InstallGameRules" not found
L 05/03/2017 - 20:38:45: [AMXX] Displaying debug trace (plugin "Fix_RoundTimer.amxx")
L 05/03/2017 - 20:38:45: [AMXX] Run time error 10: native error (native "OrpheuGetFunction")
L 05/03/2017 - 20:38:45: [AMXX]    [0] Fix_RoundTimer.sma::plugin_precache (line 27)

按C4后提示
L 05/04/2017 - 11:01:38: [ORPHEU] Invalid memory structure "m_iRoundTimeSecs"
L 05/04/2017 - 11:01:38: [AMXX] Run time error 10 (plugin "Fix_RoundTimer.amxx") (native "OrpheuMemorySetAtAddress") - debug not enabled!
L 05/04/2017 - 11:01:38: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).



还是这个问题 你发的orpheu文件我也复制到amxmodx\configs目录下
modules.ini里orpheu设置了
modules文件夹也复制了orpheu_amxx.dll
哪地方出了问题啊 找不到原因了
回复

使用道具 举报

发表于 2017-5-4 15:53:10 | 显示全部楼层 来自 云南西双版纳州景洪
可能1.5用不了orpheu模块吧。我记得1.5连hamsandwich模块都用不了的。估计这个模块也用不了吧
回复

使用道具 举报

 楼主| 发表于 2017-5-5 10:37:10 | 显示全部楼层 来自 辽宁丹东
1.6 我也试过了 也不好用
public plugin_precache() OrpheuRegisterHook( OrpheuGetFunction( "InstallGameRules" ), "OnInstallGameRules", OrpheuHookPost ); 问题就在这行代码 不知道啥原因  
回复

使用道具 举报

 楼主| 发表于 2017-5-5 10:40:25 | 显示全部楼层 来自 辽宁丹东
jiangwe5082 发表于 2017-5-4 09:43
L 05/03/2017 - 20:38:45: [ORPHEU] Function "InstallGameRules" not found
L 05/03/2017 - 20:38:45:  ...


1.6 我也试过了 也不好用
public plugin_precache() OrpheuRegisterHook( OrpheuGetFunction( "InstallGameRules" ), "OnInstallGameRules", OrpheuHookPost ); 问题就在这行代码 不知道啥原因  
回复

使用道具 举报

 楼主| 发表于 2017-5-5 10:42:06 | 显示全部楼层 来自 辽宁丹东
zhangsheng 发表于 2017-5-4 15:53
可能1.5用不了orpheu模块吧。我记得1.5连hamsandwich模块都用不了的。估计这个模块也用不了吧 ...

1.6 我也试过了 也不好用
public plugin_precache() OrpheuRegisterHook( OrpheuGetFunction( "InstallGameRules" ), "OnInstallGameRules", OrpheuHookPost ); 问题就在这行代码 不知道啥原因  
回复

使用道具 举报

发表于 2017-5-5 19:25:57 | 显示全部楼层 来自 云南西双版纳州景洪
1.6根本不需要这种同步C4爆炸时间的插件。因为1.6从2004年版本更新以后就增加了放C4同步爆炸时间功能。不需要插件来同步,这个插件只是针对1.5开发的。至于1.5为什么不能使用,估计是1.5压根就不支持orpheu模块,毕竟这个orpheu模块是通过内存来修改的,1.5连hamsandwich这种模块都不支持。估计这个模块也用不了,你还是规规矩矩的写代码来设置下包以后回合时间锁定0开局恢复回合时间。
回复

使用道具 举报

发表于 2017-5-5 19:27:19 | 显示全部楼层 来自 云南西双版纳州景洪
你说的那个错误是注入内存错误,只有模块不支持才会提示。还有内存地址错误才会显示。
回复

使用道具 举报

 楼主| 发表于 2017-5-5 19:33:20 | 显示全部楼层 来自 辽宁丹东
zhangsheng 发表于 2017-5-5 19:25
1.6根本不需要这种同步C4爆炸时间的插件。因为1.6从2004年版本更新以后就增加了放C4同步爆炸时间功能。不需 ...

恩 谢谢了 这2天麻烦你了!!!
回复

使用道具 举报

发表于 2017-5-5 21:12:51 | 显示全部楼层 来自 云南西双版纳州景洪
  1. #include <amxmodx>

  2. public plugin_init()
  3. {
  4.         register_plugin("bomb planted round time", "1.0", "zhangsheng")
  5.         register_logevent("roundstart", 2, "0=World triggered", "1=Round_Start")
  6.         register_logevent("logevent_function_p", 3, "2=Planted_The_Bomb")
  7. }

  8. public roundstart()
  9. {
  10.         set_msg_block(get_user_msgid("RoundTime"), BLOCK_NOT)
  11. }

  12. public logevent_function_p()
  13. {
  14.         set_msg_block(get_user_msgid("RoundTime"), BLOCK_SET)
  15. }
复制代码
回复

使用道具 举报

发表于 2017-5-5 21:30:34 | 显示全部楼层 来自 云南西双版纳州景洪
对了你去amxmodx/configs/orpheu/memory/CGameRulesOffsets用记事本把CGameRulesOffsets打开然后找到这2段代码带有windows的value编码,由于这个文件使用的是1.6游戏的编码56和64这里需要改城1.5的value编码,具体是多少我不清楚因为我从2007年开始就没在接触过1.5这个需要你去问。
  1.         "name"        : "m_flRoundCount",
  2.         "type"        : "long",
  3.         "memoryType"  : "data",
  4.         "identifiers" :
  5.         [
  6.             {
  7.                 "os"    : "windows",
  8.                 "mod"   : "cstrike",
  9.                 "value" : 56
  10.             },
  11.             {
  12.                 "os"    : "linux",
  13.                 "mod"   : "cstrike",
  14.                 "value" : 48
  15.             }
  16.         ]
  17.     },
  18.     {
  19.         "name"        : "m_iRoundTimeSecs",
  20.         "type"        : "int",
  21.         "memoryType"  : "data",
  22.         "identifiers" :
  23.         [
  24.             {
  25.                 "os"    : "windows",
  26.                 "mod"   : "cstrike",
  27.                 "value" : 64
  28.             },
  29.             {
  30.                 "os"    : "linux",
  31.                 "mod"   : "cstrike",
  32.                 "value" : 56
复制代码
回复

使用道具 举报

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

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