Scripting/Squirrel/Functions/CreateSphere

From Vice City Multiplayer
Revision as of 16:01, 19 June 2015 by NE.CrystalBlue (talk | contribs) (Created page with "This function will create a sphere. == Syntax == '''1''' <pre>CreateSphere( player, world, pos, rgb, radius )</pre> == Arguments == '''1''' * ''int'' '''player''' - The pl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will create a sphere.

Syntax

1

CreateSphere( player, world, pos, rgb, radius )

Arguments

1

  • int player - The player to stream this sphere to. If player is null it will be shown to everyone
  • int world - The world id
  • Vector pos - The sphere pos
  • int rg - The sphere color
  • int radius - The diameter of the sphere

Example

The following example create a sphere

function onPlayerCommand( player, cmd, text );
{
 if ( cmd == "sph" )
 {
  CreateSphere( player, player.World, player.Pos, RGB(255, 0, 255), 2);
 }
}

Notes

Call onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions