Advertisement
mmmyum

0.2a player_radioMessage.sqf

May 15th, 2013
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. //PLAYER RADIO WARNING 0.11a mmmyum - attempt 2
  2. /*
  3.  //First we add a line to server_airraid.sqf to tell the clients what city tha airraid will hit next
  4. /////ADD ONLY THIS LINE:
  5.  
  6. AirraidPlayerMsg = _city; publicVariable "AirraidPlayerMsg";
  7.  
  8. EVERYTHING ELSE GOES INTO A NEW SCRIPT (Below stuff)
  9.  
  10. */    
  11.  
  12.     //Radio -- loop every two mins, check to see what will be bombed, and send a message
  13.                                 //note that this will check for a new message every 2 mins
  14. private ["_playerRadio","_city","_lastCity"];
  15. _lastCity = "null";
  16. sleep 40;
  17. while {true} do {
  18.                 _city = AirraidPlayerMsg;
  19.                 _playerRadio = "ItemRadio" in items player;
  20.         if (_playerRadio) then {
  21.                         if (_city != _lastCity) then {
  22.                 cuttext [format["RADIO:     ch-SOUND THE ALA--...... BOMBER STRI--...... OH GOD RUN"], "PLAIN DOWN"];
  23.                 sleep 10;
  24.                 cuttext [format["RADIO:     WARNING! AIRRAID in " + _city], "PLAIN DOWN"];
  25.                 sleep 10;
  26.                 cuttext [format["RADIO:     BOMBER INBOUND, EVACUATE!;"], "PLAIN DOWN"];
  27.                         };
  28.                 };
  29.                 _lastCity = _city;
  30.                 sleep 420;
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement