Dolinho Posted September 14, 2015 Share Posted September 14, 2015 the getaccont not to be working someone help me with this? function createDB() if (not getAccount("batSystem")) then DataBase = addAccount("batSystem", "batSystem") elseif (getAccount("batSystem")) then DataBase = getAccount("batSystem", "batSystem") end end addEventHandler("onResourceStart", resourceRoot, createDB) function depositMoney(amount, text) local group = getPlayerGroup(client) if (not group) then return end local id= amount local current = getElementData(root, "Batalhao:"..group..":bank") or 0 local new = current + amount setAccountData(DataBase, "Batalhao:"..group..":bank", tonumber(new)) aaa = getAccountData(DataBase, "Batalhao:"..group..":bank") setElementData(root, "Batalhao:"..group..":logs", "" ..getPlayerName(client).." Depositou + R$: "..amount.."\n"..text) outputChatBox("Depositado $"..id.." Para o batalhao "..aaa, client, 0, 255, 0) end addEvent("batalhao.SendMoneyBank", true) addEventHandler("batalhao.SendMoneyBank", root, depositMoney) Link to comment
John Smith Posted September 14, 2015 Share Posted September 14, 2015 getAccount requires 2 arguments: - account name - password in some lines of code you got just account name in getAccount, and no password provided as 2nd argument Link to comment
MAB Posted September 14, 2015 Share Posted September 14, 2015 getAccount requires 2 arguments:- account name - password in some lines of code you got just account name in getAccount, and no password provided as 2nd argument the password argument is optional. Link to comment
LabiVila Posted September 14, 2015 Share Posted September 14, 2015 Are you maybe trying to use getAccountData? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now