Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Script okokBanking

ValeTMHD

Gold Elite
Joined
Jun 15, 2021
Messages
270
Reaction score
8,376
Points
316
Location
Italy
47e93f5eeb93f01df174d691c16aeea1fc25e8b2.png


[SQL] ITS IN THE README
[DOWNLOAD]
 

ikova

Member
Joined
Jun 27, 2021
Messages
1
Reaction score
0
Points
146
Working but missing SQL file!
 

monmam

Bronze Elite
Joined
Aug 14, 2021
Messages
10
Reaction score
10
Points
156
SQL



CREATE TABLE `okokBanking_transactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`receiver_identifier` varchar(255) NOT NULL,
`receiver_name` varchar(255) NOT NULL,
`sender_identifier` varchar(255) NOT NULL,
`sender_name` varchar(255) NOT NULL,
`date` varchar(255) NOT NULL,
`value` int(50) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `okokBanking_societies` (
`society` varchar(255) NULL DEFAULT NULL,
`society_name` varchar(255) NULL DEFAULT NULL,
`value` int(50) NULL DEFAULT NULL,
`iban` varchar(255) NOT NULL,
`is_withdrawing` int(1) NULL DEFAULT NULL
);
ALTER TABLE `users` ADD COLUMN `iban` varchar(255) NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `pincode` int(50) NULL DEFAULT NULL;
 

JulienJohnson

Gold Elite
Joined
Sep 7, 2021
Messages
170
Reaction score
2,394
Points
326
Location
Swiss
SQL



CREATE TABLE `okokBanking_transactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`receiver_identifier` varchar(255) NOT NULL,
`receiver_name` varchar(255) NOT NULL,
`sender_identifier` varchar(255) NOT NULL,
`sender_name` varchar(255) NOT NULL,
`date` varchar(255) NOT NULL,
`value` int(50) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `okokBanking_societies` (
`society` varchar(255) NULL DEFAULT NULL,
`society_name` varchar(255) NULL DEFAULT NULL,
`value` int(50) NULL DEFAULT NULL,
`iban` varchar(255) NOT NULL,
`is_withdrawing` int(1) NULL DEFAULT NULL
);
ALTER TABLE `users` ADD COLUMN `iban` varchar(255) NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `pincode` int(50) NULL DEFAULT NULL;
thank you very much for the time saving by not looking everywhere :)
 

kkruse

Silver Elite
Joined
Apr 14, 2021
Messages
20
Reaction score
53
Points
221
Yo.
I need help with this script, bcs when i want withdraw my money from bank, they are not in my inventory.
In console, it shows me this error:

[ script:es_extended] SCRIPT ERROR: @es_extended/server/classes/player.lua:299: attempt to index a nil value (local ‘account’)
[ script:es_extended] > ref (@es_extended/server/classes/player.lua:299)
[ script:es_extended] > handler (@okokBanking/server.lua:95)
 

JulienJohnson

Gold Elite
Joined
Sep 7, 2021
Messages
170
Reaction score
2,394
Points
326
Location
Swiss
Yo.
I need help with this script, bcs when i want withdraw my money from bank, they are not in my inventory.
In console, it shows me this error:

[ script:es_extended] SCRIPT ERROR: @es_extended/server/classes/player.lua:299: attempt to index a nil value (local ‘account’)
[ script:es_extended] > ref (@es_extended/server/classes/player.lua:299)
[ script:es_extended] > handler (@okokBanking/server.lua:95)
you put the sql in the database? :unsure:
 

kkruse

Silver Elite
Joined
Apr 14, 2021
Messages
20
Reaction score
53
Points
221
Anyone able to help? it reads the cash and balance ok, just can no pull money out or put money in with the above error.
[ script:es_extended] SCRIPT ERROR: @es_extended/server/classes/player.lua:299: attempt to index a nil value (local ‘account’)
[ script:es_extended] > ref (@es_extended/server/classes/player.lua:299)
[ script:es_extended] > handler (@okokBanking/server.lua:95)
 

JulienJohnson

Gold Elite
Joined
Sep 7, 2021
Messages
170
Reaction score
2,394
Points
326
Location
Swiss
did you follow all the instructions correctly? which version of esx do you have?

Anyone able to help? it reads the cash and balance ok, just can no pull money out or put money in with the above error.
[ script:es_extended] SCRIPT ERROR: @es_extended/server/classes/player.lua:299: attempt to index a nil value (local ‘account’)
[ script:es_extended] > ref (@es_extended/server/classes/player.lua:299)
[ script:es_extended] > handler (@okokBanking/server.lua:95)
1. First of all add the required tables to your database, executing the following code:

CREATE TABLE `okokBanking_transactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`receiver_identifier` varchar(255) NOT NULL,
`receiver_name` varchar(255) NOT NULL,
`sender_identifier` varchar(255) NOT NULL,
`sender_name` varchar(255) NOT NULL,
`date` varchar(255) NOT NULL,
`value` int(50) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
);

CREATE TABLE `okokBanking_societies` (
`society` varchar(255) NULL DEFAULT NULL,
`society_name` varchar(255) NULL DEFAULT NULL,
`value` int(50) NULL DEFAULT NULL,
`iban` varchar(255) NOT NULL,
`is_withdrawing` int(1) NULL DEFAULT NULL
);

ALTER TABLE `users` ADD COLUMN `iban` varchar(255) NULL DEFAULT NULL;

ALTER TABLE `users` ADD COLUMN `pincode` int(50) NULL DEFAULT NULL;

2. To add salary/paycheck transactions navigate to 'es_extended/server' and open 'paycheck.lua'.

2.1. Add the following code (just like in the example below).

TriggerEvent('okokBanking:AddTransferTransactionFromSocietyToP', salary, "salary", "Salary", xPlayer.identifier, xPlayer.getName())

Example:

if salary > 0 then
if job == 'unemployed' then -- unemployed
xPlayer.addAccountMoney('bank', salary)
TriggerEvent('okokBanking:AddTransferTransactionFromSocietyToP', salary, "salary", "Salary", xPlayer.identifier, xPlayer.getName())
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_help', salary), 'CHAR_BANK_MAZE', 9)
elseif Config.EnableSocietyPayouts then -- possibly a society
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function (society)
if society ~= nil then -- verified society
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function (account)
if account.money >= salary then -- does the society money to pay its employees?
xPlayer.addAccountMoney('bank', salary)
account.removeMoney(salary)
TriggerEvent('okokBanking:AddTransferTransactionFromSocietyToP', salary, "salary", "Salary", xPlayer.identifier, xPlayer.getName())
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
else
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), '', _U('company_nomoney'), 'CHAR_BANK_MAZE', 1)
end
end)
else -- not a society
xPlayer.addAccountMoney('bank', salary)
TriggerEvent('okokBanking:AddTransferTransactionFromSocietyToP', salary, "salary", "Salary", xPlayer.identifier, xPlayer.getName())
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
end
end)
else -- generic job
xPlayer.addAccountMoney('bank', salary)
TriggerEvent('okokBanking:AddTransferTransactionFromSocietyToP', salary, "salary", "Salary", xPlayer.identifier, xPlayer.getName())
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
end
end

3. To replace the "okokBanking" logo, simply replace it with yours on the 'web' folder.
 

kkruse

Silver Elite
Joined
Apr 14, 2021
Messages
20
Reaction score
53
Points
221
I have ESX 1.1 with essential mode mate, yes all tables are there and can see my name in one of them
 

Thomas Shelby

Member
Joined
Aug 18, 2021
Messages
8
Reaction score
0
Points
156
Alguém pode ajudar? ele lê o dinheiro e o saldo ok, só não pode retirar dinheiro ou colocar dinheiro com o erro acima.
[script: es_extended] ERRO DE SCRIPT: @ es_extended / server / classes / player.lua: 299: tentativa de indexar um valor nulo ('conta' local)
[script: es_extended]> ref (@ es_extended / server / classes / player.lua: 299)
[script: es_extended]> manipulador (@ okokBanking / server.lua: 95)
I'm having the same problem... did you manage to fix it?
 

rushez

Member
Joined
Oct 19, 2021
Messages
2
Reaction score
0
Points
156
Location
lalala
Has anyone managed to make mistakes like the two of them
 
Top