why does this not work

ice cold

Active Member
Trusted Member
Member
Oct 24, 2016
606
912
43
Canada
for some reason this doesn't works

function On_PlayerKilled(DeathEvent) {
var attacker = DeathEvent.Attacker.Name;
var victim = DeathEvent.Victim.Name;
var weapon = DeathEvent.WeaponName;
PlayerTo.NoticeFrom("☠", "you killed " + victim)
}
 
for some reason this
C#:
function On_PlayerKilled(DeathEvent) {
var attacker = DeathEvent.Attacker.Name;
var victim = DeathEvent.Victim.Name;
var weapon = DeathEvent.WeaponName;
PlayerTo.NoticeFrom("☠", "you killed " + victim)
}
doesn't works

Java:
function On_PlayerKilled(DeathEvent) {
var attacker = DeathEvent.Attacker.Name;
var victim = DeathEvent.Victim.Name;
var weapon = DeathEvent.WeaponName;
PlayerTo.NoticeFrom("☠", "you killed " + victim)}

Replace

Java:
function On_PlayerKilled(DeathEvent) {
var attacker = DeathEvent.Attacker;
var victim = DeathEvent.Victim;
var weapon = DeathEvent.WeaponName;
attacker.NoticeFrom("☠", "you killed " + victim.Name)
}
 
Java:
function On_PlayerKilled(DeathEvent) {
var attacker = DeathEvent.Attacker.Name;
var victim = DeathEvent.Victim.Name;
var weapon = DeathEvent.WeaponName;
PlayerTo.NoticeFrom("☠", "you killed " + victim)}

Replace

Java:
function On_PlayerKilled(DeathEvent) {
var attacker = DeathEvent.Attacker;
var victim = DeathEvent.Victim;
var weapon = DeathEvent.WeaponName;
attacker.NoticeFrom("☠", "you killed " + victim.Name)
}
i hope thi wil work thanks btw