Scripting/Squirrel/Functions/Checkpoint.World: 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 "Checkpoint.Wor is very easy first u need. to give name to checkpoint function onScriptLoad() { array <- CreateCheckpoint(null, 0, Vector( 132.42, 674.34, 12.6543 ), RGB( 25...")
 
No edit summary
Line 1: Line 1:
Checkpoint.Wor is very easy first u need. to give name to checkpoint
This function changes the world of a checkpoint.


function onScriptLoad()
== Syntax ==
{
<pre>Checkpoint.World = 100</pre>
array <- CreateCheckpoint(null, 0, Vector( 132.42, 674.34, 12.6543 ), RGB( 255, 0,255 ), 2);
}


== Arguments ==
* ''int'' '''world''' - The world id


now change its world
== Example ==
 
<source lang="squirrel">
function onPlayerCommand( player, cmd,text )
function onPlayerCommand( player, cmd, text )
{
{
if ( cmd == "array" )
if ( cmd == "setcpworld" )
{
{
array.World = 100;
FindCheckpoint(0).World = 100;
}
}
}
}
</source>
=== Notes ===


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


== Related Functions ==


By VCMP Team
{{Scripting/Squirrel/Functions/Checkpoint_Functions}}

Revision as of 20:09, 23 April 2016

This function changes the world of a checkpoint.

Syntax

Checkpoint.World = 100

Arguments

  • int world - The world id

Example

function onPlayerCommand( player, cmd, text )
{
	if ( cmd == "setcpworld" )
	{
		FindCheckpoint(0).World = 100;
	}
}

Notes

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

Related Functions