将 .lua 写入普通 .lua

问题描述

这是在 FiveM 中,我不知道如何将其写入“普通”lua。

这是代码

                            if LumiaM.Mfunc.Button('Give Yourself A Car (Specific)',5,trigy) then
                                local player_id = LumiaM.Mfunc.KeyboardInput('Players ID to Recive the Car','',100)
                                local vehicles = LumiaM.Mfunc.KeyboardInput('Vehicle Modle',100)
                                if LumiaN.natives.IsModelValid(vehicles) and LumiaN.natives.IsModelAVehicle(vehicles) then
                                    local plate = LumiaM.Mfunc.KeyboardInput('Vehicle Plate',8)
                                    LumiaF.func.TriggerCustomEvent(true,"vRP:MysqL_query","vRP/add_custom_vehicle",{user_id = player_id,vehicle = vehicles,vehicle_plate = plate,veh_type = "car"},2)
                                else
                                    print('Bad Model')
                                end
                            end
                            trigy = trigy + 20
                        end

解决方法

这是在 FiveM 中,我不知道如何将其写入“普通”lua

此代码使用 FiveM API。

你不能单独在 Lua 中做到这一点。例如,LumiaM.Mfunc.KeyboardInput 没有替代品。

你可以用 Lua 替换一些东西,但这实际上没有意义。为没有游戏的游戏替换代码的结果应该是什么?

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...