darkstaride

Untitled

Nov 24th, 2015
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. /* =============================================
  2. client.sqf executes cilent side only or gtfo
  3. Author: richarddanh.com
  4. ================================================= */
  5. client_settings = {
  6. if (local player) then {
  7. player enableSimulation false; //Freeze player
  8. _future = time + 5;
  9. waitUntil {(time >= _future)};
  10. if !(player hasweapon "ace_safe") then {player addweapon "ace_safe";};
  11. waituntil {player hasweapon "ace_safe"};
  12. player selectweapon "ace_safe";
  13. player setVariable ["ace_sys_weaponselect_safety",[(primaryweapon player),true]];
  14. ace_sys_tracking_markers_enabled=false;
  15. setViewDistance 1609;
  16. setTerrainGrid 50;
  17. };
  18. };
  19.  
  20. player call client_settings;
  21.  
  22. client_execution = {
  23. if (isplayer player) then
  24. {
  25. waituntil {local player};
  26. onMapSingleClick {_shift};
  27. ace_sys_eject_fnc_weaponcheck = {};
  28. player setskill 0;
  29. player setVariable ["BIS_noCoreConversations", true]; //Disable AI Convos
  30. enableRadio false; //Disable radio communication
  31. {player disableAI _x} foreach ["MOVE","ANIM","TARGET","AUTOTARGET"];
  32. [] call (compile (preprocessFileLineNumbers ("\ca\Modules\MP\data\scripts\MPframework.sqf")));
  33. };
  34. };
  35.  
  36. player call client_execution;
  37.  
  38. //Loadouts
  39. removeAllWeapons player; //Remove Weapons
  40. removeAllItems player; //Remove all Items
  41. player addWeapon "ACE_Earplugs"; //Add Earplugs
  42. player addWeapon "ItemGPS"; //Add GPS
  43. player addWeapon "ItemWatch"; //Add Watch
  44. player addWeapon "ACRE_PRC343"; //Add 343
  45. player addWeapon "ACRE_PRC148"; //Add 148
  46. player addWeapon "ACE_Map_Tools"; //Map Tools
  47. player addWeapon "ACE_GlassesLHD_glasses"; //Glasses
  48. player addWeapon "ACE_GlassesGasMask_US"; //Mask
  49. player addWeapon "ACE_Map"; //Map
  50. player addWeapon "ItemCompass"; //Compass
  51. player addweapon "NVGoggles"; //Night Vision Goggles
  52. player addweapon "Binocular"; //Binocular
  53. clearMagazineCargo (unitBackpack player); //Clear stuff in backpack
  54. sleep 5; //Server Waits
  55. [player] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm"; //Wears Earplug
  56. [player, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm"; //Wear Glasses
  57.  
  58. //Respawning
  59. //player addeventhandler ["respawn","this execVM 'client\loadout_default.sqf'"];
  60.  
  61. if (!isServer && isNull player) then {
  62. waitUntil {!isNull player};
  63. waituntil {local player};
  64. player call client_settings;
  65. player call client_execution;
  66. player setpos (getmarkerpos "respawn_west");
  67. };
  68.  
  69. sleep 1; //Custom Amount
  70. titleFadeOut 0.1;
  71. 2003 CutText ["Initialisation Completed", "BLACK IN", 5];
  72. diag_log format["Mission Initialisation Completed", time];
  73. player enablesimulation true; // Unfreeze PLayer
  74. sleep 5;
  75. [str ("Template"), str("Chernarus"), str(date select 1) + "." + str(date select 2) + "." + str(date select 0)] spawn BIS_fnc_infoText;
Advertisement
Add Comment
Please, Sign In to add comment