Advertisement
PiZZADOX

Simple Clientinit

Nov 24th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.81 KB | None | 0 0
  1. span class="re5"> client_execution = {
  2.         if (isplayer player) then
  3.         {
  4.                 waituntil {local player};
  5.                 player enableSimulation false;
  6.                 2003 CutText ["Initialising...", "BLACK"];
  7.                 //calculate time
  8.                 _future = time + 5;
  9.                 waitUntil {(time >= _future)};
  10.                 defaultloadoutinit = [player] spawn {
  11.                     _unit = _this select 0;
  12.                     removeAllWeapons _unit;
  13.                     removeAllItems _unit;
  14.                     clearMagazineCargo (unitBackpack _unit);
  15.                     [_unit, "ALL"] call ACE_fnc_RemoveGear;
  16.                     {player addweapon _x} foreach startinggear;
  17.                 };
  18.                 ace_sys_tracking_markers_enabled = false;
  19.                 ace_sys_eject_fnc_weaponcheck = {};
  20.                 setViewDistance 1609;
  21.                 setTerrainGrid 50;
  22.                 onMapSingleClick {_shift};
  23.                 player setskill 0;
  24.                 player setVariable ["BIS_noCoreConversations", true];
  25.                 enableRadio false;
  26.                 {player disableAI _x} foreach ["MOVE","ANIM","TARGET","AUTOTARGET"];
  27.                 [] call (compile (preprocessFileLineNumbers ("\ca\Modules\MP\data\scripts\MPframework.sqf")));
  28.                 waitUntil { scriptDone defaultloadoutinit };
  29.                 titleFadeOut 0.1;
  30.                 2003 CutText ["Initialisation Completed", "BLACK IN", 5];
  31.                 diag_log format ["Mission Initialisation Completed for: %1 at: %2", player, time];
  32.                 player enablesimulation true;
  33.                 [] spawn {
  34.                     sleep 5;
  35.                     [str ("Template"), str("Chernarus"), str(date select 1) + "." + str(date select 2) + "." + str(date select 0)] spawn BIS_fnc_infoText;
  36.                 };
  37.         };
  38. };
  39.  
  40. player call client_execution;
  41.  
  42. if (!isServer && isNull player) then {
  43.         waitUntil {!isNull player};
  44.         waituntil {local player};
  45.         player call client_execution;
  46.         player setpos (getmarkerpos "respawn_west");
  47. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement