Scripting/Squirrel/Functions/Player.ShowMarkers: 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
mNo edit summary
mNo edit summary
 
Line 10: Line 10:


== Example ==
== Example ==
This function will hide markers for the player who writes the command.


<source lang=squirrel>
<source lang=squirrel>
This function will hide markers for the player who writes the command.
<pre>
function onPlayerCommand( player, cmd, wantedLevel )
function onPlayerCommand( player, cmd, wantedLevel )
{
{
Line 23: Line 23:
}
}
</source>
</source>
</pre>


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

Latest revision as of 14:08, 12 December 2018

Syntax

player.ShowMarkers = bool
  • player: player instance
  • bool: true (1) / false (0)

Description

This function will show or hide all markers of all players, for a player you set.

Example

This function will hide markers for the player who writes the command.

function onPlayerCommand( player, cmd, wantedLevel )
{
    if ( cmd == "hidemarkers" )
    {
        player.ShowMarkers = false;
        MessagePlayer( "You hidden all players' markers from map and radar", player );
    }
}

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.