RevealPlayerMap
Shows one player the whole world map, without the fog of war.
For a server that keeps the game’s fog of war over the parts of the map a player has not walked (map_fog = true under
[ui] in server.toml) and lifts it for someone - a map bought, a quest done. Without the fog (the default) every
player’s map shows everything from the start and this changes nothing. It works one way: a revealed map cannot be
clouded again, and a player who comes back in a new game has the fog again, so call it again (from OnPlayerSpawn,
say). A player still loading gets the whole map as soon as they are in the world. "places" (or "all") also asks the
player’s game to find the places of the level, so the revealed map shows their names
(what a player discovered); no player’s game does that part in this version, and the map is
revealed without the names.
Syntax
Section titled “Syntax”RevealPlayerMap(pid [, what])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
what |
string | nil | "places" or "all" to ask for the places too; anything else, or nothing, reveals the map alone (optional) |
Returns
Section titled “Returns”boolean - false when there is no such player
Example
Section titled “Example”-- a map from the cartographer for 20 Groschenif cmd == "/buymap" and GetPlayerMoney(pid) >= 20 then GivePlayerMoney(pid, -20) RevealPlayerMap(pid) SendClientMessage(pid, COLOR_WHITE, "The map shows the whole land now.") return trueendSee also
Section titled “See also”OnPlayerSpawn · CreateMarker · the Compass markers group of the index
