Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exports for getting the accounts #11

Closed
Mirrrrrow opened this issue Jul 26, 2024 · 1 comment
Closed

Exports for getting the accounts #11

Mirrrrrow opened this issue Jul 26, 2024 · 1 comment

Comments

@Mirrrrrow
Copy link
Contributor

Hey, I'm a big fan of not nesting and generally keeping everything clean with only few indents.
Take this for example:

-- 😢😢
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_police', function(account)
    account.addMoney(50)
end)

-- 😁😁😁
local account = exports['esx_addonaccount']:getSharedAccount('society_police')
account.addMoney(50)

Would this be an idea to implement, would it be merged if I would make a pr about it?
I know a lot of people prefer using this type of syntax, so I'm asking before doing it.

@Gellipapa
Copy link
Contributor

@Mirrrrrow Hi! You can do it but I think where these scripts are used they are used to using events, but if you want you can do it, but keep the old event logic for compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants