View Single Post
  #2  
Old 07-22-2014, 02:24 PM
PiX PiX is offline
Registered User
PiX's Avatar
Join Date: Jul 2014
Posts: 9
PiX will become famous soon enough
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 
0.5;
}
//#CLIENTSIDE
public function sqrt(a) {
  return 
0.5;

By creating these into a weaponscript called Math, the name Math becomes global can then call Math.sqrt(number) from anywhere.
Reply With Quote