feat(Phone.GetPhoneName)
This commit is contained in:
1 parent
9a4ab4cdd5
commit
a4988fb7e3
10 files changed
+103
-30
No files matched your search
@@ -1,3 +1,4 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
---@class NewEmail
|
||||
---@field sender string
|
||||
---@field recipients string[]
|
||||
@@ -17,21 +18,25 @@ local resourceName = "okokPhone"
|
||||
if GetResourceState(resourceName) == 'missing' then return end
|
||||
Phone = Phone or {}
|
||||
|
||||
---comment
|
||||
---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.
|
||||
---@param src number
|
||||
---@return number| boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
---@return number|boolean
|
||||
Phone.GetPlayerPhone = function(src)
|
||||
return exports.okokPhone:getPhoneNumberFromSource(src) or false
|
||||
end
|
||||
|
||||
---comment
|
||||
---This will send an email to the passed source, email address, title and message.
|
||||
---@param src number
|
||||
---@param email string
|
||||
---@param title string
|
||||
---@param message string
|
||||
---@return boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
Phone.SendEmail = function(src, email, title, message)
|
||||
local senderAddress = exports.okokPhone:getEmailAddressFromSource(src) --[[ @as string? ]]
|
||||
if not senderAddress then return false end
|
||||
|
||||
Reference in new issue
Block a user