Scripting/Squirrel/Functions/Game/CreateMarkerForPlayer

From VC-MP Wiki

Jump to: navigation, search

This function creates a marker, visible not for all players, but only for one or some selected.

Syntax

CreateMarker( pPlayer, intID, Vector vPos )

Arguments

  • pPlayer - The player
  • ID - The ID of the marker/mini map's icon. Set 1-39
  • vPos - The vector, where the marker will be created

Example

Now we will create a marker. The marker will be only visible to this one, who types /c playermarker. The marker pos will be the same as the player pos.

function onPlayerCommand( player, cmd, text )
{
	if ( cmd == "playermarker" )
	{
             local Pos = player.Pos;
             CreateMarkerForPlayer( player, 15, Vector( Pos.x, Pos.y, Pos.z ) );
     }
}

Notes

Look here for some general notes about markers. The call onPlayerCommand was used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
squirrel scripting