The script is simple.
Plus wouldn't heightCheck() start to get the server lagging if they're plenty of players on that server?
function makeGP()
{
if(isObject(groundPlane))
return;
new fxPlane(groundPlane) {
position = "0 0 -0.5";
rotation = "1 0 0 0";
scale = "1 1 1";
topTexture = "Add-Ons/Ground_Plate/plate.png";
bottomTexture = "Add-Ons/Ground_Plate/plate.png";
loopsPerUnit = "2";
scrollSpeed = "0.000000 0.000000";
color = "0 128 64 255";
rayCastColor = "128 128 128 255";
blend = "0";
additiveBlend = "0";
colorMultiply = "0";
isSolid = "1";
};
}
Add a check to see if the groundPlane is deleted or something; you could also use ifObject() rather than variables as well, it's much less messier and looks better.
I'm not trying to be a lugnut and subtly explain the script is stuff and talk about ternary operators on your post or anything, it's a decent idea. :-)