Jump to content

kam_

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

kam_'s Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Opa, gostaria de saber como faço pro editbox fazer alguma coisa tipo, enviar dinhheiro, sacar ou depósito ou até mesmo enviar mensagem. obs: não quero o código feito, quero só uma explicação e oq irei precisar.
  2. saveitens = { [1] = {"Whiskey"}, [2] = {"Agua"}, [3] = {"Chocolate"}, [4] = {"Coca-Cola"}, } function Save_Itens(conta) if conta then local source = getAccountPlayer(conta) if isElement(source) then for i, saveitens in ipairs(saveitens) do local bank = getElementData(source, saveitens[1]) or 0 setAccountData(conta, saveitens[1], tonumber(bank)) end end end end addEventHandler("onPlayerLogin", root, function(_,acc) setTimer(Load_Itens,100,1,acc) end ) function Start_Itens(res) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then Load_Itens(acc) end end end end addEventHandler("onResourceStart", getRootElement(), Start_Itens) function Stop_Itens(res) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then Save_Itens(acc) end end end end addEventHandler("onResourceStop", getRootElement(), Stop_Itens) function Quit_Itens(quitType) local acc = getPlayerAccount(source) if not (isGuestAccount(acc)) then if acc then Save_Itens(acc) end end end addEventHandler("onPlayerQuit", getRootElement(), Quit_Itens) function Load_Itens(conta) if not (isGuestAccount (conta)) then if (conta) then local source = getAccountPlayer(conta) if isElement(source) then for i, saveitens in ipairs(saveitens) do local bank = getAccountData(conta,saveitens[1]) or 0 setElementData(source, saveitens[1], tonumber(bank)) end end end end end pra salvar elementData por tabela, está certo?
×
×
  • Create New...