Your problem is not that you do not know how to program, but that you are chasing two rabbit (I don't know if you know such a saying ) Why did you move the simplest code into a separate function and file? Please do as written in my post. If it works, then do whatever you want. By lumping everything together, you are expanding the places where there can be inconsistencies and errors.

P.S: my code in CodeCallBack_PlayerKilled(...) { }