Gr8 Posted December 6, 2014 Report Share Posted December 6, 2014 Map Marker With Player Names Anybody who puts a Map Marker on the map, it shows the name of the player. This Prevents abuse of spamming map with markers Create a file called GG_MapMarker.sqf in a folder called custom in your mission file. Paste this inside the GG_MapMarker.sqf // ============================================================================= // | GG_MapMarker.sqf [1.0] | // | Script adds player name to the created map marker | // | by Prodavec, thanks to Gunter Severloh, PvPscene, Maca | // ============================================================================= // ==================================== // | INCLUDES | // ==================================== // ==================================== // | DEFINITIONS | // ==================================== //#define MMT_DEBUG #define MMT_DIK_ESC 1 #define MMT_DIK_ENTER 28 #define MMT_DIK_KPENTER 156 #define MMT_SEARCHTIME 2 #define MMT_DISPLAY_MAP 12 #define MMT_DISPLAY_MARKER 54 #define MMT_CONTROL_MAP 51 #define MMT_CONTROL_MARKER 101 // ==================================== // | PRE-INIT | // ==================================== // ==================================== // | VARIABLES | // ==================================== // ==================================== // | FUNCTIONS | // ==================================== fnc_marker_keyUp_EH = { private ["_handled", "_display", "_dikCode", "_control", "_text"]; _display = _this select 0; _dikCode = _this select 1; _handled = false; if ((_dikCode == MMT_DIK_ENTER) || (_dikCode == MMT_DIK_KPENTER)) then { _control = _display displayCtrl MMT_CONTROL_MARKER; _text = ctrlText _control; if (_text == "") then { _text = format ["%1", name player]; } else { _text = format ["%1: %2", name player, _text]; }; _control ctrlSetText _text; _display displayRemoveAllEventHandlers "keyUp"; _display displayRemoveAllEventHandlers "keyDown"; }; _handled; }; fnc_marker_keyDown_EH = { private ["_handled", "_display", "_dikCode"]; _display = _this select 0; _dikCode = _this select 1; _handled = false; if (_dikCode == MMT_DIK_ESC) then { _display displayRemoveAllEventHandlers "keyUp"; _display displayRemoveAllEventHandlers "keyDown"; }; _handled; }; fnc_map_mouseButtonDblClick_EH = { private ["_display"]; disableUserInput true; // Scheduled environment (time + MMT_SEARCHTIME) spawn { disableSerialization; while {time < _this} do { _display = findDisplay MMT_DISPLAY_MARKER; if !(isNull _display) exitWith { _display displayAddEventHandler ["keyUp", "_this call fnc_marker_keyUp_EH"]; _display displayAddEventHandler ["keyDown", "_this call fnc_marker_keyDown_EH"]; }; }; disableUserInput false; }; true; }; // ==================================== // | MAIN | // ==================================== waitUntil {sleep 0.1; !isNull (findDisplay MMT_DISPLAY_MAP)}; ((findDisplay MMT_DISPLAY_MAP) displayCtrl MMT_CONTROL_MAP) ctrlAddEventHandler ["mouseButtonDblClick", "call fnc_map_mouseButtonDblClick_EH"]; In your Init.sqf Find this code: if (!isDedicated) then { }; add this before the }; execVM "custom\GG_MapMarker.sqf"; Credits: Prodavec Maca Gunter Severloh PvPscene F507DMT, Dew, SideShowFreak and 1 other 4 Link to comment Share on other sites More sharing options...
Logan Posted December 6, 2014 Report Share Posted December 6, 2014 So basically you changed the name of the script and added your name to the thanks to to a script that was leaked from Maca's GitHub, good job! Link to comment Share on other sites More sharing options...
Gr8 Posted December 6, 2014 Author Report Share Posted December 6, 2014 So basically you changed the name of the script and added your name to the thanks to to a script that was leaked from Maca's GitHub, good job! It clearly says who its made by, and no its not leaked, its been shared to the community in many posts Link to comment Share on other sites More sharing options...
DimitriPokki Posted December 6, 2014 Report Share Posted December 6, 2014 screen pleas Link to comment Share on other sites More sharing options...
Gr8 Posted December 6, 2014 Author Report Share Posted December 6, 2014 screen pleas added to the post Link to comment Share on other sites More sharing options...
seeker619 Posted January 24, 2015 Report Share Posted January 24, 2015 So basically you changed the name of the script and added your name to the thanks to to a script that was leaked from Maca's GitHub, good job! you wanna be troll.. what a dick munch :D Link to comment Share on other sites More sharing options...
ElDubya Posted February 9, 2015 Report Share Posted February 9, 2015 Do you know if these will show for newly joined players who joined AFTER the map was marked? Link to comment Share on other sites More sharing options...
Gr8 Posted February 9, 2015 Author Report Share Posted February 9, 2015 Do you know if these will show for newly joined players who joined AFTER the map was marked? I am not sure about that, I have yet to test it. Link to comment Share on other sites More sharing options...
F507DMT Posted March 28, 2015 Report Share Posted March 28, 2015 How make log, who delete markers? help pls!? Link to comment Share on other sites More sharing options...
Halvhjearne Posted March 28, 2015 Report Share Posted March 28, 2015 In your Init.sqf add this to the very bottom: execVM "custom\GG_MapMarker.sqf"; if you add this to the buttom of the init it will start on the server aswell, it should be added within this block: if (!isDedicated) then { or you can add this in the script: if (isServer)exitWith{}; How make log, who delete markers? help pls!? you would have to use a public vairable and send it to the server, else it will be logged on the client (wich is irrelevant) Link to comment Share on other sites More sharing options...
Caveman1 Posted March 29, 2015 Report Share Posted March 29, 2015 Pretty cool. Thank you. Link to comment Share on other sites More sharing options...
Guest Posted March 31, 2015 Report Share Posted March 31, 2015 That's nice.. Now i know which script it is, this can be re-done, so the Text equals the Marker Type. möhö this will be awesome... Link to comment Share on other sites More sharing options...
(HPG) Heavy Posted July 21, 2015 Report Share Posted July 21, 2015 Can this be used in A3 Epoch? If not, is there another solution available? Many thanks! Link to comment Share on other sites More sharing options...
pr0dukt Posted July 21, 2015 Report Share Posted July 21, 2015 Try it on A3 epoch. Might work :) Link to comment Share on other sites More sharing options...
(HPG) Heavy Posted July 21, 2015 Report Share Posted July 21, 2015 Try it on A3 epoch. Might work :) Seems to be working. Added..... waitUntil {!isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])}; waitUntil {isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])}; ..at the top. Not sure if its needed but script is working. Relogged, checked map functions/menus and clicks in all channels, seems normal. Cool lil script, many thanks Gr8! Link to comment Share on other sites More sharing options...
pr0dukt Posted July 21, 2015 Report Share Posted July 21, 2015 Seems to be working. Added..... waitUntil {!isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])}; waitUntil {isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])}; ..at the top. Not sure if its needed but script is working. Relogged, checked map functions/menus and clicks in all channels, seems normal. Cool lil script, many thanks Gr8! Great News, But Gr8's Banned so he cant edit the post to add the A3 Info. I will try it on my A3 Server. Link to comment Share on other sites More sharing options...
(HPG) Heavy Posted July 21, 2015 Report Share Posted July 21, 2015 Great News, But Gr8's Banned so he cant edit the post to add the A3 Info. I will try it on my A3 Server. That sux. Yeah, let me know how things work. Seems to be working for other players... Link to comment Share on other sites More sharing options...
ElDubya Posted July 21, 2015 Report Share Posted July 21, 2015 How make log, who delete markers? help pls!? If you end up figuring this out, could you share please? :) Link to comment Share on other sites More sharing options...
chi Posted August 1, 2015 Report Share Posted August 1, 2015 Great Script !! Adding Now !! ;-) Link to comment Share on other sites More sharing options...
flow0815 Posted August 12, 2015 Report Share Posted August 12, 2015 Not working for me on A3 with infi (due to i disabled player marker check). Yes i know it is a2 but you mentioned it would work in a3 epoch Link to comment Share on other sites More sharing options...
Halvhjearne Posted August 12, 2015 Report Share Posted August 12, 2015 Not working for me on A3 with infi (due to i disabled player marker check). Yes i know it is a2 but you mentioned it would work in a3 epoch it does, but you will need to allow "keyUp", "keyDown" and "mouseButtonDblClick" event handlers. Link to comment Share on other sites More sharing options...
Nekuan Posted October 15, 2015 Report Share Posted October 15, 2015 Can anyone tell me what needs to be changed in infistar to make this work? If its the same thing as in the post above about arma 3 then care to elaborate? :x Link to comment Share on other sites More sharing options...
SmokeyBR Posted October 16, 2015 Report Share Posted October 16, 2015 make a search on the "AH.sqf" for the event handlers Halvhjearne said anything that removes eventhandler erase it. carefull thou u dont wanna break the antihack. Link to comment Share on other sites More sharing options...
JonasF Posted May 15, 2016 Report Share Posted May 15, 2016 I really want this script to work, have trouble with people marking like crazy on the map but Im afraid to break my infistar. Could anyone be nice to explain how to change in infistar for it to work? Its an arma 2 dayz server I want it to work on... Link to comment Share on other sites More sharing options...
theduke Posted May 17, 2016 Report Share Posted May 17, 2016 On 5/15/2016 at 5:16 PM, JonasF said: I really want this script to work, have trouble with people marking like crazy on the map but Im afraid to break my infistar. Could anyone be nice to explain how to change in infistar for it to work? Its an arma 2 dayz server I want it to work on... just make a backup of your infistar files that you plan to edit before editing them. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now