Advertisement
PiZZADOX

ClientInit

Nov 24th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.47 KB | None | 0 0
  1. //Client Initialization
  2.  
  3. //lea shit
  4. leaFunction =  compile preprocessFileLineNumbers "Scripts\Equipment\lea\loadout-init.sqf";
  5.  
  6. /////////////////////////////////////////////////////////////////
  7. //                  Player Temp Freeze             
  8. /////////////////////////////////////////////////////////////////
  9.  
  10. MMC_startfreeze = {
  11.     player spawn {
  12.         removeallweapons player;
  13.         player enableSimulation false;
  14.         _future = time + 5;
  15.         waitUntil {(time >= _future)};
  16.         call leaFunction;
  17.         waitUntil {!isNil "leadummy"};
  18.         waitUntil {scriptdone leadummy};
  19.         if !(player hasweapon "ace_safe") then {player addweapon "ace_safe";};
  20.         waituntil {player hasweapon "ace_safe"};
  21.         player enableSimulation true;
  22.         player selectweapon "ace_safe";
  23.         player setVariable ["ace_sys_weaponselect_safety",[(primaryweapon player),true]];
  24.     };
  25. };
  26.  
  27. player call MMC_startfreeze;
  28.  
  29. /////////////////////////////////////////////////////////////////
  30. //                  ACRE Connection Script             
  31. /////////////////////////////////////////////////////////////////
  32.  
  33. //execVM "Scripts\ACRE\ts3connect.sqf";
  34. //execVM "Scripts\ACRE\ts3disconnect.sqf";
  35.  
  36. /////////////////////////////////////////////////////////////////
  37. //                  Anti Cheat Quick    
  38. /////////////////////////////////////////////////////////////////
  39.  
  40. MMC_anticheat = {
  41.     //global variable check
  42.     if (!isNil "loki_LostKey") then {
  43.         [player] spawn {
  44.         _name = name player;
  45.         systemchat format ["%1 is using unauthorized addons",_name];
  46.         player enablesimulation false;
  47.         _CheatMessage = "You must remove unauthorized addons/Cheats before you can play on the server. Please disable these addons and relaunch.";
  48.         cutText [_CheatMessage,"BLACK FADED",1];
  49.         sleep 5;
  50.         failMission "LOSER";
  51.         };
  52.     };
  53.    
  54.     //cfg patches check
  55.     if (isClass(configFile >> "CfgPatches" >> "Loki_Lost_Key")) then {
  56.         [player] spawn {
  57.         _name = name player;
  58.         systemchat format ["%1 is using unauthorized addons",_name];
  59.         player enablesimulation false;
  60.         _CheatMessage = "You must remove unauthorized addons/Cheats before you can play on the server. Please disable these addons and relaunch.";
  61.         cutText [_CheatMessage,"BLACK FADED",1];
  62.         sleep 5;
  63.         failMission "LOSER";
  64.         };
  65.     };
  66. };
  67.  
  68. ///////////////////////////////////////////////
  69. //           Player Execution
  70. ///////////////////////////////////////////////
  71.  
  72. MMC_playerexecution = {
  73.     if (isplayer player) then
  74.     {
  75.         waituntil {local player};
  76.         onMapSingleClick {_shift};
  77.         ace_sys_eject_fnc_weaponcheck = {};
  78.         player setskill 0;
  79.         player setVariable ["BIS_noCoreConversations", true];
  80.         player setVariable ["ACE_SYS_STAMINA_MULTI", 0.45];
  81.         {player disableAI _x} foreach ["MOVE","ANIM","TARGET","AUTOTARGET"];
  82.         player synchronizeObjectsAdd [server];
  83.         server synchronizeObjectsAdd [player];
  84.         [] call (compile (preprocessFileLineNumbers ("\ca\Modules\MP\data\scripts\MPframework.sqf")));
  85.     };
  86. };
  87.  
  88. player call MMC_playerexecution;
  89.  
  90. ///////////////////////////////////////////////
  91. //   JIP Teleport and Actions per params     //
  92. ///////////////////////////////////////////////
  93.  
  94. waituntil {!isNil "respawnallowed"};
  95.  
  96. if (!isServer && isNull player) then {
  97.     waitUntil {!isNull player};
  98.     waituntil {local player};
  99.     player call MMC_playerexecution;
  100.     player call MMC_anticheat;
  101.     player call MMC_startfreeze;
  102.     player setpos (getmarkerpos "respawn_west");
  103.     hint "You are a JIP player, you have been spawned inside of a waiting area with diminished gear, you can either spectate or teleport to your teamleader";
  104. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement