[Release] [WIP] ESX 2

how would i make this controller friendly

in which folder is it?

es_extended config file

i been told that 60000 = 1 min so its showing every 7 min gets paid

For some reason I cant open my inventory at F2, I have no idea why…?

I don’t got much to say, but I downloaded a full server with Essentialmode 5, Mysql and all that shit. No errors at all in server console. Could it be cuz ES5 doesnt work with MySql? Heard of that, been working on this for hours now, can’t find a solution. If the problem is that I need Essentialmode 4, where can I then find it?

i use es5 with mysql and all works fine

Could you link you server.cfg so I can see the order you start the plugins with?

This is making me pissed cuz I had a server a couple of months ago with everything working, tried everything…

Don’t know if best but this is my set up

the# in front of foodhud it’s just disabled

Thanks alot, just solved the problem. I missed some shit plugins, thanks anyways :slight_smile:

Is there a way that I could remove the timer completely from removing money from your inventory? Everytime I remove any amount of cash from my inventory, it gives me a 5min wait time before drop.

1st WHAT? What are u trying to say, don’t understand

timer gives money not take!

Hello i need some help.
I want the black_money to be in red color but when i try to put the color, the bank and the black_money change in red.

--local accountTpl = '<div><img src="img/accounts/' .. xPlayer.accounts[i].name .. '.png"/>&nbsp;<span style="color:red;">{{money}}</span></div>'
    local accountTpl = '<div><img src="img/accounts/' .. xPlayer.accounts[i].name .. '.png"/>&nbsp;{{money}}</div>'

I want to know how i could have only the black_money in red, if someone can help me ?

i don’t think you can as its all one code

inventory money is separate to bank and dirty

bank and dirty is same

so top money u can change one colour
bank and dirty you can change one colour, but can’t change bank and dirty as different colours,
not that i found any ways, may need new code.

I can :slight_smile: I did it !
Here its the code :

for i=1, #xPlayer.accounts, 1 do

    if xPlayer.accounts[i].name == 'bank' then
    local accountTpl = '<div><img src="img/accounts/' .. xPlayer.accounts[i].name .. '.png"/>&nbsp;{{money}}</div>'

    ESX.UI.HUD.RegisterElement('account_' .. xPlayer.accounts[i].name, i-1, 0, accountTpl, {
      money = 0
    })

    ESX.UI.HUD.UpdateElement('account_' .. xPlayer.accounts[i].name, {
      money = xPlayer.accounts[i].money
    })
    elseif xPlayer.accounts[i].name == 'black_money' then
    local accountTpl = '<div><img src="img/accounts/' .. xPlayer.accounts[i].name .. '.png"/>&nbsp;<span style="color:red;">{{money}}</span></div>'

    ESX.UI.HUD.RegisterElement('account_' .. xPlayer.accounts[i].name, i-1, 0, accountTpl, {
      money = 0
    })

    ESX.UI.HUD.UpdateElement('account_' .. xPlayer.accounts[i].name, {
      money = xPlayer.accounts[i].money
    })
    end
  end
1 Like

what a idiot was looking for dirty didn’t think black_money :crazy_face:

2018-05-22

all i did was change icon and made smaller and change to ÂŁ

Hi there everyone!

I’m using a resource for missions on my server and it uses it’s own money system to reward players for completing missions and achievements. I use ESX because of it’s features like daily stipend, remembering players, buying cars and other things.

I would like to alter that code to deposit the money into the user’s account that ESX utilizes. Is that a possibility? I found this is the code that deposited the payment for a user’s job:

xPlayer.addMoney(xPlayer.job.grade_salary)

Is this something I could use in the other resource? His payment system looks like this in the uncompiled code:

Screen.ShowNotification(Strings.MISSIONS_GANGFIGHT49_ALLTARGETSKILLED);
BaseScript.TriggerEvent(Events.MONEY_ADD, 10000);
BaseScript.TriggerEvent(Events.XP_ADD, 50);

I was wondering if I could use the payment code instead, something like:

xPlayer.addMoney(10000)
TriggerClientEvent('esx:showNotification', 'You got paid $10,000!')

Any help with this would be greatly appreciated. Thanks for your time!

Continuing my effort to use ESX payment inside a non-ESX resource, I tried adding this function into the code

xPlayer.addBank(10000);

and got the error “The name ‘xPlayer’ does not exist in the current context”.

Could someone tell me what I need to do to be able to use ESX functions in other resources?

Thanks for your time!

How did you get the top icon to be a ÂŁ sign where it says 1700?

1 Like

Thank you for this 2020