JAVAbig gameevent hook

Posts 1–15 of 18 · Page 1 of 2
big gameevent hook
Code:
gameevent.Listen("entity_killed")

hook.Add("entity_killed", "\0", function(data)
	local victim = data.entindex_killed
	local attacker = data.entindex_attacker

	if (player.GetByID(victim):IsPlayer()) and (player.GetByID(attacker):IsPlayer()) then
		if (victim == attacker) then
			LocalPlayer():ChatPrint(player.GetByID(victim):Name() .. " killed themself")
		else
			LocalPlayer():ChatPrint(player.GetByID(victim):Name() .. " was killed by " .. player.GetByID(attacker):Name())
		end
	end
end)
enjoy!!!!!
Quote Originally Posted by kingboy111 View Post
Code:
gameevent.Listen("entity_killed")

hook.Add("entity_killed", "\0", function(data)
	local victim = data.entindex_killed
	local attacker = data.entindex_attacker

	if (player.GetByID(victim):IsPlayer()) and (player.GetByID(attacker):IsPlayer()) then
		if (victim == attacker) then
			LocalPlayer():ChatPrint(player.GetByID(victim):Name() .. " killed themself")
		else
			LocalPlayer():ChatPrint(player.GetByID(victim):Name() .. " was killed by " .. player.GetByID(attacker):Name())
		end
	end
end)
enjoy!!!!!
This isn't really good, But meh, You could've made something better!
Quote Originally Posted by suchisgood View Post
This isn't really good, But meh, You could've made something better!
ya but it works fine and for a gamemode like ttt, this is practically a traitor detector!!!
Quote Originally Posted by kingboy111 View Post
ya but it works fine and for a gamemode like ttt, this is practically a traitor detector!!!
Traitor detector when your dead?
Quote Originally Posted by suchisgood View Post
Traitor detector when your dead?
are you dumb? whenever someone dies by another player, or themself, it prints in chat.
Quote Originally Posted by kingboy111 View Post
are you dumb? whenever someone dies from another player, or themself, it prints in chat.
No it doesn't, It only prints names of who died and when you suicide!
Quote Originally Posted by suchisgood View Post
No it doesn't, It only prints names of who died and when you suicide!
I hope your on a trolling spree, thats three autistic posts in a row
in a previous autistic post you said "Learn to code before you type!"
well that's ironic! read what your judging..

Code:
gameevent.Listen("entity_killed")

hook.Add("entity_killed", "\0", function(data)
	local victim = data.entindex_killed
	local attacker = data.entindex_attacker

	if (player.GetByID(victim):IsPlayer()) and (player.GetByID(attacker):IsPlayer()) then
		if (victim == attacker) then
			LocalPlayer():ChatPrint(player.GetByID(victim):Name() .. " killed themself")
		else
			LocalPlayer():ChatPrint(player.GetByID(victim):Name() .. " was killed by " .. player.GetByID(attacker):Name())
		end
	end
end)
Wow suchisgood! "LocalPlayer():ChatPrint(player.GetByID(victim):Na me() .. " was killed by " .. player.GetByID(attacker):Name())"
Quote Originally Posted by kingboy111 View Post
u r dumb . . .
You're need to go to you're english class,
Quote Originally Posted by MeepDarknessMeep View Post
terrible copied code
ive worked years on this project so that makes me emotional

)----^---:>
Quote Originally Posted by kingboy111 View Post
ive worked years on this project so that makes me emotional

)----^---:>
Years for a couple of lines, who's the dumb one know!
Quote Originally Posted by suchisgood View Post
You're need to go to you're english class,
Quote Originally Posted by suchisgood View Post
Years for a couple of lines, who's the dumb one know!
Quote Originally Posted by suchisgood View Post
You're need
Quote Originally Posted by suchisgood View Post
the dumb one know!
is this on purpose???
Quote Originally Posted by kingboy111 View Post
is this on purpose???
Unfortunately, it's probably not.
Quote Originally Posted by kingboy111 View Post
is this on purpose???
It's done by accident, Because you're big in trollin!
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us