问题描述
这是在 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 替换一些东西,但这实际上没有意义。为没有游戏的游戏替换代码的结果应该是什么?