pScripts
  • INFORMATION
    • FiveM Asset Escrow System
    • Assets Updates
    • Discord Roles
  • Assets & Guides
    • 🏛️Banking
      • 👋Installation Guide
      • ⚙️Editable Files
      • Client Exports
      • Server Exports
    • 👨‍⚖️DOJ Job
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 💻DOJ MDT
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 🌿Weed Plants
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 🚗Car Sale Job
      • 👋Installation Guide
      • ⚙️Config File
      • Client Exports
      • Server Exports
    • 📙Job Core
      • ⚙️Config File
      • Exports
    • 👮Police Job
      • 👋Installation Guide
      • ⚠️Common Issues
      • ⁉️Setup Server
      • ⚙️Config Files
      • Client Exports
        • Bodycam
        • Evidence System
        • Duty GPS
        • Interactions
        • Jail System
        • Police Objects
        • Speed Camera
        • Manage Traffic
        • Misc
      • Server Exports
        • Evidence System
        • Interactions
        • Jail System
        • Misc
    • 💻Police MDT
      • ⁉️Setup Server
      • ⚙️Config File
      • Client Exports
      • Server Exports
      • Dispatch System
    • 🚑Ambulance Job
      • 👋Installation Guide
      • ⁉️Setup Server
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 💻Ambulance MDT
      • 👋Installation Guide
      • ⚙️Config File
      • Exports and Events
      • Dispatch System
    • 🛠️Mechanic Job
      • ⚙️Config Files
      • Mileage System
      • Nitro System
      • Lifters System
      • Misc
    • 💻Mechanic MDT
      • ⚙️Config File
      • Exports
      • Dispatch System
      • Licenses System
    • 💵Fleeca Robbery
      • 👋Installation Guide
      • ⚙️Config File
    • ⌚Jewelry Robbery
      • 👋Installation Guide
      • ⚙️Config File
    • 💇Appearance
      • ⚙️Config Files
      • Client Exports
    • 👀Hints
      • Exports
    • 👋Helper
      • Exports
    • 🔧Tuning Menu
      • Exports and Events
      • ⚙️Config Files
    • 🆔Documents
      • ⚙️Config File
      • Exports and Events
    • 📱Phone
      • ⤵️INSTALLATION
      • ⚙️CONFIG FILES
      • 📃FEATURES
      • 📱APPS
      • 📇SIM CARDS
      • 📳NOTIFICATIONS
      • 📨MESSAGES
      • 🚘GARAGES
      • 🪙CRYPTO
      • 🔪DARK CONNECT
      • ⌨️FUNCTIONS
      • 🌎LANGUAGE
      • ⚠️COMMON ISSUES
    • 🪙Casino Games
      • 🎰Slot Machine
      • 🏐Roulette
      • ♣️Poker
    • 💻GCT
      • 📨EXPORTS
    • 💻Civil MDT
      • ⤵️INSTALLATION
      • 📱APPS
      • 🏎️BOOSTING
      • 🏅ACHIEVEMENTS
      • ⚠️COMMON ISSUES
Powered by GitBook
On this page
  1. Assets & Guides
  2. Phone

SIM CARDS

  1. Get player from number

  • number string

exports['piotreq_phone']:GetPlayerFromNumber(number)

Usage example

local xPlayer = exports['piotreq_phone']:GetPlayerFromNumber('piotreq')
if xPlayer then
   xPlayer.addInventoryItem('burger', 1) -- For ESX Framework (set framework in cfg)
end
  1. Get number from identifier

  • identifier string

exports['piotreq_phone']:GetNumberFromIdentifier(identifier)

Usage example

local xPlayer = ESX.GetPlayerFromId(source)
local identifier = xPlayer.identifier
local playerNumber = exports['piotreq_phone']:GetNumberFromIdentifier(identifier)
if playerNumber then
   exports['piotreq_phone']:SendMessage({
      sender = 'Lester',
      receiver = playerNumber,
      content = 'Location is here'
   })
end
  1. Get player number

exports['piotreq_phone']:GetNumber()

Usage Example

local playerNumber = exports['piotreq_phone']:GetNumber()
print(playerNumber)
  1. Check if sim card already exist

  • number string | number

exports['piotreq_phone']:SimCardExist(number)

Usage Example

local simExist = exports['piotreq_phone']:SimCardExist('piotreq')
print(simExist)
  1. Generate number (function is checking if number already exist, you dont need to check it)

exports['piotreq_phone']:GenerateNumber()

Usage Example

local newNumber = exports['piotreq_phone']:GenerateNumber()
print(newNumber)
  1. Create sim card

  • playerId number

exports['piotreq_phone']:CreateSimCard(playerId)

Usage Example

local newSim = exports['piotreq_phone']:CreateSimCard(source)
print(newSim) -- function is returning number of created sim card
  1. Get contact name by number

  • sourceNumber string | number

  • targetNumber string | number

exports['piotreq_phone']:GetContactByNumber(sourceNumber, targetNumber)
  1. Check if number is blocked

  • sourceNumber string | number

  • targetNumber string | number

exports['piotreq_phone']:NumberIsBlocked(sourceNumber, targetNumber)

Usage Example

local isBlocked = exports['piotreq_phone']:NumberIsBlocked('piotreq', '123')
print(isBlocked) -- true | false
  1. Get blocked numbers

  • number string | number

exports['piotreq_phone']:GetBlockedNumbers(number)

Usage Example

local numbers = exports['piotreq_phone']:GetBlockedNumbers(number)
print(json.encode(numbers))
-- {"123", "piotreq"}
PreviousAPPSNextNOTIFICATIONS

Last updated 1 year ago

📱
📇