Forum

> > CS2D > Scripts > get 1$ money from killing zombies not 300$
Forums overviewCS2D overview Scripts overviewLog in to reply

English get 1$ money from killing zombies not 300$

7 replies
To the start Previous 1 Next To the start

old Re: get 1$ money from killing zombies not 300$

DX
User Off Offline

Quote
@user Bowlinghead:
1
2
3
4
5
6
7
8
9
function showhealth()
     for _, id in pairs( player(0, 'table') ) do
          local HP = player(id, 'health')
          parse('hudtxt2 ' .. id .. ' 1 "\169255255255Health: ' .. HP .. '" 100 200')
     end
end


addhook("always","showhealth")
like this but money

old Re: get 1$ money from killing zombies not 300$

TimeQuesT
User Off Offline

Quote
user Bowlinghead has written
Get creative.
1
2
3
4
5
6
addhook("kill","yourself")
function yourself(vic,kil)
if (player(vic,"team") == 1) then
	parse("setmoney "..kil.. "..player(kil,"money")-299)
end
end


This will bug when @(16000-298) but nvm. How many zombies have to be killed aww (just calc some delta)

@user DX:
1
2
3
4
5
6
7
8
9
function showmuniez()
     for _, id in pairs( player(0, 'table') ) do
          local muny= player(id, 'money')
          parse('hudtxt2 ' .. id .. ' 1 "\169255255255Your inventory holds: ' .. muny.. ' dollarz" 100 200')
     end
end


addhook("always","showmuniez")
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview