mmmyum

player_crashMessages.sqf for AxeCain

May 20th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.02 KB | None | 0 0
  1. //PLAYER RADIO WARNING  Credits: mmmyum
  2. /*
  3.  
  4. //Add below line to server_spawnCrashSite.sqf
  5. NewCrashSiteYum = _position; publicVariable "NewCrashSiteYum";
  6.  
  7. //Call this out in you init.sqf
  8.     if (!isDedicated) then {
  9.         [] execVM "fixes\player_Crashmessages.sqf";
  10.     };
  11.  
  12. //Create folder named fixes and put in you mission.pbo. Copy and paste this entire file into player_Crashmessages.sqf and put into fixes folder.
  13. */
  14.  
  15.  
  16. private ["_playerRadio","_position","_lastPos"];
  17. sleep 300; //wait before start
  18. //SETUP INITIALIZE VARIABLES
  19. _position = [0,0,0];
  20. _lastPos = [0,0,0];
  21. //MAIN LOOP
  22. while {true} do {
  23.     //checking for radio and new crash site
  24.         _playerRadio = "ItemRadio" in items player; //check radio
  25.         if(!(isNil "NewCrashSiteYum")) then { _position = NewCrashSiteYum; }; //check to see if NewCrashSite is defined, if it is, set _postion to it
  26.  
  27.     //send message if has radio and if _position does not match _new position
  28.         if (_playerRadio) then {
  29.             if (((_position select 0) != (_lastPos select 0)) and ((_position select 1) != (_lastPos select 1))) then {
  30.                 playSound "radionoise1";
  31.                 cuttext [format["Radio Tuning..."], "PLAIN DOWN"];
  32.                 sleep 5;
  33.                 cuttext [format["Helo Unit 6-1 Call for Base"], "PLAIN DOWN"];
  34.                 sleep 5;
  35.                 cuttext [format["Taking Fire from an unknown enemy! Were Hit"], "PLAIN DOWN"];
  36.                 sleep 5;
  37.                 //cuttext [format["MAYDAY! We are going down! UH6-1 is going down! " + str{_position} + " repeat " + str{_position}], "PLAIN DOWN"];
  38.                 //@AxeCain - _position will have the worldspace coordinates, not in game coordinates - so this won't make sense to players -- mmmyum
  39.                 sleep 5;
  40.                 playSound "radionoise1";            
  41.                 cuttext [format["TEST, You have marked the location on your map. Hurry! You may be able to save them!"], "PLAIN DOWN"];
  42.                 _lastPos = _position;
  43.             };
  44.         };
  45.     };
  46. sleep 180; //recheck 3 mins
Advertisement
Add Comment
Please, Sign In to add comment