'Writen .lua to normal .lua [closed]
This is in FiveM and I dont know how to write this to 'normal' lua.
This is the code:
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
Solution 1:[1]
This is in FiveM and I dont know how to write this to 'normal' lua
This code uses the FiveM API.
You cannot do this in Lua alone. There is no replacement for LumiaM.Mfunc.KeyboardInput
for example.
You could replace a few things with Lua but that wouldn't actually make sense. What should be the outcome of replacing code for a game without the game?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Piglet |