Jump to content

how get Bankbalance


daKillar2000

Recommended Posts

Posted

it depends what script you are using for bank..

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

isnt it easier to open script and check whats inside?

probably you have to do:

getAccountData(account_variable, "bank.amout") 

or it was "bank.money"?

I dont have it, just open this script and look inside..

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

you didnt gave us any code.

we don't know what you did.

your "error message" is incomplete and you didnt say which line is causing that error.

blablabla.

Here: viewtopic.php?f=91&t=27027

probably you received this link already 20 times, but well, you still havent red it

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
DaPlayerBank = guiCreateLabel(15, 138, 217, 15, "Bank:", false, PlayerinfoW) 
    guiLabelSetHorizontalAlign(DaPlayerBank, "left", false) 
    guiLabelSetVerticalAlign(DaPlayerBank, "center") 
  
  
  
    guiSetText(DaPlayerBank,"Bank:  $   "  ..tostring(getElementData(lp,"bank.money"))) 

Posted

oh my god.

at least read my posts when i'm giving you direct answer.

getAccountData, not getElementData.

again - take a peek into bank resource.

And i dont know why you are trying to re-create the gui?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

well, getAccountData is server side, so you have to trigger client side event..

just look inside 50p's resource!

omg,

that is my last reply to this topic, i have enough with your ignorance to any suggestions

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

-client side

  
    addEvent("banklabel", true ) 
    function banklabel( ) 
       bank = tonumber(balance) 
       guiSetText(DaPlayerBank,"Bank:  $   "  ..tostring(thePlayer,balance)) 
    end   
  

serverside

  function bankstatus (source) 
 local account = getPlayerAccount (source); 
 if not isGuestAccount(account) then 
      local balance = getBankAccountBalance(source)  
      triggerClientEvent (source,"banklabel",source,balance) 
     end 
 end 
  

Posted

these functions are exported functions. you can't just call them this way!

i have never used exported functions but probably you need to use this:

  
local something = call(getResourceFromName("bank"), "getBankAccountBalance", source) 
-- remember - source is player element or account name 
  

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

ok i put that but not works again

i do this:

----Serverside

     function bankstatus (source) 
          local account = getPlayerAccount (source); 
          local balance = exports.bank:getBankAccountBalance( source )  
          triggerClientEvent (source,"banklabel",source,balance) 
        end 

-----ClientSide

    addEvent("banklabel", true ) 
     function banklabel( balance ) 
       guiSetText(DaPlayerBank,"Bank:  $   "  ..tostring(balance)) 
   end   

I Dont Know Why Not Works

Posted
FIXED

-------CLOSED-------

What was wrong then? Tell us and then we can close the topic.

i will tell us what was wrong since i had to fix it ;), he wasn't calling getstatus function that way it won't ever work, so i added a triggerServerEvent and now is working.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
What getstatus function? :roll:

My bad, was bankstatus ;)

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...