QuakeWiki
October 1, 2012

Checkextension builtin

Defs

float(string s) checkextension = #99;

Description

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.

Example Code

	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. If it turns out true, then you can useDP_SV_SETCOLOR.