1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- Shows a message to you and your enemy. This is slightly how it works: Player 1 knifed Player 2.
-- This Lua script will display kill info to Player 1 and 2, and vice versa.
addhook("kill","on_kill")
function on_kill(pl_1,pl_2,wpn,x,y)
	if (pl_1,"exists") then
		if(wpn==50)then
			msg2(pl_2,"©255255000You have been knifed by "..pl_1.."!")
			msg2(pl_1,"©102255102You have knifed "..pl_2.."!")
		return 0
		end
	elseif (pl_2,"exists") then
		if(wpn==50)then
			msg2(pl_1,"©255255000You have been knifed by "..pl_2.."!")
			msg2(pl_2,"©102255102You have knifed "..pl_1.."!")
		return 0
		end
	else
		-- If it all fails it'll print this error message below into the console.
		print("Lua script failed.")
	end
end