Feat(client): Adding contacts | simple stuff

This commit is contained in:
chip committed 2020-09-07 18:39:00 +02:00
1 parent 39e6c5be2c
commit 2335d2e6df
2 files changed
+15 -10

No files matched your search

+8 -1
View File
@@ -18,4 +18,11 @@ AddEventHandler('phone:sendContacts', function()
}
)
end)
end)
end)
RegisterNUICallback('contacts:add', function(data)
local display = data.name
local number = data.number
TriggerServerEvent('phone:addContacts', display, number)
TriggerEvent('phone:sendContacts')
end)
+7 -9
View File
@@ -8,15 +8,13 @@ Citizen.CreateThread(function()
end)
RegisterCommand('phone:close', function(source, args, rawCommand)
SendNUIMessage( -- Hides phone
{
app = 'PHONE',
method = 'setVisibility',
data = false
}
)
SetNuiFocus(false, false)
end)
SendNUIMessage({
app = 'PHONE',
method = 'setVisibility',
data = false
})
SetNuiFocus(false, false)
end, false)
-----
--END OF ESX
-----