Jump to content

Money script (giving and taking)


Guest TheLegend

Recommended Posts

Hello guys, its me again :(

This time I have another question about re-making a DM script I have. I would like to script the following thing:

1. When you kill somebody, it takes away $1000 from him.

2. When you kill somebody, it gives you $1000.

3. When you reach 30 kills, you get a bonus of $10000 (a way to save a player's result and give him bonuses).

I would really appreciate if someone gives me some help on that one, I mean a way to start it and script it. Thank you very much guys :)

Yours,

Legend

Link to comment

Use onPlayerWasted event http://development.mtasa.com/index.php? ... ayerWasted

Make a function in which you:

- take player's money & give killer money

http://development.mtasa.com/index.php? ... layerMoney http://development.mtasa.com/index.php? ... layerMoney

- add a kill point using setElementData http://development.mtasa.com/index.php? ... lementData

- do a check if player's got 30 kills using getElementData http://development.mtasa.com/index.php? ... lementData

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