1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Beta FloopyTruck's Advanced Economy

Discussion in 'DarkRP Addon & Plugin Releases' started by FloopyTruck, Feb 6, 2016.

?

Are you interested in this addon?

Poll closed Mar 8, 2016.
  1. Yes.

    100.0%
  2. No.

    0 vote(s)
    0.0%
  1. FloopyTruck

    FloopyTruck New Member

    Безимени-1.jpg

    This addon in Beta!
    If you found any bug, please report about it.


    Description
    With this addon gameplay for the mayor will don't be so boring, 'cause now he have very responsible job!
    He should follow the state of the economy so that no one has died of hunger!


    Features

    • Economy HUD indicator.
    • Custom taxes that controlled by mayor.
    • Mayor menu.
    • Mayor questions which affects to economy.
    • Economy affects to salary.
    • Economy affects to entities, shipments, weapons and ammo prices.
    • Allows mayor to unjail prisoners.
    • Allows mayor to dismiss government jobs.
    Installing
    Drop "advec" folder in your "darkrp_modules" folder and configure "sh_adveconomy_configuration.lua"

    Download
    See in attached files.


    Updates:
    - Now using WriteInt and ReadInt instead of Float's.
    - Now question and answer text shows via draw.DrawText instead of using DLabel.
    Because it looks better.
    - Fixed issue with Mayor's menu "Taxes" tab.
    When the mayor applied the changes, the players saw the notice about changes even when they have not changed.
    Now they will see notice only about things which was changed.
    - Added requesting of reason for lockdown.
    Think it's will be good example to how realize similar things in "Commands" tab.
    - Some redesign.
    - Some code improvements.
    - New formula to calculate ammo, entity, shipment and weapons price.
    - Some nice icons in Mayor's menu :3
    - Security improvements to avoid exploits.
    - Fixed critical bugs.
    - Improved redemption offer system.
    - Translated into Russian.
    - Tested on DarkRP 2.7.0.
    - Fixed bugs that was reported by users*.
    * Thank you guys for care.
     

    Attached Files:

    Last edited: Sep 14, 2017
    sergun26 and IAMTURK like this.
  2. Matryan

    Matryan Well-Known Member

    This looks very good... I'm surprised you didn't throw it on ScriptFodder.

    Some questions/suggestions though...
    Just looking through the code now though, on line 278 (and 279) in sv_adveconomy.lua, is there any reason why you have hooked 'PlayerDeath' and 'playerDeath'?
    And in both sv_adveconomy.lua and cl_adveconomy.lua, you've got a lot of global functions that could probably be localized.

    There may be more, but that's just from a quick skim.
    Other than those, very nice work mate.
     
  3. FloopyTruck

    FloopyTruck New Member

    I know about functions, that can be localized.
    And I hooked "PlayerDeath" and "playerDeath" because in development stage I had some issue with working of this hook.
    At that time I was very lazy mood for to go into the wiki and strongly wanted to sleep :)
    Will be fixed.

    Thanks for reply.
     
  4. FloopyTruck

    FloopyTruck New Member

    Seems like it's working without any errors or bugs because I got no one report about it.
     
  5. Senior Moretzsohn

    Senior Moretzsohn New Member

    Some stuff.

    1. We should be able to see how much money the goverment has by using the mayor menu.
    2. The economy tab is not very well placed. It's kinda in the middle of the screen at 1920x1080
    3. You should make a tab for adding laws.
    4. Even though the economy makes itens cheaper or more expensive, the prices are not updated at the F4 menu.
     
  6. FloopyTruck

    FloopyTruck New Member

    1. You don't need it now. Until I not added items which mayor be able to buy for government money. It's will be realized in some F4Menu on which I am working now.

    2. Use these settings in sh_adveconomy_config.lua file:
    Code (Text):
    --[[ Economy HUD settings --]]
    ADVEC_Config.EnableHUD = true
    ADVEC_Config.HUDBorder = true
    ADVEC_Config.HUDPlayerSeeGovernmentBank = false --[[ Players will see GovernmentBankValue instead of EconomyString text --]]
    ADVEC_Config.HUDEconomyString = "Economy" --[[ String which players will see if HUDPlayerSeeGovernmentBank is false --]]
    ADVEC_Config.HUDStringFont = "DermaDefaultBold"
    ADVEC_Config.HUDBorderColor = Color(255, 255, 255, 155)
    ADVEC_Config.HUDTrackerColor = Color(0, 0, 0, 255)
    ADVEC_Config.HUDTextColor = Color(255, 255, 255, 255)
    ADVEC_Config.HUDPosX = 500
    ADVEC_Config.HUDPosY = 100
    ADVEC_Config.HUDHeight = 20
    ADVEC_Config.HUDWidth = 200
    I've made it maximum customizable as I can.
    Because I don't know which HUD you use.
    So that you should customize it by yourself.

    3. Good idea and I've thought about it but it's can be easily relized in "Commands" tab.
    But I look at it and add soon.

    4. Sure but it's F4Menu fault.
    I have some idea how fix it but not sure.
    I'll try.

    Thank you for message.
    Update it soon.
     
    Last edited: Feb 26, 2016
  7. Heisenberg

    Heisenberg Member

    Good addon, but could you release a version without the questions system or at least have a way of turning it off?
     
  8. Waffle

    Waffle New Member

    PLEASE fix the position of the economy thing, its terribly off and there is literally NO WAY to change the positioning since you made it so hard to.

    It should be in the center top of my screen. its instead on the far left.
     
  9. [MyDarkRP] DiaZzZy

    [MyDarkRP] DiaZzZy New Member

    Hey, i added you on steam :)
     
  10. Jacks Teller

    Jacks Teller New Member

    You just add to change the ADVEC_Config.HUDPosX = 500
    ADVEC_Config.HUDPosY = 100 position, put like 600 / 80 then try reboot, if its too more at the right, try with 550, nothing more easy...
     
  11. Pinkman-ZFT

    Pinkman-ZFT New Member

    i am having troubles with it not using my prime minister job as the mayor job even though i added the "team name" into the place it is required.
     
  12. FloopyTruck

    FloopyTruck New Member

    There a lot of bugs which should be fixed.
    I'm so sorry but I really have no time to update it.
    Maybe in future I'll post update.
     
  13. Pinkman-ZFT

    Pinkman-ZFT New Member

    ok thanks. no problem right now since i got rid of it on my server, when its working i will reupload it and use it.
     
  14. FloopyTruck

    FloopyTruck New Member

    Glad to tell that v0.4b release, but in Russian translation.
    Changelog:
    Code (Text):

     * v0.4b
    - Security improvements to avoid exploits.
    - Fixed critical bugs.
    - Improved redemption offer system.
    - Translated into Russian.
    - Tested on DarkRP 2.7.0.
     
     
  15. Nagisa Momoe

    Nagisa Momoe Member

    Btw if I set the pos of the bar it will apply to all player?
     
  16. FloopyTruck

    FloopyTruck New Member

    Of course, yes.
     
  17. Nagisa Momoe

    Nagisa Momoe Member

    Wait what? Then how can they play with different screen res?
     
  18. gabrielcruel

    gabrielcruel New Member

    Fuck, I'm not good at lua, I tried to config the addon but I failed miserably, can someone help me? :v
    PM me and I'll show the errors
     
  19. FloopyTruck

    FloopyTruck New Member

    Which config you changed and which errors you get?
     
  20. gabrielcruel

    gabrielcruel New Member

    Nevermind, I solved the errors, thanks ;)
     

Share This Page