what do you do if someone just throws a grenade and then switches teams without having the intend to kill their teammates it would still display the text
also this works for me you can try it out and see if it works as you intended it
init() { level thread onPlayerConnect(); } onPlayerConnect() { while(true) { level waittill("connected", player); player thread onSemtex(); } } onSemtex() { self endon("disconnect"); self waittill("spawned_player"); while(true) { self waittill("grenade_fire",grenade,weaponname); self thread checkGrenade(grenade, weaponname); } } checkGrenade(grenade, weaponname) { self endon("disconnect"); self endon("fixSemtex"); grenade endon("death"); oldTeam = self.team; while(true) { wait 0.05; if(self.team != oldTeam) { iPrintln("^7How sad..^3 " + self.name + "^7 tried to teamkill with a explosive! He failed miserably."); grenade delete(); self notify("fixSemtex"); } } }