Translate JS code to LUA


#1

Hey guys, i have little problem with translate JS code to LUA, can someone help me ?
Here is original code in JS: https://pastebin.com/mN9gQGJt
Here is my try to translate to LUA: https://pastebin.com/F6TMsbqL
Its not working dunno why :confused:


#2

I mean I don’t have time to go line by line translating. But I would suggest you go function by function testing each, one by one. It’ll probably work out well for. I’m not aware of a program that does this. Maybe look around for that.

If you have any error messages do show us though.


#3

:face_vomiting: :face_vomiting:


#4

I tried but its still not working. Any ideas ?


#5
ESX                           = nil
Citizen.CreateThread(function()
    while ESX == nil do
        TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
        Citizen.Wait(0)
    end
end)

Why… Why doe?!


#6

Gonna need this later in this plugin.