Scripting/Squirrel/Functions/Sphere.Remove
This wiki is using an old backup from 2020
Some information may be old/missing
allows you to Remove a Sphere.
Syntax
Sphere.Remove()
Example
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "removesphere" )
{
if ( !text ) MessagePlayer( "SYNTAX: /"+cmd+" [Sphere ID]", player );
else
{
local Sphere = FindSphere( text.tointeger() );
if ( !IsNum ) MessagePlayer( "Sphere ID must be in numbers", player );
else if ( !Sphere ) MessagePlayer( "Sphere "+text+" is not created yet.", player );
else
{
Sphere.Remove();
MessagePlayer( "you removed the sphere ID: "+ Sphere.ID, player );
}
}
}
}
Notes
[onPlayerCommand] was used in this example..