Darihon Posted April 25, 2014 Report Share Posted April 25, 2014 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; FoRcE72 1 Link to comment Share on other sites More sharing options...
FoRcE72 Posted April 26, 2014 Report Share Posted April 26, 2014 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 More sharing options...
Darihon Posted April 26, 2014 Author Report Share Posted April 26, 2014 Glad that I was able to help you! Link to comment Share on other sites More sharing options...
jahangir13 Posted April 27, 2014 Report Share Posted April 27, 2014 Does that mean, if a friend is nearby, then it takes 60 seconds in which others can still access your backpack until the next check takes place?? Link to comment Share on other sites More sharing options...
Fully Posted April 27, 2014 Report Share Posted April 27, 2014 It is just the message that is being told to sleep for 60 seconds in the example above =) To stop the console spam =) Link to comment Share on other sites More sharing options...
Darihon Posted April 27, 2014 Author Report Share Posted April 27, 2014 Like Fully said. I just put a 60 seconds delay on the message, since it was getting spammed when you looked at a friendly guy. Nothing hard. Link to comment Share on other sites More sharing options...
jahangir13 Posted April 27, 2014 Report Share Posted April 27, 2014 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 More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 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 More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 Did you install AGN Safecommander or did you edit it with my small edit (sleep 60;)? Link to comment Share on other sites More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 Did you install AGN Safecommander or did you edit it with my small edit (sleep 60;)? I edited it using the sleep 60 Link to comment Share on other sites More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 Can you send me your agn_SafeZoneCommander.sqf using pastebin.com? Link to comment Share on other sites More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 Can you send me your agn_SafeZoneCommander.sqf using pastebin.com? Here is my .sqf file: http://pastebin.com/RZh62jTr Link to comment Share on other sites More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 change "sleep 60;" to sleep 60; without the "". Link to comment Share on other sites More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 change "sleep 60;" to sleep 60; without the "". Ok thanks ill try that. This should stop the arma 2 commands from popping up and allow the snap build script to work again? Link to comment Share on other sites More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 Yes, not sure why the other addons started to have problems. Link to comment Share on other sites More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 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 More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 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. Link to comment Share on other sites More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 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 More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 Hmm, so it isn't my edit. Do you what you want to do and keep me up to date. Link to comment Share on other sites More sharing options...
velvetchaos381 Posted May 2, 2014 Report Share Posted May 2, 2014 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 More sharing options...
Darihon Posted May 2, 2014 Author Report Share Posted May 2, 2014 I have no idea, I'm not a coding expert involving arma. I can code C++ a bit and I can read most of that script, but I can't see any errors. Link to comment Share on other sites More sharing options...
DangerRuss Posted May 5, 2014 Report Share Posted May 5, 2014 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 More sharing options...
DangerRuss Posted May 5, 2014 Report Share Posted May 5, 2014 ~Edit~ This replaces the built in debug monitor for epoch. Insert toggles it on and off and it will also disappear on its own after a few seconds Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now