Map marker

Map marker

« posted: Jan 04, 2022, 11:34 PM »
hello @agentrev, happy 2022 for all. I would like to ask for a help on the fn_markerlogPvar.sqf file all the files you mentioned on reddit https://www.reddit.com/r/armadev/comments/f6e6my/is_there_a_way_to_disable_map_markers_for_all/ was only on my mission then I changed the markerlogpvar like this:


Code: [Select]
if (isServer) then
{
_value params
[
["_markerName","",[""]],
["_markerAction","",["DELETED"]], // "ADDED" or "DELETED"
["_actionPlayerName","",[""]],
["_actionPlayerUID","",[""]],
["_markerType","",[""]],
["_markerColor","",[""]],
["_markerPos",[0,0,0],[[]],3],
["_markerText","",[""]],
["_markerChannel",-1,[0]] // 0=Global, 1=Side, 2=Command, 3=Group, 4=Vehicle
];

if (_markerAction == "ADDED" && _markerChannel != 0) then
{
deleteMarker _markerName;
};
};

but the tag with the text I put on the map in the Global function is not being deleted, what am I doing wrong? I would like both the global and the side to be deleted, the players are talking a lot of nonsense on the map, since I disabled the global chat via BEC
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2650

Re: Map marker

« Reply #1 posted: Jan 05, 2022, 07:14 PM »
Try

Code: [Select]
if (_markerAction == "ADDED" && _markerChannel in [0,1]) then

Re: Map marker

« Reply #2 posted: Jan 05, 2022, 08:30 PM »
thanks for answering. but unfortunately it still didn't work, the tag was not deleted, I tried all sides


Code: [Select]
if (isServer) then
{
_value params
[
["_markerName","",[""]],
["_markerAction","",["DELETED"]], // "ADDED" or "DELETED"
["_actionPlayerName","",[""]],
["_actionPlayerUID","",[""]],
["_markerType","",[""]],
["_markerColor","",[""]],
["_markerPos",[0,0,0],[[]],3],
["_markerText","",[""]],
["_markerChannel",-1,[0]] // 0=Global, 1=Side, 2=Command, 3=Group, 4=Vehicle
];

if (_markerAction == "ADDED" && _markerChannel in [0,1]) then
{
deleteMarker _markerName;
};
};


  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2650

Re: Map marker

« Reply #3 posted: Jan 05, 2022, 08:34 PM »
I tried it on my dedicated server and it works perfectly, I don't understand what you're doing wrong

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2016 A3Wasteland.com *
// ******************************************************************************************
// @file Name: fn_markerLogPvar.sqf
// @file Author: AgentRev, based on code by Killzone Kid: http://killzonekid.com/arma-scripting-tutorials-whos-placingdeleting-markers/

if (isNil "A3W_markerLog_logArray" || {!(A3W_markerLog_logArray isEqualType [])}) then
{
A3W_markerLog_logArray = [];
};

params ["", ["_value",[],[[]]]];

_logEntry = [serverTime];
_logEntry append _value;

A3W_markerLog_logArray pushBack _logEntry;
A3W_markerLog_logArray deleteRange [0, count A3W_markerLog_logArray - 100]; // 100 entries max.

if (isServer) then
{
_value params
[
["_markerName","",[""]],
["_markerAction","",[""]], // "ADDED" or "DELETED"
["_actionPlayerName","",[""]],
["_actionPlayerUID","",[""]],
["_markerType","",[""]],
["_markerColor","",[""]],
["_markerPos",[0,0,0],[[]],3],
["_markerText","",[""]],
["_markerChannel",-1,[0]] // 0=Global, 1=Side, 2=Command, 3=Group, 4=Vehicle
];

if (_markerAction == "ADDED" && _markerChannel in [0,1]) then
{
deleteMarker _markerName;
};
};

Re: Map marker

« Reply #4 posted: Jan 05, 2022, 08:48 PM »
A thousand apologies agentrev, the error was mine, because I thought I would have to remove all the programming you did in the fn_markerlogpvar.sqf file leaving only:

Code: [Select]
if (isServer) then
{
_value params
[
["_markerName","",[""]],
["_markerAction","",[""]], // "ADDED" or "DELETED"
["_actionPlayerName","",[""]],
["_actionPlayerUID","",[""]],
["_markerType","",[""]],
["_markerColor","",[""]],
["_markerPos",[0,0,0],[[]],3],
["_markerText","",[""]],
["_markerChannel",-1,[0]] // 0=Global, 1=Side, 2=Command, 3=Group, 4=Vehicle
];

if (_markerAction == "ADDED" && _markerChannel in [0,1]) then
{
deleteMarker _markerName;
};
};

thanks for your help