I am trying to maintain a list of certain code lock to run additional code when the CanUseLockedEntity is called, but I want to validate it is a code lock that I have preselected. I tried GetInstanceId() but that changed on reboot.
Item Identifier that persists on reboot
Use NET ID (Network ID, qnique)
entity.net.ID // its uint value So I tried that and it seems to change after reboot. I run it write down the number and run it. Reboot the server go click the same door and get a different number.
bool CanUseLockedEntity(BasePlayer player, BaseLock baseLock)
{
BroadcastMessage("Oh Oh");
CodeLock codelock = baseLock as CodeLock;
BroadcastMessage(player.displayName + " jsut touched me in the " + codelock.net.ID);
return true;
}