Tebex [5.59€ incl. VAT] - Source Code
Documentation
Description
- With the
simcard
item you get a random number - With the
simcard_wish
item you can set the number you want to have yourself - Discord Logs
Compatible Phones
- Chezza Phone
- D-Phone
- GcPhone
- GksPhone
- HighPhone
- RoadPhone
- Quasar Phone [you’ll need Fakenumber DLC]
- QBCore Phone
- NPWD Phone
Config
Config = {}
----------------------------------------------------------------
Config.Locale = 'de' -- 'de', 'en', 'es', 'dk', 'fr', 'pl'
Config.VersionChecker = true
Config.Debug = true
----------------------------------------------------------------
-- Add the Webhook Link in server_discordlog.lua
Config.DiscordLog = true
Config.botColor = "6205745"
Config.botName = "MSK Simcard"
Config.botAvatar = "https://i.imgur.com/PizJGsh.png"
----------------------------------------------------------------
Config.Framework = 'ESX' -- 'ESX' or 'QBCore'
Config.Phone = 'chezza' -- 'chezza', 'gcphone', 'dphone', 'gksphone', 'highphone', 'roadphone', 'qsphone', 'qbphone', 'npwd'
-- If false you need NativeUI installed
Config.dialogBox = true -- If true then you need an_dialogBox (https://github.com/notaymanTV/an_dialogBox)
----------------------------------------------------------------
Config.needPhone = true -- Player has to have a phone in inventory
Config.phoneItem = {'phone'} -- {'phone', 'phone2'} // This should be your phone item // You can set multiple items
Config.usableItem = 'simcard' -- Item to generate a random Number // Add this to your items table in database
Config.removeItem = true -- Set to false if you dont want the item to be deleted after use
Config.StartingDigit = {
enable = true, -- Set false to disable StartingDigit
value = "094" -- the starting digits for phone number
}
----------------------------------------------------------------
-- If 'number' then the number would be 094XXXXXX if StartingDigit enabled or XXXXXX if StartingDigit disabled
-- If 'gc' then the number would be 094-XXXX if StartingDigit enabled or XXX-XXXX if StartingDigit disabled
-- If 'canada' then the number would be 094-XXX-XXXX if StartingDigit enabled or XXX-XXX-XXXX if StartingDigit disabled
Config.numberFormat = 'number' -- 'number', 'gc' or 'canada'
----------------------------------------------------------------
-- You need NativeUI installed !!!
-- Config.numberLength is only for Config.wishItem
Config.wishItem = 'simcard_wish' -- Item to insert a Number by yourself // Add this to your items table in database
Config.numberLength = 9 -- max numbers // default: 9 - Number would be 094XXXXXX // numberLength doesn't work for 'gc' and 'canada' option!
----------------------------------------------------------------
-- Read the Readme.md for more information
Config.Database = {
usersDB = 'users', -- Users Table // ESX default: 'users' // QBCore default: 'players'
usersIdentifierTB = 'identifier', -- identifier for users table // ESX default: 'identifier' // QBCore default: citizenid
numberDB = 'phones', -- In which table is the phonenumber located // ESX default: 'users' // QBCore default: 'players'
numberTB = 'phone_number', -- Column for phonenumber // ESX default: 'phone_number' // QBCore default: 'charinfo'
identifierTB = 'identifier' -- identifier for numberDB table // ESX default: 'identifier' // QBCore default: 'citizenid'
}
----------------------------------------------------------------
-- Change the Event in this function to the Event that changes the Number in your Phone.
-- You can add your own Events here
-- !!! This function is serverside !!!
Config.updateNumber = function(src, newNumber, xPlayer)
if Config.Phone:match('chezza') then -- Chezza Phone V2
TriggerEvent('phone:changeNumber', src, newNumber)
elseif Config.Phone:match('gcphone') then -- GcPhone
TriggerClientEvent("gcPhone:myPhoneNumber", src, newNumber)
elseif Config.Phone:match('dphone') then -- D-Phone
TriggerClientEvent("d-phone:client:changenumber", src, newNumber)
elseif Config.Phone:match('gksphone') then -- GKSphone
TriggerEvent('gksphone:gkssc:playerLoad', src)
elseif Config.Phone:match('highphone') then -- HighPhone
TriggerClientEvent("high_phone:updateData", src)
elseif Config.Phone:match('roadphone') then -- RoadPhone
TriggerEvent("roadphone:playerLoad", src)
elseif Config.Phone:match('qsphone') then -- Quasar Phone
-- Only working with version lower than v2.2.5 !!!
TriggerClientEvent('qs-smartphone:RefreshContacts', src)
elseif Config.Phone:match('qbphone') then -- QBCore Phone
-- Add your own Events here
elseif Config.Phone:match('npwd') then -- NPWD Phone
exports.npwd:setPhoneNumber(src, newNumber)
end
Config.Notification(src, 'server', xPlayer, newNumber, Translation[Config.Locale]['updateNumber'] .. newNumber .. Translation[Config.Locale]['updateNumber2'])
end
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
-- How to change Notification: https://musiker15.gitbook.io/msk-scripts/simcard/installation/notifications
-- xPlayer = ESX.GetPlayerFromId(src) / QBCore.Functions.GetPlayer(src)
Config.Notification = function(src, action, xPlayer, newNumber, message)
if Config.Framework:match('ESX') then
if action == 'client' then
ESX.ShowNotification(message) -- replace this with your Notify
elseif action == 'server' then
xPlayer.showNotification(message) -- replace this with your Notify
-- This is for Chezza Phone: TriggerClientEvent('phone:notify', src, { app = 'settings', title = Translation[Config.Locale]['phoneHeading'], content = Translation[Config.Locale]['phoneText'] })
end
elseif Config.Framework:match('QBCore') then
if action == 'client' then
QBCore.Functions.Notify(message, 'primary', 5000) -- replace this with your Notify
elseif action == 'server' then
TriggerClientEvent('QBCore:Notify', src, message, 'primary', 5000) -- replace this with your Notify
-- This is for Chezza Phone: TriggerClientEvent('phone:notify', src, { app = 'settings', title = Translation[Config.Locale]['phoneHeading'], content = Translation[Config.Locale]['phoneText'] })
end
end
end
Installation
Please read the Readme.md and the Documentation: Installation - MSK Scripts
Optional Requrements
- NativeUI
- an_dialogBox
Code accessible | Yes |
Subscription based | No |
Lines (approximately) | ~ 200 |
Requirements | ESX or QBCore, oxmysql |
Support | Yes |
Latest Update
My other Scripts
Paid
- [ESX] MSK Armor - Multiple Armor Vests
- [ESX] MSK Banking | Advanced Bankingsystem
- [ESX] MSK Crafting - Advanced Craftingsystem with NativeUI
- [ESX] MSK Garage and Impound with NativeUI
- [ESX] MSK Handcuffs - Realistic Handcuffs
- [ESX] MSK Shopsystem - Advanced Shopsystem with NativeUI
- [ESX / QBCore] MSK Simcard - Change your phonenumber
- [ESX] MSK WeaponAmmo | Clips, Components & Tints
Free
- [ESX] MSK Backpack | Chezza Inventory
- [ESX] MSK Deathcounter - integrated in myMultichar
- [Re-Release] EngineToggle
- GitHub - Musiker15/msk_givevehicle: Give Vehicles with Command or Item and Delete Vehicles with Command
- GitHub - MSK-Scripts/msk_rgbHeadlights: [ESX] Changeable Vehicle Headlights with an Item
- [ESX] MSK SaveCoordMenu
- [ESX/QBCore] MSK SecretBlips - Show and delete Blips with an item
- GitHub - MSK-Scripts/msk_webhook: [STANDALONE] Send Discord Webhooks
- GitHub - MSK-Scripts/msk_weaponammoitems: [ESX] Weapon Ammunition as Items