Forum

> > CS2D > Scripts > Every minutes gives money
Forums overviewCS2D overview Scripts overviewLog in to reply

English Every minutes gives money

4 replies
To the start Previous 1 Next To the start

old Every minutes gives money

Dovahkin
User Off Offline

Quote
I need a script that gives the player money every minute.

> You'll be surely credited to my script. I promise!

old Re: Every minutes gives money

Alistaire
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
script = {
	moneyGainedPerMinute = 1000
}

addhook('minute', '_minuteFunc')

function _minuteFunc()
	for _, id in pairs(player('table')) do
		parse('setmoney '..id..' '..(player(id, 'money') + script.moneyGainedPerMinute))
	end
end

There.

old Re: Every minutes gives money

Dovahkin
User Off Offline

Quote
Nicely done. Thank you.

Edit :
1
LUA ERROR: sys/lua/try.lua:26: Bad Argument#1 to 'player' (number expected, got string)
edited 1×, last 21.08.13 12:27:56 pm

old Re: Every minutes gives money

Avo
User Off Offline

Quote
Here
More >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview