Scripting/Squirrel/Functions/Sphere.Pos: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "allows you to check Sphere's color in RGB == Syntax == <pre>Sphere.Pos</pre> == Example == <source lang=D> function onSphereEntered( player, Sphere ) { MessagePlayer(...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
allows you to check Sphere's color in RGB
allows you to check Sphere's Position.


== Syntax ==
== Syntax ==
Line 11: Line 11:
function onSphereEntered( player, Sphere )
function onSphereEntered( player, Sphere )
{
{
   MessagePlayer( "Sphere Pos X: "+ Sphere.Pos.x +", Y: "+ Sphere.Pos.y +", Z: "+ Sphere.Pos.z , player );
   MessagePlayer( "you have entered in a Sphere, Sphere Pos X: "+ Sphere.Pos.x +", Y: "+ Sphere.Pos.y +", Z: "+ Sphere.Pos.z , player );
}
}
</source>
</source>
=== Notes ===
=== Notes ===
  [[http://wiki.vc-mp.org/wiki/OnSphereEntered|''onSphereEntered'']] was used in this example..
  [[onSphereEntered]] was used in this example..
 
 
== Related Functions ==
 
{{Scripting/Squirrel/Functions/Sphere_Functions}}

Latest revision as of 16:59, 15 March 2016

allows you to check Sphere's Position.

Syntax

Sphere.Pos


Example

function onSphereEntered( player, Sphere )
{
   MessagePlayer( "you have entered in a Sphere, Sphere Pos X: "+ Sphere.Pos.x +", Y: "+ Sphere.Pos.y +", Z: "+ Sphere.Pos.z , player );
}

Notes

onSphereEntered was used in this example..


Related Functions