eduher Posted July 27, 2016 Share Posted July 27, 2016 Hello who can help me I want to make a script to select a random player and money for 5 minutes increase from 50 cents to 50 cents functions I use a script or community that seems Link to comment
Hale Posted July 27, 2016 Share Posted July 27, 2016 local money = 0 -- variable that's used for storing the money, you must have this in order to raise the money by 50 every time setTimer(function() local randomPlayer = getRandomPlayer() -- function for getting a random player money = money + 50 -- increases the money every time executed by 50 givePlayerMoney(randomPlayer, money) -- function to give the random player money end, 5000, 0) -- if you dont know what these numbers are, go search "setTimer syntax MTA" It's not hard to make, try doing it yourself next time. Link to comment
shaio Posted August 1, 2016 Share Posted August 1, 2016 Wrong luka, with a timer 5000 = 5 seconds. 5 minutes = 300000. money = 0 setTimer(function() money = money + 50 givePlayerMoney(getRandomPlayer(), money) end, 300000, 0) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now