Jump to content

Need help, im tired [HELP]


Sande

Recommended Posts

Im so tired and angry when i try make these little codes works so can someone finish it.

  
function ostaLippu ( thePlayer, myyja ) 
          if getPlayerMoney(thePlayer) < 4000 then 
          outputChatBox("Sinulla ei ole tarpeeksi rahaa ostaaksesi sisaanpaasya vlackin clubille.", thePlayer, 255, 0, 0) 
          return end 
          outputChatBox("[CLUB] Ostit lipukkeen vlackin clubiin!", thePlayer, 0,255,0) 
          takePlayerMoney(thePlayer, 4000) --[[ Need to add if someone buy ticket, money goes to accountname vlack --]] 
end 
addCommandHandler("lippu", ostaLippu ) 
  
function setMoney(thePlayer,key,amount) --[[ Bank deposit --]] 
    takePlayerMoney (thePlayer,amount) 
    local account = getPlayerAccount(thePlayer) 
    if account and tonumber(amount) then 
        setAccountData(account,"nordea-cash",amount) 
        outputChatBox("[NORDEA] Pistit tilillesi rahaa", thePlayer, 0,255,0) 
    end 
end 
addCommandHandler("pano",setMoney) 
  
function nosta(thePlayer,key,amount) --[[ Bank withdraw --]] 
    local playerMoney = getAccountData(playerAccount, "nordea-cash") 
    if (playerMoney) then 
    givePlayerMoney(thePlayer, amount ) 
        outputChatBox("[NORDEA] Nostit tililtäsi rahaa", thePlayer, 0,255,0) 
end 
end 
addCommandHandler("nosto", nosta ) 
  

Link to comment

Now i got something in my mind, now only withdraw, and saldo check not work. It says something bad in getaccount data can someone fix please?

  
function ostaLippu ( thePlayer, myyja ) 
     if getPlayerMoney(thePlayer) < 4000 then 
          outputChatBox("Sinulla ei ole tarpeeksi rahaa ostaaksesi sisaanpaasya vlackin clubille.", thePlayer, 255, 0, 0) 
          return end 
          outputChatBox("[CLUB] Ostit lipukkeen vlackin clubiin!", thePlayer, 0,255,0) 
          takePlayerMoney(thePlayer, 4000) 
          givePlayerMoney (getPlayerFromName("Vlack"), 4000) 
          outputChatBox("[CLUB-MANAGER] Pelaaja "..getPlayerName(thePlayer).." osti lipun.", getPlayerFromName("Vlack"), 0,255,0) 
end 
addCommandHandler("lippu", ostaLippu ) 
  
function setMoney(thePlayer,key,amount) --[[ Bank deposit --]] 
    takePlayerMoney (thePlayer,amount) 
    local account = getPlayerAccount(thePlayer) 
    if account and tonumber(amount) then 
        setAccountData(account,"nordea-cash",amount) 
        outputChatBox("[NORDEA] Pistit tilillesi rahaa "..(amount).."$", thePlayer, 0,255,0) 
    end 
end 
addCommandHandler("pano",setMoney) 
  
function nosta(thePlayer,key,amount) --[[ Bank withdraw --]] 
    local cash = getAccountData(thePlayer, "nordea-cash",amount) 
    if (cash) then  
    givePlayerMoney(thePlayer, amount ) 
        outputChatBox("[NORDEA] Nostit tililtäsi rahaa: "..(amount).."$", thePlayer, 0,255,0) 
end 
end 
addCommandHandler("nosto", nosta ) 
  
function saldo(thePlayer,key,amount) --[[ Bank withdraw --]] 
    local cash = getAccountData(thePlayer, "nordea-cash",amount) 
    if (cash) then  
        outputChatBox("[NORDEA] Sinulla on tililläsi "..(amount).."$", thePlayer, 0,255,0) 
end 
end 
addCommandHandler("saldo", saldo) 

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...