How to use data files?Solved
void OnEntityDeath(BaseCombatEntity entity, HitInfo info)
        {
            if (entity == null | info == null)
                return;

            var player = info?.InitiatorPlayer;

            if (entity.ShortPrefabName == "heavyscientist")
            {
                Puts("Heavy Scientist killed");
            }
            if (entity is ScientistNPC)
            {
                Puts("Scientist was killed");
            }
            if (entity.ShortPrefabName == "murderer")
            {
                Puts("Murderer was killed");
            }
            if (entity.ShortPrefabName == "scarecrow")
            {
                Puts("Scarecrow killed");
            }
        }

I was told that i should use a data file to store how many kills of each type of npc a player has. I am not sure on how to do this. Can anyone help me?

how do i create a part for each individual player?
Interface.Oxide.DataFileSystem.ReadObject<type>(filename); // Read/Create file
Interface.Oxide.DataFileSystem.WriteObject(filename, obj); // Save file

You can store player data in dictionay by steamid

Locked automatically