Jump to content

[AGN] "This player is tagged friendly" spam fix


Darihon

Recommended Posts

Hello,

My players were complaining about a message getting spammed in the traderzones, so I changed the code a little bit. I know, it is a simple edit, but I wanted to show it for the 'beginners' under us.

Step 1:

Open up your 'agn_SafeZoneCommander.sqf' using a programm which can edit text. Eg. Notepad++

Step 2:

Scroll down untill you reach the text: "if ( AGN_safeZoneMessages ) then { systemChat ("[AGN] This player is tagged friendly, you have access to this players bag") };". Located at line 170.

Step 3:

Add under it: "sleep 60;". The "60" is customisable by your own likings. Remind: The time is in seconds.

Final result:

if ( AGN_safeZoneMessages ) then { systemChat ("[AGN] This player is tagged friendly, you have access to this players bag") };

sleep 60;

Link to comment
Share on other sites

Hello,

My players were complaining about a message getting spammed in the traderzones, so I changed the code a little bit. I know, it is a simple edit, but I wanted to show it for the 'beginners' under us.

Step 1:

Open up your 'agn_SafeZoneCommander.sqf' using a programm which can edit text. Eg. Notepad++

Step 2:

Scroll down untill you reach the text: "if ( AGN_safeZoneMessages ) then { systemChat ("[AGN] This player is tagged friendly, you have access to this players bag") };". Located at line 170.

Step 3:

Add under it: "sleep 60;". The "60" is customisable by your own likings. Remind: The time is in seconds.

Final result:

if ( AGN_safeZoneMessages ) then { systemChat ("[AGN] This player is tagged friendly, you have access to this players bag") };

sleep 60;

works like a charm, thanks for this

Link to comment
Share on other sites

Hm, then I am to blind to see that maybe ;))

For me it's in the while loop which does the checks and closes the dialog if someone is not allowed to have a look into this. And if the condition 'if ( _skip && _if ) then {' gets true in this while loop we wait 60 seconds which stops the loop for 60 seconds until new checks will take place and dialog closing and so on. Yes, in the if condition is only the message but the while loop stops there for this time if I am not totally blind now.

Where is my error here? Hm ;)) To many brackets perhaps.

Link to comment
Share on other sites

Humm...I got the script working flawlessly for all the trader zones but now I've got another problem.  My snap building script is buggy.  The snap building still works, I can place an object to build and the "toggle snapping" appears with the scroll wheel but now, using the space bar does nothing nor does the page up or down?  I can't "build" the object when hitting the space bar...or clicking the toggle snapping....it does nothing.  Anyone else having this issue?  Any ideas how to fix?  Also, I am using the admin tools 1.7 and they worked great before the AGN script.  To TP all I had to do was hit "F1", it opens the map, then I left click where I want to TP to.  Now, since I added the AGN script, I hit "F1" and I get the arma2 unit commands that pop up like "Move out, Call support, Regroup" etc...  Same thing with the space bar.  Any ideas what the problem is or how to fix?

 

Thanks

Link to comment
Share on other sites

Humm...well i tried that and it still does the same thing.  When pressing "F1" to use the TP function for admin tools 1.7, the arma commands still popup in top left corner and I have to hit "backspace" before I can left click on map to TP; its annoying:(

 

The build snapping also not working.  I can open backpack, right click on object in inventory, press space to build object.  The "toggle snapping" pops up for scroll menu but pressing enter, space bar or left clicking does nothing and the "page up/page down" isn't working to raise/lower object.  So, I'm lost, have no idea what the issue is.  I removed the AGN ZoneCommander script re upped my pbo to server, and build snapping, all its functions work great and also, no arma command popups when pressing "F1" to TP

Link to comment
Share on other sites

Hmm, really strange. Try the AGN script without my edit. See if that works.

 

I have it running on my server and there are no problems with snap building.

Yeah, I tried it without the edit, still does same thing.  I'm wondering if there might be a conflict with the execVM calll order because I have more than 1 execVM at the bottom of my .init file.  I'll try moving it around at the bottom and see if it changes anything

Link to comment
Share on other sites

Ok, I got it working but it actually wasnt the AGN script causing the issue...it was the debug monitor I was using.  I removed the debug script and AGN and build snapping work great and no more arma command popups when pressing F1.  Thats odd though...

 

I'm no scripting expert but I'm sure it has something to do with the dikcode??

 

dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
 
    if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};

 

I can see where the dayz_spaceinterrupt function might interfere with using the space bar for snap building but not sure what could cause the arma commands to popup when using F1?  Any ideas?

Link to comment
Share on other sites

You need to erase this dikCode. This isn't the proper way to do it anymore. You need to add playerstats.sqf to your mission folder. Then find the 2 places dayz_spaceinterrupt which calls the playerstats.sqf and change them to wherever you put it. Then edit playerstats.sqf to your liking. Otherwise it's going to conflict with a lot of stuff

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...