Messages

  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Messages

« posted: Oct 17, 2016, 06:34 PM »
Hello guys ...i'm looking for an scrip or some that will spam messages on the server can someone pint me on the right way i found some scrips but i don't see it work ...thanks

Re: Messages

« Reply #1 posted: Oct 17, 2016, 09:16 PM »
Sth like this?

You need to add these messages to your server.cfg under the MOTD section and set a timer for it to broadcast every few minutes or so ...

Code: [Select]
/ WELCOME MESSAGE ("message of the day")
// It can be several lines, separated by comma
// Empty messages "" will not be displayed at all but are only for increasing the interval

motd[]={
   "ENQUIRE ABOUT OUR DONATOR STARTUP LOADOUTS - COME TO TEAMSPEAK :)",
   "OUR LATEST DONATORS ARE BOSBOK, GARARD, HAGAR, BLAASIE, LTASORIO, DIESEL, EVIL BETTY, MOON, N3O AND BAGELZA",
   "COME JOIN US OR ASK FOR HELP ON TEAMSPEAK CPTTS.GAMESERVERS.COM:9194"
};
motdInterval            = 300;            // Time interval (in seconds) between each message

like this ...
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Messages

« Reply #2 posted: Oct 17, 2016, 11:47 PM »
Well i know abot that but when it get to the end that will not go again ...i need something that will repeat like every 5 min on regular chat i found this but i don't know how to trigger it

Code: [Select]
//***************************************************************
//***************************************************************
//Coded by calibaan www.nomercykillers.com

//***************************************************************
//***************************************************************
private ["_MessagesToAnnounceStringArray","_DisplayTimesCheckArray","_MinimumSleepTimeScalar","_DisplayReadyMessageStringsArray","_MiniumTimeBetweenAnnouncementsScalar","_CurrentAnnouncementTimeCounterScalar","_UpdatedAnnouncementTimeScalar","_CompiledMessageDisplayString"];

/*
The message announcement array has the following format: [Message to display, format String, Time between announcements, format scalar]
For example:
["Testmessage1 here!", 60], ["This is testmessage 2 displayed every 90 seconds!", 90]
*/

_MessagesToAnnounceStringArray =

[
["This server supports JSRS Dragonfyre, Blastcore Phoenix, VTS Weapon Resting, Fullscreen NVGs, Shacktack Fireteam HUD - visit us on http://www.g4-gamers.com for more info!", 2100],
["Looking for an admin? Contact us on teamspeak - ts.g4-gamers.com", 600],
["Check Player menu button for effects on and off", 1500],
["This server is monitored 24/7 by admins, all actions are logged", 1000],
["This server auto restarts every 6 hours to ensure optimal client performance !", 3600]
];

if ((count _MessagesToAnnounceStringArray) == 0) exitWith
{
diag_log format ["** Automatic message announcement not used, the array is empty. **"];
};

if (isNil ("CGV_MessageAnnouncementArray")) then
{
CGV_MessageAnnouncementArray = [];
};

_DisplayTimesCheckArray = [];
{
CGV_MessageAnnouncementArray set [count CGV_MessageAnnouncementArray, [_x select 0, _x select 1, 0]];
_DisplayTimesCheckArray set [count _DisplayTimesCheckArray, _x select 1];
} forEach _MessagesToAnnounceStringArray;

_MinimumSleepTimeScalar = [_DisplayTimesCheckArray, 0] call BIS_fnc_findExtreme;
if (_MinimumSleepTimeScalar > 300) then
{
_MinimumSleepTimeScalar = 300;
};
_MinimumSleepTimeScalar = 5;

while {(true)} do
{
_DisplayReadyMessageStringsArray = [];

{
_DisplayMessageString = _x select 0;
_MiniumTimeBetweenAnnouncementsScalar = _x select 1;
_CurrentAnnouncementTimeCounterScalar = _x select 2;

if (_CurrentAnnouncementTimeCounterScalar >= _MiniumTimeBetweenAnnouncementsScalar) then
{
_DisplayReadyMessageStringsArray set [count _DisplayReadyMessageStringsArray, _DisplayMessageString];
_UpdatedAnnouncementTimeScalar = 0;
}
else
{
_UpdatedAnnouncementTimeScalar = _CurrentAnnouncementTimeCounterScalar + _MinimumSleepTimeScalar;
};

[CGV_MessageAnnouncementArray, [_forEachIndex, 2], _UpdatedAnnouncementTimeScalar] call BIS_fnc_setNestedElement;
} forEach CGV_MessageAnnouncementArray;

if ((count _DisplayReadyMessageStringsArray) != 0) then
{
_CompiledMessageDisplayString = "";

{
_CompiledMessageDisplayString = _CompiledMessageDisplayString + _x;
} forEach _DisplayReadyMessageStringsArray;

cutText [_CompiledMessageDisplayString, "PLAIN DOWN", 2, false];
};

sleep _MinimumSleepTimeScalar;
};
  • Offline dekela
  • First Blood
  • ***
  • Posts: 79

Re: Messages

« Reply #3 posted: Oct 18, 2016, 03:09 AM »
Soul[kobk] has written an awesome server sided script for me to spam messages. Chances are he will be willing to share
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Messages

« Reply #4 posted: Oct 18, 2016, 06:51 AM »
Soul[kobk] has written an awesome server sided script for me to spam messages. Chances are he will be willing to share

Thanks well i use some of his scripts and they are A++++ so let see if he can help me with this one 
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: Messages

« Reply #5 posted: Oct 19, 2016, 07:04 AM »
Thanks well i use some of his scripts and they are A++++ so let see if he can help me with this one

You may be interested in this script...

https://github.com/soulkobk/ArmA_Scripts/blob/master/globalChatMessages/globalChatMessages.sqf

It does what you are wanting to do and spam messages to the clients (players) chat stream, but is client side and housed with the mission.pbo, so in order to change the message, you need to redo/repack the mission.pbo each time.

The script(s) that dekela is talking about is a bit more involved, and I will need to redo the code and upload it to github (no ETA)... so for the time being use globalChatMessages.sqf :)

*EDIT... I had some free time, so put together a public script of what dekela mentioned above. You can find the scripts at -> https://github.com/soulkobk/ArmA_Scripts/tree/master/titleTextMessagesServer
Be sure to read the script header information for installation/usage instructions.


-soul.
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Messages

« Reply #6 posted: Oct 19, 2016, 10:37 PM »
Hey Soul i put the script you give me but i don't see it work ..i ad the script to \client\functions\ and then edit \client\init.sqf and no work  :(
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: Messages

« Reply #7 posted: Oct 20, 2016, 03:54 AM »
Hey Soul i put the script you give me but i don't see it work ..i ad the script to \client\functions\ and then edit \client\init.sqf and no work  :(

Then you have done something incorrect. Please follow the header installation information.

I tested both scripts before I published them on github, and both scripts were displaying the messages correctly in a dedicated server environment (I had both running at the same time).

-soul.
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Messages

« Reply #8 posted: Oct 20, 2016, 05:09 PM »
I will try it one more time ...also do I have to create the parameters on mission.sqf I think that maybe is the problem but if is that I have no idea how to do it can you help me on that thanks
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: Messages

« Reply #9 posted: Oct 21, 2016, 09:49 AM »
I will try it one more time ...also do I have to create the parameters on mission.sqf I think that maybe is the problem but if is that I have no idea how to do it can you help me on that thanks

You need to place down a "game logic" in your A3Wasteland mission (if it doesn't already have one named 'server').

http://i.imgur.com/VMVt5v3.jpg
Messages
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 57
  • Founder of EZ Company Gaming

Re: Messages

« Reply #10 posted: Oct 21, 2016, 06:46 PM »
Thank you Sr you the best ;D ;D ;D