Jump to content

Nordea-cash // Transfer not work[HELP]


Sande

Recommended Posts

I am made nordea command bank system, and this transfer command not work. No errors. please help.

  
function tilisiirto ( thePlayer, target, command, amount ) 
    local target = getPlayerFromName ( target ) 
    if ( target ) then 
    if not (isGuestAccount (getPlayerAccount (thePlayer))) then 
      if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) then 
        if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash") >= tonumber (amount)) and (tonumber (amount) > 0) then 
          local money = (tonumber(getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) - tonumber (amount)) 
          setAccountData (getPlayerAccount (thePlayer), "nordea-cash", tonumber(money)) 
          givePlayerMoney (target, tonumber(amount)) 
          outputChatBox ( tostring (amount) .. "$ nostettu tililtä, ja annettu pelaajaalle "..(target)..".", thePlayer, 0, 255, 0, false) 
          outputChatBox ( tostring (amount) .. "$ Antoi sinulle pelaaja "..getPlayerName(thePlayer)..".", target, 0,255,0) 
        else 
          outputChatBox ("[Nordea]Et voi siirtää enempää mitä sinulla pankkitilillä on!", thePlayer, 255, 0, 0, false) 
        end 
      else 
        outputChatBox ("[Nordea]Käyttäjä luotu!", thePlayer, 255, 0, 0, false) 
        outputChatBox ("[Nordea]Pankki antaa sinulle 250$ tervetulolahjaksi!", thePlayer, 255, 0, 0, false) 
        setAccountData (getPlayerAccount (thePlayer), "nordea-cash", 250) 
       end 
    end 
  end 
end 
addCommandHandler("siirto", tilisiirto ) 

Link to comment
function tilisiirto ( thePlayer, command, target, amount ) 
    local target = getPlayerFromName ( target ) 
    if ( target ) then 
    if not (isGuestAccount (getPlayerAccount (thePlayer))) then 
      if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) then 
        if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash") >= tonumber (amount)) and (tonumber (amount) > 0) then 
          local money = (tonumber(getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) - tonumber (amount)) 
          setAccountData (getPlayerAccount (thePlayer), "nordea-cash", tonumber(money)) 
          givePlayerMoney (target, tonumber(amount)) 
          outputChatBox ( tostring (amount) .. "$ nostettu tililtä, ja annettu pelaajaalle "..(target)..".", thePlayer, 0, 255, 0, false) 
          outputChatBox ( tostring (amount) .. "$ Antoi sinulle pelaaja "..getPlayerName(thePlayer)..".", target, 0,255,0) 
        else 
          outputChatBox ("[Nordea]Et voi siirtää enempää mitä sinulla pankkitilillä on!", thePlayer, 255, 0, 0, false) 
        end 
      else 
        outputChatBox ("[Nordea]Käyttäjä luotu!", thePlayer, 255, 0, 0, false) 
        outputChatBox ("[Nordea]Pankki antaa sinulle 250$ tervetulolahjaksi!", thePlayer, 255, 0, 0, false) 
        setAccountData (getPlayerAccount (thePlayer), "nordea-cash", 250) 
       end 
    end 
  end 
end 
addCommandHandler("siirto", tilisiirto ) 

Try it.

Link to comment
function tilisiirto ( thePlayer, command, target, amount ) 
    local target = getPlayerFromName ( target ) 
    if ( target ) then 
    if not (isGuestAccount (getPlayerAccount (thePlayer))) then 
      if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) then 
        if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash") >= tonumber (amount)) and (tonumber (amount) > 0) then 
          local money = (tonumber(getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) - tonumber (amount)) 
          setAccountData (getPlayerAccount (thePlayer), "nordea-cash", tonumber(money)) 
          givePlayerMoney (target, tonumber(amount)) 
          outputChatBox ( tostring (amount) .. "$ nostettu tililtä, ja annettu pelaajaalle ".. getPlayerName ( target )..".", thePlayer, 0, 255, 0, false) 
          outputChatBox ( tostring (amount) .. "$ Antoi sinulle pelaaja "..getPlayerName(thePlayer)..".", target, 0,255,0) 
        else 
          outputChatBox ("[Nordea]Et voi siirtää enempää mitä sinulla pankkitilillä on!", thePlayer, 255, 0, 0, false) 
        end 
      else 
        outputChatBox ("[Nordea]Käyttäjä luotu!", thePlayer, 255, 0, 0, false) 
        outputChatBox ("[Nordea]Pankki antaa sinulle 250$ tervetulolahjaksi!", thePlayer, 255, 0, 0, false) 
        setAccountData (getPlayerAccount (thePlayer), "nordea-cash", 250) 
       end 
    end 
  end 
end 
addCommandHandler("siirto", tilisiirto ) 

Try.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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