mmmyum

0.22a player_radioMsg.sqf

May 18th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.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. -----try for crash sites NewCrashSiteYum = _pos; publicVariable "NewCrashSiteYum";
  10. */
  11.  
  12. //Radio -- loop every two mins, perform checks
  13. //note that this will check for a new message every few mins
  14. private ["_playerRadio","_city","_lastCity"];
  15. _lastCity = "null";
  16. _runTimeMsg = time + 2640;
  17. sleep 40;
  18. while {true} do {
  19. _city = AirraidPlayerMsg;
  20. _playerRadio = "ItemRadio" in items player;
  21. if (_playerRadio) then {
  22. if (_city != _lastCity) then {
  23. playSound "radionoise1";
  24. sleep 1;
  25. cuttext [format["RADIO: ch-SOUND THE ALA--...... BOMBER STRI--...... OH GOD RUN"], "PLAIN DOWN"];
  26. sleep 1;
  27. playSound "radionoise1";
  28. sleep 9;
  29. cuttext [format["RADIO: WARNING! AIRRAID in " + _city], "PLAIN DOWN"];
  30. sleep 10;
  31. cuttext [format["RADIO: BOMBER INBOUND, EVACUATE!"], "PLAIN DOWN"];
  32. sleep 1;
  33. playSound "radionoise1";
  34. _lastCity = _city;
  35. };
  36. if ((time - _runTimeMsg) > 3000) then {
  37. playSound "radionoise1";
  38. cuttext [format["RADIO: AUTOMATED MESSAGE: Begin transmission..."], "PLAIN DOWN"];
  39. cuttext [format["RADIO: chh---My group has set up camp in the midwest mountains near Sosnovka --chh...."], "PLAIN DOWN"];
  40. sleep 10;
  41. cuttext [format["RADIO: We are taking in survivors --especially unarmed women and children"], "PLAIN DOWN"];
  42. sleep 10;
  43. cuttext [format["RADIO: Please bring us your resources, and possibly your --CHH..."], "PLAIN DOWN"];
  44. playSound "radionoise1";
  45. sleep 10;
  46. cuttext [format["RADIO: Watch the skies, darlings...We are everywhere"], "PLAIN DOWN"];
  47. sleep 10;
  48. cuttext [format["RADIO: But don't worry, we're friendly, we swear..yes...And long live Sosnovka!"], "PLAIN DOWN"];
  49. sleep 10;
  50. cuttext [format["RADIO: AUTOMATED MESSAGE: End transmission..."], "PLAIN DOWN"];
  51. playSound "radionoise1";
  52. _runTimeMsg = time;
  53. };
  54. };
  55. sleep 210; //break between rechecks
  56. };
Advertisement
Add Comment
Please, Sign In to add comment