Timed popup messages

Timed popup messages

« posted: Mar 25, 2015, 06:56 AM »
Hi!

First of all im new to Arma scripting and im trying to understand it by trial and error.


I was trying to adapt the rewardforplaying for sending timed messages in the right corner popup.


I understand that the RewardforPlaying is called from firstSpawn and thats my first problem, because the timer will start when the player spawn, and i need that the timer starts when the server restarts


Code: [Select]
if(format["%1",firstspawn] == format["%1","1"]) then {
[] spawn timedmsg;
firstspawn = 0;
};


And the second problem is that first part of the code, while {_i < 3} do i think i removed to much or have to much there to script start.

Code: [Select]
while {_i < 3} do
   {
   if ( _i == 1) then {
  _msg = parseText format ["<t align='center' color='#FFFFFF' shadow='2' size='1.75'>Message 1</t>"];
      hint _msg;
   };
   sleep 300;
  _msg = parseText format ["<t align='center' color='#FFFFFF' shadow='2' size='1.75'>Message 2</t>"];
      hint _msg;
   sleep 300;
   };

I created a new timedmsg.sqf and im calling him from clientCompile

I know this probably sound foal or even funny to you guys but i joined this only about a week and im trying to understand the arma scripting and the logic behind it

  • Offline JoSchaap
  • Developer
  • Mercenary
  • ******
  • Posts: 481
  • Had a life.. Got a modem.. (~1996)

Re: Timed popup messages

« Reply #1 posted: Mar 25, 2015, 10:46 AM »
scripts in /client/ are not serversided :)

Why don't you just use BEC or another serversided tool?
The hint box is used for multiple things if a mission pops up it overrules the earlyer issued hint window.
Best practice would be to use either the ingame chat, or a new location for your timed messages.

Re: Timed popup messages

« Reply #2 posted: Mar 25, 2015, 09:17 PM »
Ah i understand, i was thinking in the WelcomeMessage to but i see now that they are only triggered when player joins hum ...

I think i got to late for BEC

Quote
Bec Service has been terminated.

As a protest against Bis for allowing Server monetization i am terminating all services associated with Bec.
Good bye Bis it has been a great time.

Regards.
Nuxil



rage quit :\

any good alternatives ? or any way to make for example the WelcomeMessage to trigger a timer when server starts ?

im checking StatusBar addon because it triggers the restart counter when the server restarts .. probably i can trigger a timmed message to .. but at this momment is a little to blur'y to me
  • Offline JoSchaap
  • Developer
  • Mercenary
  • ******
  • Posts: 481
  • Had a life.. Got a modem.. (~1996)

Re: Timed popup messages

« Reply #3 posted: Mar 26, 2015, 11:24 AM »
I'm still using it, just add iBattle.org to your hosts file or block it in your router, if BEC cannot connect to it it will keep working.

Re: Timed popup messages

« Reply #4 posted: Apr 19, 2015, 06:51 AM »
where i can download this ? can you give me a step by step tutorial to put this on my server ? im very new on this