DayZ
DayZ Humanity
Pepkilz 23 Jul, 2023 @ 8:27pm
Dogtags Init.c Sample
include both additions to init.c from each mod, then mody your
override Dogtag_Base EquipDogtag(PlayerBase player)
class with the following:

//? this method is called when players respawn/spawn/login override Dogtag_Base EquipDogtag(PlayerBase player) { array<string> tags = {"Dogtag_Survivor", "Dogtag_Hero", "Dogtag_Bandit"}; // list of available dogtag variants Dogtag_Base tag; if (!player.HasDogtag()) // check if the player has a tag already { // create a new tag is the player doesn't have one int slotId = InventorySlots.GetSlotIdFromString("Dogtag"); // get humanity points, then convert it to levels Bandit>> Lvl -4 (0=bambi) Lvl 4 <<Hero int h= m_humanity.GetHumanity(player.GetIdentity().GetPlainId()); int humanity_level = m_humanity.determainLevel(h); // check humanity level and assign proper dogtag if (humanity_level < 0) { return player.GetInventory().CreateAttachmentEx("Dogtag_Bandit", slotId); // give the player a bandit dogtag } else if(humanity_level > 0) { return player.GetInventory().CreateAttachmentEx("Dogtag_Hero", slotId); // give the player a bandit dogtag } else { return player.GetInventory().CreateAttachmentEx("Dogtag_Survivor", slotId); // give the player a random dogtag variant } } return null; }