darkstaride

init_client.sqf

Mar 29th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. /*=============================================
  2. init_client.sqf executes everything that is needed
  3. Authors: richarddanh.com
  4. www.pizzadox.org
  5. =================================================*/
  6. #define StartingGear ["ACE_Earplugs","ItemGPS","ItemWatch","ACRE_PRC343","ACRE_PRC148","ACE_Map_Tools","ACE_GlassesLHD_glasses","ACE_GlassesGasMask_US","ItemCompass","NVGoggles","Binocular", "ACE_KeyCuffs", "ACE_MAP"]
  7.  
  8. client_execution = {
  9. if (isplayer player) then
  10. {
  11. waituntil {local player};
  12. //player enableSimulation false;
  13. 2003 CutText ["Loading...", "BLACK"];
  14. //calculate time
  15. _future = time + 5;
  16. waitUntil {(time >= _future)};
  17. defaultloadoutinit = [player] spawn {
  18. _unit = _this select 0;
  19. removeAllWeapons _unit;
  20. removeAllItems _unit;
  21. clearMagazineCargo (unitBackpack _unit);
  22. [_unit, "ALL"] call ACE_fnc_RemoveGear;
  23. {_unit addweapon _x} foreach StartingGear;
  24. [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
  25. //[_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
  26. };
  27. ace_sys_tracking_markers_enabled = false;
  28. ace_sys_eject_fnc_weaponcheck = {};
  29. setViewDistance 1205; //save fpsZ!!!
  30. setTerrainGrid 25;
  31. onMapSingleClick {_shift};
  32. player setskill 0;
  33. player setVariable ["BIS_noCoreConversations", true];
  34. enableRadio false;
  35. {player disableAI _x} foreach ["MOVE","ANIM","TARGET","AUTOTARGET"];
  36. [] call (compile (preprocessFileLineNumbers ("\ca\Modules\MP\data\scripts\MPframework.sqf")));
  37. waitUntil { scriptDone defaultloadoutinit };
  38. titleFadeOut 0.1;
  39. 2003 CutText ["", "BLACK IN", 5];
  40. diag_log format ["Mission Initialisation Completed for: %1 at: %2", player, time];
  41. //player enablesimulation true;
  42. player addEventHandler ["Respawn",{
  43. _unit = _this select 0;
  44. //removeAllWeapons _unit;
  45. //removeAllItems _unit;
  46. //clearMagazineCargo (unitBackpack _unit);
  47. //[_unit, "ALL"] call ACE_fnc_RemoveGear;
  48. //{_unit addweapon _x} foreach startinggear;
  49. [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
  50. //[_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
  51. }];
  52. [] spawn {
  53. sleep 20;
  54. //0=["<img size='5' color='#ffffff' image='pic\86th_flag.paa'/>",-1,0.3,4,6,0,720] spawn BIS_fnc_dynamicText;
  55. [str ("Pope Field"), str("North Carolina"), str(date select 1) + "." + str(date select 2) + "." + str(date select 0)] spawn BIS_fnc_infoText;
  56. };
  57. };
  58. };
  59.  
  60. player call client_execution;
  61.  
  62. if (!isServer && isNull player) then {
  63. waitUntil {!isNull player};
  64. waituntil {local player};
  65. player call client_execution;
  66. player setpos (getmarkerpos "respawn_west");
  67. };
Add Comment
Please, Sign In to add comment