Adjusted force config values to match the required values. Also removed unused config options. Swapped default logger to built-in
18 lines
819 B
Lua
18 lines
819 B
Lua
local resourceName = "qs-smartphone"
|
|
local configValue = BridgeSharedConfig.Phone
|
|
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
|
|
Phone = Phone or {}
|
|
|
|
---comment
|
|
---@param email string
|
|
---@param title string
|
|
---@param message string
|
|
---@return nil
|
|
---@diagnostic disable-next-line: duplicate-set-field
|
|
Phone.SendEmail = function(email, title, message)
|
|
return true, TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} })
|
|
end
|
|
|
|
RegisterNetEvent('community_bridge:Server:genericEmail', function(data)
|
|
TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = data.email, subject = data.title, message = data.message, button = {} })
|
|
end) |