CitizenFXLua is a Lua CitizenFX / FiveM emulator for MTA:SA. This project provides a compatibility layer that allows CitizenFX Lua scripts to run inside Multi Theft Auto: San Andreas (MTA:SA). The goal is to recreate the CitizenFX Lua runtime and API so FiveM scripts can be tested or ported more easily to MTA.
CitizenFXLua emulates core parts of the CitizenFX Lua runtime:
- Citizen threads
- Wait system (only for threads rn)
- TriggerEvent system with callback ( Serverside & Clientside )
a = 0
Citizen.CreateThread(function()
while true do
a = a + 1
print(a)
Wait(0) -- This is mandatory and must be.
end
end)RegisterNetEvent("test",function(cb,data)
cb("OK "..data)
end)TriggerNetEvent("test",function(r)
print(r,"FROM SERVER")
end,"Hello")- Thread & Runtime
- Event system
- Exports system
- NuiManager
- Lua & JS Bridge
- Promise & Async System
- Full Citizen API
Pull requests are welcome. Guidelines:
- Keep compatibility with MTA
- Follow CitizenFX behavior
MIT License