Latter question is a quick answer, it's return a vector with RGB components - you can add them together to get an overall light level.
Basic way to access the function
1) Download the
DarkPlaces mod from
https://icculus.org/twilight/darkplaces/download.html
2) Look at the QC that comes with the mod and find dpextensions.qc
3) Open dpextensions.qc and search for the code that defines getlight
4) Copy that code and add it to the bottom of your mod's defs.qc file.
You can repeat steps 3 and 4 for each DP extension you would like to use. Or if you prefer the kitchen sink approach, just add the entire dpextensions.qc file to your mod.