Jump to content

Script Hitman


Recommended Posts

Posted

Well, I'm trying to create a script eg / hitman $ name value, and kill that player earns a certain amount of money, but I am not able to finish it someone could help me, what functions I use for such a script, the script I have done below hitherto and still not working must have done something wrong

function assassino (thePlayer) 
          local money = getPlayerMoney(thePlayer) 
      if (money > 1000) then 
          takePlayerMoney ( thePlayer, tonumber(1000) )             
          outputChatBox ('[CONTRATOS] O Player ' ..getPlayerName(thePlayer) .. ' botou um contrato no Player', root, 221, 160, 221, true)              
end 
addCommandHandler ( "hitman", assassino ) 

Posted

To do this, you'll have to store the data somewhere, I would say tables, then when he dies, get the reward amount from that table and give it to the killer.

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.

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