2025-06-05 03:10:18 -04:00
|
|
|
---@diagnostic disable: duplicate-set-field
|
2025-03-04 22:33:30 -05:00
|
|
|
local resourceName = "qs-smartphone"
|
2025-05-18 23:45:37 -04:00
|
|
|
if GetResourceState(resourceName) == 'missing' then return end
|
2025-03-04 22:33:30 -05:00
|
|
|
Phone = Phone or {}
|
2025-01-10 16:36:20 -05:00
|
|
|
|
2025-06-05 03:10:18 -04:00
|
|
|
---This will get the name of the Phone system being being used.
|
|
|
|
|
---@return string
|
|
|
|
|
Phone.GetPhoneName = function()
|
|
|
|
|
return resourceName
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
---This will send an email to the passed email address with the title and message.
|
2025-03-03 01:37:29 -05:00
|
|
|
---@param email string
|
|
|
|
|
---@param title string
|
|
|
|
|
---@param message string
|
2025-06-05 03:10:18 -04:00
|
|
|
---@return boolean
|
2025-01-10 16:36:20 -05:00
|
|
|
Phone.SendEmail = function(email, title, message)
|
2025-04-28 10:31:14 -04:00
|
|
|
return true, TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} })
|
2025-01-10 16:36:20 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
RegisterNetEvent('community_bridge:Server:genericEmail', function(data)
|
|
|
|
|
TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = data.email, subject = data.title, message = data.message, button = {} })
|
2025-05-10 00:01:56 -04:00
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
return Phone
|