Advertisement
darkstaride

Test init_client.sqf

Dec 10th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 5.24 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","ACE_Map","ItemCompass","NVGoggles","Binocular"]
  7.  
  8. client_execution = {
  9.         if (isplayer player) then
  10.         {
  11.                 waituntil {local player};
  12.                                 player enableSimulation false;
  13.                                 2003 CutText ["Initialising...", "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 1609;
  30.                 setTerrainGrid 50;
  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 ["Somewhere in the UN Base", "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 5;
  54.                                         [str ("Finale"), str("UN Base Chernarus"), str(date select 1) + "." + str(date select 2) + "." + str(date select 0)] spawn BIS_fnc_infoText;
  55.                                 };
  56.         };
  57. };
  58.  
  59. player call client_execution;
  60.  
  61. ai_movement = {
  62.         boxer switchMove "";
  63.         boxer switchMove "AmovPercMstpSnonWnonDnon_idle68boxing";
  64.         workout1 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  65.         workout2 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  66.         workout3 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  67.         workout4 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  68.         workout5 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  69.         workout6 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  70.         workout7 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  71.         workout8 switchMove "AmovPercMstpSnonWnonDnon_idle69drepy";
  72.         workout9 switchMove "AmovPercMstpSnonWnonDnon_idle56kliky";
  73.         workout10 switchMove "AmovPercMstpSnonWnonDnon_idle72lehSedy";
  74.         soldier16 playmove "amovpsitmstpsraswrfldnon_smoking";
  75.         soldier17 playmove "amovpsitmstpsraswrfldnon_smoking";
  76.         man321_1_1 playMove "ActsPercMstpSnonWnonDnon_talking02";
  77.         man321_1_1 disableAI "ANIM";
  78.         man322_1_1 playMove "ActsPercMstpSnonWnonDnon_talking01";
  79.         man322_1_1 disableAI "ANIM";
  80.         man321_1 playMove "ActsPercMstpSnonWnonDnon_talking02";
  81.         man321_1 disableAI "ANIM";
  82.         man322_1 playMove "ActsPercMstpSnonWnonDnon_talking01";
  83.         man322_1 disableAI "ANIM";
  84. };
  85.  
  86. player call ai_movement;
  87.  
  88. if (!isServer && isNull player) then {
  89.         waitUntil {!isNull player};
  90.         waituntil {local player};
  91.         player call client_execution;
  92.         player call ai_movement;
  93.         player setpos (getmarkerpos "respawn_west");
  94. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement