mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
Adds a DatabaseConfig dictionary which will allow an admin to specify a custom table/columns that exist outside of ESX. This gives us flexibility between ESX versions as well as making the phone frameworkas decoupled from ESX as possible. Also updates the contacts table to be namespaces with npwd
34 lines
1.2 KiB
Lua
34 lines
1.2 KiB
Lua
------
|
|
-- Database table & column mapping. This mapping allows us to maintain
|
|
-- a framework agnostic approach where integration into custom implementations
|
|
-- is possible. This mappings default to values that work with ESX.
|
|
------
|
|
DatabaseConfig = {
|
|
userTable = 'users',
|
|
-- all of these fields are required to be in the userTable
|
|
id = 'identifier',
|
|
firstName = 'firstname',
|
|
lastName = 'lastname',
|
|
phoneNumber = 'phone_number'
|
|
}
|
|
|
|
|
|
Config = {}
|
|
|
|
Config.Locale = 'en'
|
|
|
|
Config.KeyTogglePhone = 288 -- F1
|
|
Config.KeyTakeCall = 38 -- E
|
|
Config.PhoneAsItem = false
|
|
|
|
------
|
|
--Destroy Phone
|
|
------
|
|
|
|
Config.SwimDestroy = false --only set true if you have PhoneAsItem.
|
|
|
|
Config.RunRate = 10 --SECONDS /// Will do the initial thread every X SECONDS to check if the player is swimming so the phone can be destroyed based off the chance below.
|
|
|
|
Config.DestoryChance = 100 --PERCENT BASED /// from 0 to 100 where 100 is equal to 100% chance and 10 is equal to 10%. This is dependent on the amount above so dont set it too low.
|
|
|
|
Config.DestroyPhoneReCheck = 3 --MINUTES /// WIll wait the check for x MINUTES as they have no phone now and have been given a destroyed phone = to the number of phones they had. |