Item Identifier that persists on reboot
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.
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;
        }​
In response to Erutixx ():
So I tried that and it seems to change after reboot. I run it write down the number and run it. Rebo...
1. You dont need to get CodeLock from BaseLock. You can just get net id from Baselock.
2. Its no way, because net ID is unique, and it didnt changing.