Files
community_bridge/modules/phone/gksphone/server.lua
T

35 lines
986 B
Lua
Raw Normal View History

2025-06-05 03:10:18 -04:00
---@diagnostic disable: duplicate-set-field
2025-03-04 22:33:30 -05:00
local resourceName = "gksphone"
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-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 get the phone number of the passed source.
2025-03-03 01:37:29 -05:00
---@param src number
2025-06-05 03:10:18 -04:00
---@return number|boolean
Phone.GetPlayerPhone = function(src)
return exports["gksphone"]:GetPhoneBySource(src) or false
end
2025-06-05 03:10:18 -04:00
---This will send an email to the passed source, email address, title and message.
2025-03-03 01:37:29 -05:00
---@param src number
---@param email string
---@param title string
---@param message string
---@return boolean
Phone.SendEmail = function(src, email, title, message)
local data = {}
data.sender = email
data.image = '/html/static/img/icons/mail.png'
data.subject = title
data.message = message
exports["gksphone"]:SendNewMail(src, data)
return true
end
return Phone