1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
addhook("objectkill","Collectables_objectkill_hook") function Collectables_objectkill_hook(dynid, i) 	if object(dynid, "type") == 30 then 		if player(id, "weapontype") == 2 and item(id, 'mode") == 2 then 			Col2-2_Collected = Col2-2_Collected + 1 			parse('hudtxt 2 "'..Col2-2_Collected..'" 40 388 3') 			for n, w in ipairs(player(0, 'tableliving')) do 				parse('setmoney '..w..' '..player(w, 'money')+20) 			end 		elseif player(id, "weapontype") == *knife* then 			Col2-3_Collected = Col2-3_Collected + 1 			parse('hudtxt 2 "'..Col2-3_Collected..'" 40 388 3') 			for n, w in ipairs(player(0, 'tableliving')) do 				parse('setmoney '..w..' '..player(w, 'money')+30) 			end 		else 			Col2_Collected = Col2_Collected + 1 			parse('hudtxt 2 "'..Col2_Collected..'" 40 388 3') 			for n, w in ipairs(player(0, 'tableliving')) do 				parse('setmoney '..w..' '..player(w, 'money')+10) 			end 		end 	end end
Is there a way to get the player like Col2-2_Collected if the kill was silenced and Col2-3_Collected if it was a knifekill?
I just used my Lua knowledge for this, but it doesn't work (of course..).
----
Also, what is the weapontype of a knife? If I need it for the script of course.
edited 1×, last 12.01.12 05:52:21 pm