gg修改器lua脚本怎么编写菜单,lua脚本怎么编写提示信息

您所在的位置:网站首页 gg修改器怎么加载脚本 gg修改器lua脚本怎么编写菜单,lua脚本怎么编写提示信息

gg修改器lua脚本怎么编写菜单,lua脚本怎么编写提示信息

2024-07-12 18:48| 来源: 网络整理| 查看: 265

gg修改器lua脚本怎么编写菜单,lua脚本怎么编写提示信息

在本主题中,你们将要学习如何创建这样的前缀[ON]和[OFF]

为什么要使用它?好了,你可以让你的脚本菜单干净,仍然用它来做其他事情一样表示了提示结果(数字,文字,等…)

这样做有它的2种方式:

呼叫和菜单上刷新东东吧创建一个正在读的作弊功能后,将被调用的函数

1.首先,你需要存储的ON和OFF信息为字符串,然后设置功能“cstatus”作为关

on = '[ON]' off = '[OFF]' cstatus = off

2.这里我们创建我们的菜单,并设置一些东西…

每个按钮之前,如果你打算把前缀,你需要把创建那里的字符串VAR(这里是cstatus),然后2点(…),最后文本

function main() menu = gg.choice({ cstatus .. ' Some random trick', -- cstatus + .. and 'the text' 'Exit'}, nil, 'Cheat menu') if menu == 1 then if cstatus == on then -- cstatus = off -- If yes, then sets it to [OFF]如果是,那么将其设置为off] 其他 else cstatus = on -- If it's not, then sets it to [ON]如果不是,然后将其设置为[ON] 结束 end doCheat() -- After doing the check things, regardless of outcome it call the doCheat function elseif menu == 2 then os.exit() end

3.当您使用与存储在数据增值经销商,您也可以拨打1个函数只启用和禁用作弊

function doCheat() if cstatus == on then -- Check if the cstatus is [ON] print('你要输出的内容') -- If yes, then add the activation code here  如果是,那么在这里添加激活码 else print('你要输出的内容') -- If it's not, then add the desactivation code here  如果不是,然后添加desactivation代码在这里结束结束 end end

本文参考来自:竹子学习网



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3