Player.Marker

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sets/returns the players radar marker.

Syntax

  1. bool player.Marker
  1. player.Marker = bool value

Arguments

  • value - A boolean saying if the radar marker is enabled/disabled.

Example 1. Returning

This will tell the player if their marker is being shown or not when they type '/marker'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "marker" )
  5. {
  6. MessagePlayer( "Marker being shown - " + pPlayer.Marker, pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

Example 2. Setting

This will hide the player's marker when they type '/marker2'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "marker2" )
  5. {
  6. pPlayer.Marker = false;
  7. }
  8. return 1;
  9. }
  10.  

Notes

The function MessagePlayer and event onPlayerCommand were used in these examples. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox