Comment on page
🛠
Events & Exports
Documentaton for all exports provided by the resource.
isOpen (client)
-- Check whether the phone is open or not.
if exports["icy-phone"]:isOpen() then
-- phone is open
end
open (client)
-- Open the phone
exports["icy-phone"]:open()
close (client)
-- Close the phone
exports["icy-phone"]:close()
callHangup (client)
-- Hangup an incoming call
exports["icy-phone"]:callHangup()
callAnswer (client)
-- Answer an incoming call
exports["icy-phone"]:callAnswer()
createEmail (server)
-- Create a new email for a specified identifier
-- identifier: Players identifier - e.g. citizenid, ESX identifier
-- subject: Mail title / subject
-- body: Mail message / content
-- sender: name & image of the sender, if the image is nil it will use the default
-- actions: Include as many actions as you want, examples below.
exports["icy-phone"]:createEmail('IDENTIFIER_HERE', 'Subject', 'Body content', {
name = 'Sender',
image = nil
}, {
{
type = 'image',
url = 'image url here'
},
{
type = 'gps',
label = 'Set Location',
coordinates = {x = 0.0, y = 0.0, z = 0.0}
},
{
type = 'button',
label = 'Button',
event = 'event name',
eventParameters = 'parameters here'
}
})
addCrypto (server)
-- Give an identifier an amount of crypto
exports["icy-phone"]:addCrypto('IDENTIFIER_HERE', 'bitcoin', 5)
removeCrypto (server)
-- Remove crypto from an identifier
exports["icy-phone"]:removeCrypto('IDENTIFIER_HERE', 'bitcoin', 5)
createHelpRequest (server)
-- src: number
-- job: string
-- message: string
exports["icy-phone"]:createHelpRequest(1, 'police', 'Help me')
deleteGroup (server)
-- groupId: string
exports["icy-phone"]:deleteGroup('groupId')
getGroupSize (server)
-- groupId: string
exports["icy-phone"]:getGroupSize('groupId')
getGroupById (server)
-- groupId: string
exports["icy-phone"]:getGroupById('groupId')
getGroupOwner (server)
-- groupId: string
exports["icy-phone"]:getGroupOwner('groupId')
sendGroupEvent (server)
-- groupId: string
-- event: string (client event)
-- parameters: any
exports["icy-phone"]:sendGroupEvent('groupId', 'event', { data = "test" })
isPlayerInGroup (server)
-- source: number
exports["icy-phone"]:isPlayerInGroup(1)
getGroupMembers (server)
-- groupId: string
exports["icy-phone"]:getGroupMembers('groupId')
getGroupPlayerIsIn (server)
-- source: number
exports["icy-phone"]:getGroupPlayerIsIn(1)

Group data structure
getSocietyBalance (server)
local balance = exports["icy-phone"]:getSocietyBalance('police')
setSocietyBalance
exports["icy-phone"]:setSocietyBalance('police', 100)
addSocietyBalance
exports["icy-phone"]:addSocietyBalance('police', 100)
removeSocietyBalance
exports["icy-phone"]:removeSocietyBalance('police', 100)
Create a new email (server)
-- Create a new email for a specified identifier
-- identifier: Players identifier - e.g. citizenid, ESX identifier
-- subject: Mail title / subject
-- body: Mail message / content
-- sender: name & image of the sender, if the image is nil it will use the default
-- actions: Include as many actions as you want, examples below.
TriggerServerEvent("icy-phone:server:CreateEmail", 'IDENTIFIER_HERE', 'Subject', 'Body content', {
name = 'Sender',
image = nil
}, {
{
type = 'image',
url = 'image url here'
},
{
type = 'gps',
label = 'Set Location',
coordinates = {x = 0.0, y = 0.0, z = 0.0}
},
{
type = 'button',
label = 'Button',
event = 'event name',
eventParameters = 'parameters here'
}
})
shareContact (client)
-- Share contact to nearby devices
TriggerEvent("icy-phone:client:shareContact")
createHelpRequest (server)
-- Send a help request to a job
-- job: string
-- message: string
TriggerServerEvent('icy-phone:server:createHelpRequest', 'police', 'Help me')
Last modified 6mo ago