English get 1$ money from killing zombies not 300$

7 replies
Goto Page
To the start Previous 1 Next To the start
Up
DX
User
Offline Off
how if I kill zombies or someone I will get money 1 $ not 300 $
01.11.20 08:16:08 pm
Up
Bowlinghead
User
Offline Off
Get creative.
Code:
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
Share time limited free games here
01.11.20 08:38:39 pm
Up
DX
User
Offline Off
@user Bowlinghead: thanks
Edit:can you make display money at postion 100 200
edited 4×, last 01.11.20 09:47:17 pm
01.11.20 10:05:04 pm
Up
Bowlinghead
User
Offline Off
Nothing simpler than that:
Code:
1
2
3
4
addhook("always","j")
function j()
parse("hudtxt 69 money 100 200")
end
Share time limited free games here
01.11.20 10:17:20 pm
Up
DX
User
Offline Off
@user Bowlinghead:
Code:
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
02.11.20 01:22:57 am
Up
TimeQuesT
User
Offline Off
user Bowlinghead has written:
Get creative.
Code:
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:
Code:
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")
Muh
02.11.20 06:10:33 am
Up
DX
User
Offline Off
@user TimeQuesT: thanks
03.11.20 10:48:23 am
Up
Haraldstranded
User
Offline Off
thats a good idea
To the start Previous 1 Next To the start