Scripting/Squirrel/Functions/Checkpoint.Owner: 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
No edit summary
No edit summary
 
Line 19: Line 19:


=== Notes ===
=== Notes ===
Call [[onPlayerCommand]] and function [[CreateCheckpoint] were used in this example. More info about them in the corresponding pages.
Call [[onPlayerCommand]] and function [[Scripting/Squirrel/Functions/CreateCheckpoint|CreateCheckpoint]] were used in this example. More info about them in the corresponding pages.


== Related Functions ==
== Related Functions ==

Latest revision as of 17:08, 3 August 2017

This function gets the Owner of a checkpoint.

Syntax

Checkpoint.Owner

Example

Note: If there is no Owner set for the Checkpoint this function will return: (null : 0x0000000000000000)

function onPlayerCommand(player, command, arguments)
{
	if(cmd == "playercp")
	{
		CheckpointTest <- CreateCheckpoint(player, 0, false, player.Pos, RGB(255, 0, 255), 2);
		ClientMessage("[#ffffff]Checkpoint Owner: " + CheckpointTest.Owner,player,255,255,255);
	}
	return 1;
}

Notes

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

Related Functions