This is just my guess at this (for me) late hour.
Are you sure this code is loading after ULib?
You place it in Autorun. It might be running too early.
If you're using ULib, to guarantee ULib is loading it's functions, I'd use ULib modules folder to initialize this (or a separate file to initialize your ULib specific code files, like we do for ULX "addons/ulx/lua/ulib/modules/ulx_init.lua"