mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 06:16:02 +01:00
Added fivem appearance
This commit is contained in:
@@ -77,7 +77,11 @@ end)
|
||||
-- Remove player from NDCore.Players table when they leave.
|
||||
AddEventHandler("playerDropped", function()
|
||||
local player = source
|
||||
NDCore.Players[player] = nil
|
||||
local character = NDCore.Players[player]
|
||||
if character then
|
||||
NDCore.Functions.UpdateLastLocation(character.id, character.lastLocation)
|
||||
end
|
||||
character = nil
|
||||
end)
|
||||
|
||||
-- Update the characters clothes.
|
||||
|
||||
@@ -7,4 +7,17 @@ NDCore.Config = config
|
||||
|
||||
function GetCoreObject()
|
||||
return NDCore
|
||||
end
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
Wait(30000)
|
||||
for player, playerInfo in pairs(NDCore.Players) do
|
||||
local ped = GetPlayerPed(player)
|
||||
if DoesEntityExist(ped) then
|
||||
local lastLocation = GetEntityCoords(ped)
|
||||
playerInfo.lastLocation = {x = lastLocation.x, y = lastLocation.y, z = lastLocation.z}
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user