feat: NDCore 1 backwards compatibility

This commit is contained in:
Andyyy7666
2023-08-23 00:34:41 +02:00
parent 1652dc4b5c
commit 3ec20ea087
2 changed files with 276 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
NDCore.Functions = {}
NDCore.Functions.GetSelectedCharacter = NDCore.getPlayer
NDCore.Functions.GetCharacters = NDCore.getCharacters
NDCore.Functions.GetPlayersFromCoords = NDCore.getPlayersFromCoords
exports("GetCoreObject", function()
return NDCore
end)
RegisterNetEvent("ND:returnCharacters", function(characters)
NDCore.characters = characters
end)
RegisterNetEvent("ND:setCharacter", function(character)
NDCore.player = character
end)