From Quake Wiki
float(string s) checkextension = #99;
Check if (cvar("pr_checkextension")) before calling this, this is the only guaranteed extension to be present in the extension system, it allows you to check if an extension is available, by name, to check for an extension.
Use QC code like this:
if (cvar("pr_checkextension")) if (checkextension("DP_SV_SETCOLOR")) ext_setcolor = TRUE;
It is recommended this code be placed in worldspawn or a worldspawn called function somewhere, from then on you can check ext_setcolor to know if that extension is available.