Jump to content
  • 0

Stop flood of messages AGN Safe Zone sends


DarkRanger

Question

Hi,

 

I'm using AGN's Safe Zone Commander ( http://pastebin.com/raw.php?i=z6Vbcp8G ) which includes anti backpack theft, for the most part, the script is fantastic, but it does do this annoying flood of messages.

 

"[AGN] This player is tagged friendly, you have access to this players bag"

 

Basically this fills the bottom left of the screen and doesnt stop if you continue to look at another player that is friendly. From what I can test, the other two messages relating to backpacks, such as;

 

"[AGN] You cannot open your gear at this time as you have looked at a player in the last 5 seconds."

"[AGN] Anti Backpack Stealing - Redirecting you to your own gear!"

 

Do not flood and work as intended. 

 

Can someone look at the code and tell me what I can do to limit the amount of that single message from appearing?

 

Thanks

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

just go to line 164, it looks like this:

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

 

and delete the message [AGN] This player is tagged friendly, you have access to this players bag

Link to comment
Share on other sites

  • 0

just delete the message then as barci already posted!? that will work 100% and will only remove that message not all of the maybe usefull and working messages too.

if you don't know what to do here a simple fix, replace:

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

with

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

so it will only disable that message!

if you want just delete the whole line..or add a fix to only display the message once but I will not tell you how to do that now   :P

Link to comment
Share on other sites

  • 0

just delete the message then as barci already posted!? that will work 100% and will only remove that message not all of the maybe usefull and working messages too.

if you don't know what to do here a simple fix, replace:

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

with

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

so it will only disable that message!

if you want just delete the whole line..or add a fix to only display the message once but I will not tell you how to do that now   :P

tease

Link to comment
Share on other sites

  • 0

Where are you supposed to call this script from? The install says "The very bottom of the init.sqf" but there's a line at the top of the script: 

 

if ( isDedicated || isServer ) exitWith {diag_log ( "Error: Attempting to start AGN products on a server where it should not be!" );};

 

clearly states that it should be started from if(!isDedicated) which is not the bottom of the init file. The thing is though that it seems to work. Does exitWith kick out of the script? 

Link to comment
Share on other sites

  • 0

Where are you supposed to call this script from? The install says "The very bottom of the init.sqf" but there's a line at the top of the script: 

 

if ( isDedicated || isServer ) exitWith {diag_log ( "Error: Attempting to start AGN products on a server where it should not be!" );};

 

clearly states that it should be started from if(!isDedicated) which is not the bottom of the init file. The thing is though that it seems to work. Does exitWith kick out of the script? 

Link to comment
Share on other sites

  • 0

yes you are right about everything, also exitWith breaks out of the current score so if it's called from the top level scope if will exit the script (I hope you understand what i am saying haha)

hey axe cop, how do i fix the "attempting to start AGN products on a server where it should not be!" error on the rpt log?

thanks :D

Link to comment
Share on other sites

  • 0
at the top of the script declare a new variable in the private variables list called "_msgLock" or something you can remember.
next, find this peice of code:
 
if ( _skip && _if ) then {
    if ( AGN_safeZoneMessages ) then { systemChat ("[AGN] This player is tagged friendly, you have access to this players bag") };
}
 
and change it to look like this:
 
if ( _skip && _if ) then {
    if (!_msgLock) then {
        if ( AGN_safeZoneMessages ) then { 
            systemChat ("[AGN] This player is tagged friendly, you have access to this players bag.");
            _msgLock = true;
        };
    };
} else {
    _msgLock = false;
};

 

This has worked lovely for me, it limits the amount of messages shown every time you look at someone to 1 message.

This isn't copy and paste artwork because I'm not on my proper computer but it's very, very similar.

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...