Forum

> > CS2D > Scripts > NPC Hitting Money
Forums overviewCS2D overview Scripts overviewLog in to reply

English NPC Hitting Money

4 replies
To the start Previous 1 Next To the start

old NPC Hitting Money

maPmaKer
User Off Offline

Quote
Can someone make a little script that give you an amount of $ each time you hit a NPC?

Please cookie

Thanks,
maPmaKer

old Re: NPC Hitting Money

Yasday
User Off Offline

Quote
1
2
3
4
5
6
money_amount = 300

addhook([[objectdamage]],[[objmoney]])
function objmoney(oid,dmg,id)
	parse([[setmoney ]]..id..[[ ]]..player(id,"money") + money_amount)
end

try it

old Re: NPC Hitting Money

Chex
User Off Offline

Quote
This is for ALL objects. So with this, if you hit a building, it will give you 300 dollars. Here.

1
2
3
4
5
6
7
8
money_amount = 300

addhook([[objectdamage]],[[objmoney]])
function objmoney(oid,dmg,id)
	if oid==30 then
		parse([[setmoney ]]..id..[[ ]]..player(id,"money") + money_amount)
	end
end
With this script, only if you hit an NPC will it give you money.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview