Jump to content

Help ..script


Recommended Posts

What did is wrong with this script? I am not able to use this script, I type / bind and not take money and does nothing ..

function bmoney (thePlayer) 
         getPlayerMoney(thePlayer) 
end  
takePlayerMoney ( thePlayer, tonumber(100)  
end 
         outputChatBox ( "#FFFF00Você gastou 100$ para usar este comando ( /bind )",thePlayer, 255, 255, 255, true ) 
end 
addCommandHandler ( "bind", bmoney ) 

:B

Link to comment

Try this!

  
function bmoney (thePlayer) 
        getPlayerMoney(thePlayer) 
        takePlayerMoney ( thePlayer, 100) 
        outputChatBox ( "#FFFF00Você gastou 100$ para usar este comando ( /bind )",thePlayer, 255, 255, 255, true ) 
end 
addCommandHandler ( "money", bmoney ) 
  

(Not tested)

I changed the bind to money becuase bind is already handled by MTA, so do /money and it should hopefully take away $100

Edited by Guest
Link to comment
You're script doesn't make a sense until now but there's a problem you are using a 'bind' Command but the command is already handled on the mta -.- you can't use it.

Yes I know that when I wanted to put a person / bind, withdraw money by using the command ..

Link to comment

try.

function bmoney (thePlayer) 
      local dinheiro = getPlayerMoney(thePlayer) 
      if (dinheiro >=100) then 
        takePlayerMoney ( thePlayer, 100) 
        outputChatBox ( "#FFFF00Você gastou 100$ para usar este comando ( /money )",thePlayer, 255, 255, 255, true ) 
        else 
        outputChatBox ( "#FFFF00Você precisa de 100$ para usar este comando ( /money )",thePlayer, 255, 255, 255, true ) 
        end 
end 
addCommandHandler ( "money", bmoney ) 
  
  

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