mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Feat(Client/Server): Fetching phone number | Some fixes in JS monkaS
This commit is contained in:
1 parent
5bdfaca89f
commit
e4c592d774
7 files changed
+106
-24
No files matched your search
@@ -0,0 +1,47 @@
|
||||
ESX = nil
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while ESX == nil do
|
||||
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
--RegisterCommand('phone:get', function(source, args, rawCommand)
|
||||
-- TriggerServerEvent('phone:server:getCredentials')
|
||||
--end, false)
|
||||
|
||||
RegisterCommand('phone:open', function(source, args, rawCommand)
|
||||
SendNUIMessage(
|
||||
{
|
||||
app = 'PHONE',
|
||||
method = 'setVisibility',
|
||||
data = true
|
||||
}
|
||||
)
|
||||
SetNuiFocus(true, true)
|
||||
end, false)
|
||||
|
||||
|
||||
RegisterCommand('phone:hide', function(source, args, rawCommand)
|
||||
SendNUIMessage(
|
||||
{
|
||||
app = 'PHONE',
|
||||
method = 'setVisibility',
|
||||
data = false
|
||||
}
|
||||
)
|
||||
SetNuiFocus(false, false)
|
||||
end, false)
|
||||
|
||||
RegisterNetEvent('phone:client:sendCredentials')
|
||||
AddEventHandler('phone:client:sendCredentials', function(number)
|
||||
print("My number is " .. number)
|
||||
SendNUIMessage(
|
||||
{
|
||||
app = "SIMCARD",
|
||||
method = "setNumber",
|
||||
data = number
|
||||
}
|
||||
)
|
||||
end)
|
||||
Reference in new issue
Block a user