找回密码
 注册/Sign up
搜索
查看: 760|回复: 3

这个高速移动要怎么弄成25.9j版本能用的

[复制链接]

发表于 2025-10-28 15:32:40 | 显示全部楼层 |阅读模式
不喜欢带装备实现高速移动,还是更喜欢内挂直接实现,以前让人帮我写过一个,要怎么在新版本用,最好能弄到念小白cg的功能按钮上。

  1. function commandsNormal.speedup(charIndex, args)
  2.   local command = args[1]
  3.   if(command =='on') then
  4.     local charPtr = Char.GetCharPointer(charIndex)
  5.     ffi.setMemoryInt32(charPtr + 0x5e8 + 0x188 + 0x18, speedRate);   --walkSpeed
  6.     NLG.UpChar(charIndex)
  7.   elseif command=='off' then
  8.     local charPtr = Char.GetCharPointer(charIndex)
  9.     ffi.setMemoryInt32(charPtr + 0x5e8 + 0x188 + 0x18, 100);   --walkSpeed
  10.     NLG.UpChar(charIndex)
  11.   end
  12. end
复制代码

ng.rar

3.3 KB, 下载次数: 17

 楼主| 发表于 2025-10-28 16:55:23 | 显示全部楼层
大佬发我了

  1.         if msg == '/gsyd' or msg == "、gsyd" then--高速移动
  2.                 local isGsyd = tonumber(Field.Get(player,"加速走路"))
  3.                 if isGsyd == 0 then
  4.                         NLG.SystemMessage(player,'开启高速移动')
  5.                         Char.SetData(player,CONST.对象_移速,300)
  6.                         Field.Set(player,"加速走路",1)
  7.                         NLG.UpChar(player)
  8.                 else
  9.                         NLG.SystemMessage(player,'结束高速移动')
  10.                         Char.SetData(player,CONST.对象_移速,100)
  11.                         Field.Set(player,"加速走路",0)
  12.                         NLG.UpChar(player)
  13.                 end
  14.                 return 0
  15.         end
复制代码

发表于 2025-11-6 13:48:02 | 显示全部楼层
请问,如果组队的话,是只需要队长开吗?还是要5个人都开启?

 楼主| 发表于 2025-11-6 17:12:55 | 显示全部楼层
stargazer 发表于 2025-11-6 13:48
请问,如果组队的话,是只需要队长开吗?还是要5个人都开启?

队长开就行吧
您需要登录后才可以回帖 登录 | 注册/Sign up

本版积分规则

手机版|cgmsv引擎论坛

GMT+8, 2026-6-5 03:16 , Processed in 0.033408 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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