Documentation
  • INFORMATION
    • Discord Community
    • Common Errors
  • ASSETS
    • nPhone
      • Installation
      • Exports
      • Custom Apps
        • Resource Creation
        • SDK Functions
    • nv_SafeZone
      • Installation
      • Usage
    • nv_DjDesk
      • Installation
      • Creating new stages
    • nv_Scoreboard
Powered by GitBook
On this page
  • Template using Exports
  • Client Exports
  • Set phone display
  • Get phone display
  • Get phone availability
  • Set phone availability
  • Show notification
  • Set flashlight status
  • Get flashlight status
  • Server Exports
  • Set verified status
  • Get verified status
  • Set account password
  • Get app post
  • Remove app post
  • Reset phone
  • Get source from number
  • Show notification
  • Get phone PIN
  • Get source account
  • Send email
  • Get phone call
  • End phone call
  • Is in call
  • Server Events
  • Message event
  1. ASSETS
  2. nPhone

Exports

On this page, you will find the exports that nPhone has available.

PreviousInstallationNextCustom Apps

Last updated 7 months ago

Template using Exports

Client Exports

Set phone display

This export will change the phone display status, it can be true or false:

-- status: bool

exports["nPhone"]:SetPhoneDisplayStatus(status)

Get phone display

This export will get the current phone display status, it can return true or false:

local displayStatus = exports["nPhone"]:GetPhoneStatus()

Get phone availability

This export will get the current phone availability status, it can return true or false:

local availabilityStatus = exports["nPhone"]:GetPhoneAvailability()

Set phone availability

This export will change the availability of the current phone:

-- status: bool

exports["nPhone"]:SetPhoneAvailability(status)

Show notification

This export will show a notification to the player if the player owns a phone:

-- title: string
-- text: string
-- time: number
-- img: string
-- sound: string

exports["nPhone"]:ShowNotification(title, text, time, img, sound)

Set flashlight status

This export will change the status of the flashlight, if the player owns a phone:

-- status: bool

exports["nPhone"]:SetFlashlightStatus(status)

Get flashlight status

This export will get the current flashlight status, it can return true or false:

-- status: bool

local flashlightStatus = exports["nPhone"]:GetFlashlightStatus(status)

Server Exports

Set verified status

This export will change the verified status of the user in the app selected:

-- appName: string
-- username: string
-- status: bool

-- Available apps: y

exports["nPhone"]:SetVerifiedStatus(appName, username, status)

Get verified status

This export will get the verified status of the user in the app selected:

-- appName: string
-- username: string
-- cb: function

-- Available apps: y

exports["nPhone"]:GetVerifiedStatus(appName, username, function(status)
    print(status)
end)

Set account password

This export will change the account password of the user in the app selected:

-- appName: string
-- username: string
-- newPassword: string

-- Available apps: nCloud

exports["nPhone"]:ChangeAccountPassword(appName, username, newPassword)

Get app post

This export will get the post content in the app selected:

-- appName: string
-- username: string
-- cb: function

-- Available apps: y, mail

exports["nPhone"]:GetAppPost(appName, postId, function(content)
    print(json.decode(content))
end)

Remove app post

This export will remove the post in the app selected:

-- appName: string
-- postId: string

-- Available apps: y, mail

exports["nPhone"]:RemoveAppPost(appName, postId)

Reset phone

This export will reset the selected phone:

-- phoneId: string

exports["nPhone"]:ResetSmartphone(phoneId)

Get source from number

This export will get the source from a phone number:

-- phoneNumber: string

local sourceNumber = exports["nPhone"]:GetSourceFromNumber(phoneNumber)

Show notification

This export will show a notification to the player if the player owns a phone:

-- source: number
-- title: string
-- text: string
-- time: number
-- img: string
-- sound: string

exports["nPhone"]:ShowNotification(source, title, text, time, icon, sound)

Get phone PIN

This export will get the passcode of a phone:

-- phoneId: string
-- cb: function

exports["nPhone"]:GetPasscodeFromPhoneId(phoneId, function(passcode)
    print(passcode)
end)

Get source account

This export will get the current player linked account:

-- source: number

local sourceAccount = exports["nPhone"]:GetSourceCurrentAccount(source)

Send email

This export will send an email to an account:

-- from: string
-- subject: string
-- content: string
-- profileImg: string
-- to: string

exports["nPhone"]:SendEmail(from, subject, content, profileImg, to)

Get phone call

This export will get the current phone call identifier:

-- phoneNumber: string

local callId = exports["nPhone"]:GetCall(phoneNumber)

End phone call

This export will end the call:

-- callId: string

exports["nPhone"]:EndCall(callId)

Is in call

This export will get the phone call status:

-- phoneNumber: string

local callStatus = exports["nPhone"]:IsInCall(phoneNumber)

Server Events

Message event

It will be triggered when a text message is sent:

RegisterNetEvent('nPhone:messageTrigger', function(chat, phone, message, messageId, attachments)
    print(chat, phone, message, messageId, attachments)
end)
GitHub - Geloteee/nPhone-test: This is how to use nPhone exports.GitHub
Logo