From Liberty Unleashed Wiki
This function adds a new sphere to the game for the player specified.
- sphere CreateClientSphere( Vector pos, float radius, player plr )
- sphere CreateClientSphere( Vector pos, float radius, Colour col, player plr )
- sphere CreateClientSphere( Vector pos, float radius, int red, int green, int blue, player plr )
- pos - The location the sphere will spawn at
- radius - The radius of the sphere
- plr - The player to spawn the sphere for
- col - The colour of the sphere as a Colour object. If no colour is used the sphere will default to blue
- red, green, blue - The colour of the sphere as separate RGB values
This will create a client sphere around the player when they type '/sphere'.
- function onPlayerCommand( pPlayer, szCommand, szText )
- if ( szCommand == "sphere" )
- CreateClientSphere( pPlayer.Pos, 5.00, Colour( 0, 0, 255 ), pPlayer );
- return 1;
The event onPlayerCommand was used in this example. More info about this in the corresponding page.