ScriptsM Phone

ScriptsM Phone | FIRST BUTTON PHONE ON FIVEM

Following the trends of servers which gameplay takes place during a certain year, our development team decided to create a suitable phone for this type of servers.

Introducing SM-PHONE. This is the first push-button phone on FiveM. With its help, you can do absolutely everything that was possible in those times. This phone is designed to help server owners with a specific lore to increase the atmosphere on their server many times over.

Check out installation below!

Installation

Download a resource (opens in a new tab) from keymaster or buy it by buttons at the top

Install all resource dependencies

Resource start order

It's important for your resources to start in a logical order to prevent errors from missing dependencies.

start your_framework
start sm-phone

Setting up Database

To get phone working, you need to load our phone.sql file in your database

Adding custom ringtone

  1. Move your .mp3 ringtone audio file to the following path: sm-phone/html/sounds/ringtone
  2. Open index.html at sm-phone/html
  3. Go to line 412
  4. Copy line 412 and paste it below line 412
  5. Change name of ringtone and edit data-file option to your ringtone audio file name

Done!

Adding custom wallpapers

  1. Move your .png wallpaper file to the following path: sm-phone/html/img/wallpapers
  2. Open index.html at sm-phone/html
  3. Go to line 379
  4. Copy line 379 to 381 and paste it below line 381
  5. Change data-wallpaper to your wallpaper file name
  6. Change src to your wallpaper file path

Done!

Config

There you can find an config of resource with description for all params

Configuration = {}
 
Configuration.Locale = {}
 
Configuration.PhoneKey = 'M'
 
Configuration.CreateServiceCall = function(service, reason, playerCoords, street, callerName)
--example
 
--[[local dispatchData = {
    message = "911 Call",
    codeName = '911call',
    code = '911',
    icon = 'fas fa-phone',
    priority = 2,
    coords = playerCoords,
    name = callerName,
    number = "Hidden number",
    information = reason,
    street = GetStreetAndZone(playerCoords),
    alertTime = nil,
    jobs = (service == "police" and { 'police', 'sheriff' }) or (service == "ems" and { 'ambulance', 'lscofd' }) or
        (service == "tow" and { 'mechanic' }) or { 'police' }
	}
 
TriggerServerEvent('ps-dispatch:server:notify', dispatchData)--]]
end
 
Configuration.Notify = function(msg, type)
-- your notify or
QBCore.Functions.Notify(msg, type)
end
 
Configuration.VoiceResourceName = 'pma-voice' -- pma-voice/mumble-voip
 
Configuration.PhoneModel = `prop_v_m_phone_01`