Sign in to follow this  
LucasBaker

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

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post
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 ..

Share this post


Link to post

You're welcome and you're code doesn't have a much sense try 'Robbster' One .

Share this post


Link to post
Look above i fixed it and changed the command to /money

yes .. more when I put in addcommandhandler of error, as the # Mr.Pres [T] ege cited above

Share this post


Link to post

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 ) 
  
  

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.