这是在 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