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!!!!!
Originally Posted by kingboy111
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!
Originally Posted by suchisgood
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!!!
Originally Posted by kingboy111
ya but it works fine and for a gamemode like ttt, this is practically a traitor detector!!!
Traitor detector when your dead?
Originally Posted by suchisgood
Traitor detector when your dead?
are you dumb? whenever someone dies by another player, or themself, it prints in chat.
Originally Posted by kingboy111
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!
Originally Posted by suchisgood
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())"
u r dumb . . .
Originally Posted by kingboy111
u r dumb . . .
You're need to go to you're english class,
terrible copied code
Originally Posted by MeepDarknessMeep
terrible copied code
ive worked years on this project so that makes me emotional
)----^---:>
Originally Posted by kingboy111
ive worked years on this project so that makes me emotional
)----^---:>
Years for a couple of lines, who's the dumb one know!
Originally Posted by suchisgood
You're need to go to you're english class,
Originally Posted by suchisgood
Years for a couple of lines, who's the dumb one know!
Originally Posted by suchisgood
You're need
Originally Posted by suchisgood
the dumb one know!
is this on purpose???
Originally Posted by kingboy111
is this on purpose???
Unfortunately, it's probably not.
Originally Posted by kingboy111
is this on purpose???
It's done by accident, Because you're big in trollin!