There are sometimes variables and functions in script help which do not exist. To perform the square root operation, take a value to the power of 0.5. For example, if you wanted to have an identical call as to what is found in script help, put the following code into a weaponscript called Math:
PHP Code:
public function sqrt(a) {
return a ^ 0.5;
}
//#CLIENTSIDE
public function sqrt(a) {
return a ^ 0.5;
}
By creating these into a weaponscript called Math, the name Math becomes global can then call Math.sqrt(number) from anywhere.