PL Phone Documentation

website·Indexed 29 days ago

https://pratamalabs.github.io

Documentation for PL Phone, featuring configuration guides for VOIP providers (including pma-voice and Salt), wallet settings, garage configurations, phone number settings, and emergency signal messaging.

Tokens
3.2K
Snippets
21
Records
27
Agent score
75%

What's inside PL Phone

  1. Pl Phone Service configuration options

    The following settings are available for each service entry in Config.Service:

    SettingDefaultDescription
    jobName"police"The internal job name identifier.
    label"LSPD"The display name of the service shown in the app.
    description"Los Santos Police"A short description of the service.
    icon"./Images/Jobs/police.png"Service icon. Supports local image paths, emojis, or http/https URLs.
    color"#3478F6"Main color of the service in HEX format.
    EnableBellDutytrueWhether players can toggle their duty status via the mobile phone.
    OnlyOnDutyReceiveMessagestrueIf true, only players currently on duty will receive service-related messages.
  2. Configure image paths for items and vehicles

    Set the NUI paths for item and vehicle images. Update these paths if you are using a different inventory system (e.g., ox_inventory) or custom image assets.
    Config.Playtime = {
        item_image = "nui://ox_inventory/web/images/",    -- Path to item images
        vehicle_image = "nui://pl_playtime/web/image/"    -- Path to vehicle images
    }
  3. Configure Garage vehicle retrieval settings

    The Config.Garage.Garage object controls the costs and accessibility of retrieving vehicles from the garage. The Price setting determines the fee charged to the player, and AllowGarageRetrieveFromApp enables players to spawn their vehicle near them via the phone app, automatically charging the specified fee.
    Config.Garage = {
        Garage = {
            Price = 5000, -- Fee charged when retrieving a vehicle
            AllowGarageRetrieveFromApp = true, -- Allow retrieval via app (spawns near player)
        },
        -- ...
    }
  4. Select and switch VOIP providers in FivePhone

    FivePhone supports three VOIP providers: pma-voice, SaltyChat, and Mumble. Only one provider can be active at a time. To switch providers, update the Config.VoipProvider value in config.lua.
    Config.VoipProvider = "pma-voice" -- Options: "pma-voice" | "saltychat" | "mumble"
  5. Configure Pl Phone service jobs

    The Config.Service table defines the available services/jobs in the Pl Phone app. Each entry controls the visual identity of the service and its duty-related messaging behavior.
    Config.Service = {
        { 
            jobName = "police",
            label = "LSPD",        
            description = "Los Santos Police",  
            icon = "./Images/Jobs/police.png",
            color = "#3478F6", 
            EnableBellDuty = true, 
            OnlyOnDutyReceiveMessages = true 
        },
        { 
            jobName = "ambulance",
            label = "EMS",         
            description = "Emergency medical services",  
            icon = "🚑", 
            color = "#30D158", 
            EnableBellDuty = true, 
            OnlyOnDutyReceiveMessages = false 
        },
        { 
            jobName = "mechanic", 
            label = "Mechanic",    
            description = "Official city workshop",     
            icon = "🔧", 
            color = "#FF9F0A", 
            EnableBellDuty = true, 
            OnlyOnDutyReceiveMessages = false 
        },
        { 
            jobName = "taxi",     
            label = "Taxi",        
            description = "City public transport", 
            icon = "🚖", 
            color = "#FFD60A",
            EnableBellDuty = true, 
            OnlyOnDutyReceiveMessages = true 
        },
        { 
            jobName = "gov",     
            label = "Government",  
            description = "City government",      
            icon = "🏛️", 
            color = "#BF5AF2", 
            EnableBellDuty = true, 
            OnlyOnDutyReceiveMessages = true 
        },
    }
  6. Configure phone number prefix and length in pl_phone

    The Config.PhoneNumber object defines the structure of phone numbers used by the system. Use PhonePrefix to set the starting digits of the number and PhoneLength to specify how many digits should follow that prefix.
    Config.PhoneNumber = {
        PhonePrefix = "08", -- The prefix number
        PhoneLength = 5      -- The length of the number after the prefix
    }
  7. Configure Impound vehicle retrieval settings

    The Config.Garage.Impound object manages the costs and accessibility for vehicles that have been impounded. The Price setting defines the impound release fee, and AllowImpoundRetrieveFromApp allows players to retrieve impounded vehicles directly through the phone app, spawning the vehicle nearby and charging the fee automatically.
    Config.Garage = {
        -- ...
        Impound = {
            Price = 50000, -- Fee charged when retrieving from impound
            AllowImpoundRetrieveFromApp = true, -- Allow retrieval via app (spawns near player)
        }
    }
  8. Reference for Pl Phone Wallet configuration settings

    The following settings are available within the Config.Wallet configuration object:
    SettingDefaultTypeDescription
    MAX_TRANSFER10000000NumberMaximum amount per single transfer
    MIN_TRANSFER100NumberMinimum amount per single transfer
    TX_LIMIT50NumberMaximum number of transactions stored in history
    TRANSFER_COOLDOWN10NumberDelay in seconds between each transfer
  9. Configure SaltyChat provider

    To use SaltyChat, set Config.VoipProvider to "saltychat". Ensure the saltychat resource is started before FivePhone in your server.cfg.
    Config.VoipProvider = "saltychat"
     
    Config.SaltyChat = {
        ChannelName      = "FiveChat_Call_%s", -- %s is replaced with the call threadKey
        DefaultChannel   = "",                 -- Channel to return to after call ends; empty means proximity mode
        DisableProximity = true,                -- Disable proximity voice during an active call
    }
  10. Configure Mumble provider

    To use the built-in FiveM Mumble provider, set Config.VoipProvider to "mumble".
    Config.VoipProvider = "mumble"
     
    Config.Mumble = {
        DisableProximity  = true, -- Disable proximity voice during an active call
        ProximityDistance = 3.0,  -- Proximity distance restored after call ends (meters)
        DefaultChannel    = "",   -- Channel to return to after call ends; empty means proximity mode
    }