Skip to main content

CanChangeCode

Usage​

  • Called when a player tries to change the code on a code lock
  • Return false to prevent player from changing lock code

Examples​

Prevent code change for non-admin
object CanChangeCode(BasePlayer player, CodeLock codeLock, string newCode, bool isGuestCode)
{
if (!player.IsAdmin)
{
return false;
}

return null;
}