This is how to install our script easy on your server.


Database entries

CREATE TABLE `phone_battery` (
  `identifier` varchar(255) DEFAULT NULL,
  `status` int(11) DEFAULT '100'

CREATE TABLE `mfp_stocks` (
  `typ` varchar(255) DEFAULT NULL,
  `amount` int(12) DEFAULT 0

ALTER TABLE `phone_battery`
  ADD UNIQUE KEY `identifier` (`identifier`);

INSERT INTO `mfp_stocks` (`typ`, `amount`) VALUES 
('phone_battery', 10);

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('phone_battery', 'Battery', 1, 0, 1),
('old_phone_battery', 'Old Battery', 1, 0, 1);


start NativeUI
start mfp_phonebattery

Thats it. Edit the config.lua the way you want it to. ^^


Config = {}
Translation = {}

Config.Locale = 'en' -- 'en' for english, 'de' for german
Config.EnableBlips = true

Config.BatteryItem = 'phone_battery' -- itemname for changes. If you want this one, still import the sql-file too
Config.OldBatteryItem = 'old_phone_battery' -- itemname for changes. If you want this one, still import the sql-file too default: old_phone_battery

Config.BatteryPrice = 300
Config.OldBatteryPrice = 1
Config.enableResell = true -- enable possibility to sell batterys at the retailer, true = enabled

-- Discordlogging --
Dicordlogging = false -- type true to enable it!
DiscordWebhook = {
        ['webhook'] = '', -- paste here your webhook

-- Anti2muchMoney --
Anit2much = false -- activate a notification if a player have too much money in discord as a warning (maybe a cheater...)
Anti_MoneyMax = 50000000 -- amout for notification

Config.ShopLocations = { -- search here for scrap
   {x= -172.7, y= 239.09, z= 93.19}
   --more locations

Config.OldshopLocations = { -- search here for scrap
   {x= 287.57, y= 2843.73, z= 44.69}
   --more locations

Config.ConvertingLocation = { -- search here for scrap
{x= 304.34, y= 2848.4, z= 43.59},
   --more locations

Config.Npc = { -- add more npcs as dealer characters
   {x= -172.7, y= 239.09, z= 92.19, h=338.9},
   {x= 287.57, y= 2843.73, z= 43.69, h=100.9},
   {x= 304.34, y= 2848.4, z= 42.59, h=211.77},
   --more locations possible

Config.ProcentDropdowntime = 1 -- every x minutes your battery drops 1%
Config.enableAdminCommand = true -- /emptyphonebattery, recommend in server-cfg: add_ace group.admin command.emptyphonebattery allow

Translation = {
   ['en'] = {
      ['open_menu'] = 'Press ~INPUT_PICKUP~ to talk to Ali',
      ['open_menu2'] = 'Press ~INPUT_PICKUP~ to talk to the dealer',
      ['open_menu3'] = 'Press ~INPUT_PICKUP~ to talk to the worker',
      ['battery'] = 'Battery',
      ['batteryshop'] = 'Battery Retailer',
      ['batteryshop_disc'] = 'Buy or sell batteries for your cell phone',
      ['cash'] = 'Cash',
      ['buy'] = 'Purchase',
      ['sell'] = 'Sell',
      ['sell_disc'] = 'Sell your batteries to Ali',
      ['buy_disc'] = 'Buy new batteries to charge your phone',
      ['cancel'] = 'Cancel',
      ['good_bye'] = 'See you next time! See you.',
      ['oldshopdealer'] = 'Legacy Battery Distributor',
      ['buy_old_disc'] = 'Buy old batteries to recycle them.',
      ['worker'] = 'Factoryemployee',
      ['worker_disc'] = 'Batteries & co.',
      ['convert'] = 'Process',
      ['convert_disc'] = 'Process your old battery into a new, unused one.', 
      ['batterystatus01'] = 'Your phone has only',
      ['batterystatus02'] = 'You really should load.',
      ['batterydied'] = '~r~Your cell phone went out. The battery was too low.',
      ['quest1'] = 'How many batteries do you want to buy?',
      ['quest2'] = 'How many batteries do you want to sell?',
      ['100procent'] = 'Your phone battery is now back to ~g~100% charged~w~. ~o~Your phone will reboot!~w~',
      ['failed'] = 'Failed',
      ['worked'] = 'Successful',
      ['message1'] = 'You bought %s for ~g~%s$~w~.',
      ['message2'] = '~r~You can not afford the cost of %s$.',
      ['message3'] = 'You sold %s for ~g~%s$~w~.',
      ['message4'] = '~r~You have no %s to sell.',
      ['message5'] = 'You bought a legacy battery for ~g~%s$~s~.',
      ['message6'] = '~r~You could not afford a legacy battery for %s$.',
      ['message7'] = 'Your battery is being processed. Be patient for a moment.',
      ['message8'] = 'You have processed an old battery into a new one. Not bad!',
      ['message9'] = '~r~You do not have any old batteries with you to work with.',
      ['message10'] = '~r~Purchase failed:~w~\nThere are not enough batteries in stock.',
      ['stock'] = '~p~Stock:~w~',

   ['de'] = {
       ['open_menu'] = 'Drücke ~INPUT_PICKUP~ um mit Ali zu sprechen',
       ['open_menu2'] = 'Drücke ~INPUT_PICKUP~ um mit dem Händler zu sprechen',
       ['open_menu3'] = 'Drücke ~INPUT_PICKUP~ um mit dem Arbeiter zu sprechen',
       ['battery'] = 'Batterie',
       ['batteryshop'] = 'Akkuhändler',
       ['batteryshop_disc'] = 'Kaufe oder Verkaufe Akkus für dein Handy',
       ['cash'] = 'Bargeld',
       ['buy'] = 'Erwerben',
       ['sell'] = 'Verkaufen',
       ['sell_disc'] = 'Verkaufe deine Akkus an Ali',
       ['buy_disc'] = 'Kaufe neue Akkus um dein Handy zu laden',
       ['cancel'] = 'Abbrechen',
       ['good_bye'] = 'Bis zum nächsten mal! Wir sehen uns.',
       ['oldshopdealer'] = 'Altakkuhändler',
       ['buy_old_disc'] = 'Kaufe Altakkus um diese weiterzuverwerten.',
       ['worker'] = 'Fabriksmitarbeiter',
       ['worker_disc'] = 'Akkus & co.',
       ['convert'] = 'Verarbeiten',
       ['convert_disc'] = 'Verarbeite deinen Altakku zu einen neuen, unbenutzen.', --Dein Handy hat nur noch
       ['batterystatus01'] = 'Dein Handy hat nur noch',
       ['batterystatus02'] = 'Du solltest wirklich laden.',
       ['batterydied'] = '~r~Dein Handy ist ausgegangen. Der Akku war zu schwach.',
       ['quest1'] = 'Wie viele Akkus möchtest du kaufen?',
       ['quest2'] = 'Wie viele Akkus möchtest du verkaufen?',
       ['100procent'] = 'Dein Handyakku ist nun wieder zu ~g~100% aufgeladen~w~. ~o~Dein Handy startet neu!~w~',
       ['failed'] = 'Fehlgeschlagen',
       ['worked'] = 'Erfolgreich',
       ['message1'] = 'Du hast %s für ~g~%s$~w~ gekauft.',
       ['message2'] = '~r~Du kannst dir die Kosten von %s$ nicht leisten.',
       ['message3'] = 'Du hast %s für ~g~%s$~w~ verkekauft.',
       ['message4'] = '~r~Du hast keinen %s den du verkaufen könntest.',
       ['message5'] = 'Du hast einen Altakku für ~g~%s$~s~ gekauft.',
       ['message6'] = '~r~Du konntest dir einen Altakku für %s$ nicht leisten.',
       ['message7'] = 'Dein Akku wird verarbeitet. Gedulde dich einen Moment.',
       ['message8'] = 'Du hast einen Altakku zu einem neuen verarbeitet. Nicht schlecht!',
       ['message9'] = '~r~Du hast keine alten Akkus dabei, die du verarbeiten könntest.',
       ['message10'] = '~r~Kauf fehlgeschlagen:~w~\nEs befinden sich nicht genug Akkus auf Lager.',
       ['stock'] = '~p~Lager:~w~',


Last updated