SHARE
TWEET

ExileServer_object_player_network_createPlayerRequest

a guest Sep 25th, 2016 223 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * ExileServer_object_player_network_createPlayerRequest
  3.  *
  4.  * Exile Mod
  5.  * www.exilemod.com
  6.  * © 2015 Exile Mod Team
  7.  *
  8.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10.  */
  11.  
  12. private["_sessionID","_parameters","_requestingPlayer","_spawnLocationMarkerName","_playerUID","_accountData","_bambiPlayer","_cargoType"];
  13. _sessionID = _this select 0;
  14. _parameters = _this select 1;
  15. _requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject;
  16. try
  17. {
  18.  if (isNull _requestingPlayer) then
  19.  {
  20.   throw format ["Session %1 requested a bambi character, but doesn't have a player object. Hacker or Monday?", _sessionID];
  21.  };
  22.  _spawnLocationMarkerName = _parameters select 0;
  23.  _playerUID = getPlayerUID _requestingPlayer;
  24.  if(_playerUID isEqualTo "")then
  25.  {
  26.   throw format ["Player: '%1' has no player UID. Arma/Steam sucks!.",name _requestingPlayer];
  27.  };
  28.     _accountData = format["getAccountStats:%1", _playerUID] call ExileServer_system_database_query_selectSingle;
  29.     _bambiPlayer = (createGroup independent) createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
  30.  
  31.     _respect = (_accountData select 0);
  32.  
  33. switch (true) do
  34. {
  35.     case (_respect > 2500 && _respect < 4999):
  36.     {
  37.  _bambiPlayer forceAddUniform "U_C_Poloshirt_redwhite";
  38.  _bambiPlayer addVest "V_BandollierB_oli";
  39.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  40.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  41.  ///_bambiPlayer addBackpack "B_AssaultPack_Kerry";
  42.  _bambiPlayer addItem "Exile_Item_Matches";
  43.  _bambiPlayer addItem "Exile_Item_Foolbox";
  44.  _bambiPlayer linkItem "ItemGPS";
  45.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  46.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  47.  //   systemChat "Your rank is Enforcer";
  48.   };
  49.  
  50.     case (_respect > 5000 && _respect < 9999):
  51.    {
  52.  _bambiPlayer forceAddUniform "U_Competitor";
  53.  _bambiPlayer addVest "V_BandollierB_oli";
  54.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  55.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  56.  //_bambiPlayer addBackpack "B_AssaultPack_Kerry";
  57.  _bambiPlayer addItem "Exile_Item_Foolbox";
  58.  _bambiPlayer addItem "Exile_Item_Matches";
  59.  _bambiPlayer linkItem "ItemGPS";
  60.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  61.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  62.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  63.  
  64. //   systemChat "Your rank is Slayer";
  65.    };
  66.  
  67.  case (_respect > 9999 && _respect < 19999):
  68.    {
  69.  _bambiPlayer forceAddUniform "U_Rangermaster";
  70.  _bambiPlayer addHeadgear "H_Booniehat_dgtl";
  71.  _bambiPlayer addVest "V_BandollierB_oli";
  72.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  73.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  74.  //_bambiPlayer addBackpack "B_TacticalPack_mcamo";
  75.  _bambiPlayer addItem "Exile_Item_Foolbox";
  76.  _bambiPlayer addItem "Exile_Item_Matches";
  77.  _bambiPlayer linkItem "ItemGPS";
  78.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  79.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  80.  _bambiPlayer addItem "Exile_Item_EMRE";
  81.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  82.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  83. //  systemChat "Your rank is Hit Man";
  84.    };
  85.  
  86.     case (_respect > 19999 && _respect < 29999):
  87.    {
  88.  _bambiPlayer forceAddUniform "U_B_CombatUniform_mcam_worn";
  89.  for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
  90.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  91.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  92.  _bambiPlayer addHeadgear "H_Booniehat_dgtl";
  93.  _bambiPlayer addItemToVest "hgun_mas_grach_F";
  94.  _bambiPlayer addItemToVest "acc_mas_flash_gun";
  95.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  96.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  97.   //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
  98.  //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
  99.  _bambiPlayer addItem "Exile_Item_Foolbox";
  100.  _bambiPlayer addItem "Exile_Item_Matches";
  101.  _bambiPlayer linkItem "ItemGPS";
  102.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  103.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  104.  _bambiPlayer addItem "Exile_Item_EMRE";
  105.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  106.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  107. //  systemChat "Your rank is Executioner";
  108.    };
  109.  
  110.     case (_respect > 29999 && _respect < 39999):
  111.    {
  112.     _bambiPlayer forceAddUniform "U_C_HunterBody_grn";
  113.  for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
  114.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  115.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  116.  _bambiPlayer addHeadgear "H_Booniehat_dgtl";
  117.  _bambiPlayer addItemToVest "hgun_mas_grach_F";
  118.  _bambiPlayer addItemToVest "acc_mas_flash_gun";
  119.  _bambiPlayer addItemToVest "optic_mas_MRD";
  120.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  121.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  122.  _bambiPlayer addItem "Exile_Item_Foolbox";
  123.   //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
  124.  //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
  125.  //_bambiPlayer addHandgunItem "optic_mas_MRD";
  126.  _bambiPlayer addItem "Exile_Item_Matches";
  127.  _bambiPlayer linkItem "ItemGPS";
  128.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  129.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  130.  _bambiPlayer addItem "Exile_Item_EMRE";
  131.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  132.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  133.  
  134. //  systemChat "Your rank is Tyrant";
  135.    };
  136.  
  137.     case (_respect > 39999 && _respect < 49999):
  138.    {
  139.  _bambiPlayer forceAddUniform "U_I_G_Story_Protagonist_F";
  140.  for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
  141.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  142.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  143.  _bambiPlayer addHeadgear "H_Cap_brn_SPECOPS";
  144.  _bambiPlayer addItemToVest "hgun_mas_grach_F";
  145.  _bambiPlayer addItemToVest "acc_mas_flash_gun";
  146.  _bambiPlayer addItemToVest "muzzle_mas_snds_LM";
  147.  _bambiPlayer addItemToVest "optic_Yorris";
  148.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  149.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  150.  _bambiPlayer addItem "Exile_Item_Foolbox";
  151.   //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
  152.  //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
  153.  //_bambiPlayer addHandgunItem "muzzle_mas_snds_LM";
  154.  //_bambiPlayer addHandgunItem "optic_Yorris";
  155.  _bambiPlayer addItem "Exile_Item_Matches";
  156.  _bambiPlayer linkItem "ItemGPS";
  157.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  158.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  159.  _bambiPlayer addItem "Exile_Item_EMRE";
  160.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  161.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  162.      
  163. //  systemChat "Your rank is Triggerman";
  164.    };
  165.  
  166.     case (_respect > 49999 && _respect < 69999):
  167.    {
  168.  _bambiPlayer forceAddUniform "U_I_G_resistanceLeader_F";
  169.  for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
  170.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  171.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  172.  _bambiPlayer addHeadgear "H_Cap_oli_hs";
  173.  _bambiPlayer addItemToVest "hgun_mas_uzi_F";
  174.   //_bambiPlayer addWeapon "hgun_mas_uzi_F";
  175.  _bambiPlayer addItem "Exile_Item_Matches";
  176.  _bambiPlayer linkItem "ItemGPS";
  177.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  178.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  179.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  180.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  181.  _bambiPlayer addItem "Exile_Item_Foolbox";
  182.  _bambiPlayer addItem "Exile_Item_EMRE";
  183.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  184.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  185. //  systemChat "Your rank is Trooper";
  186.    };
  187.  
  188.     case (_respect > 69999 && _respect < 89999):
  189.    {
  190.  _bambiPlayer forceAddUniform "U_B_survival_uniform";
  191.  for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
  192.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  193.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  194.  _bambiPlayer addHeadgear "H_ShemagOpen_tan";
  195.  _bambiPlayer addItemToVest "hgun_mas_uzi_F";
  196.  _bambiPlayer addItemToVest "muzzle_mas_snds_L";
  197.  _bambiPlayer addItemToVest "optic_mas_MRD";
  198.   //_bambiPlayer addWeaponGlobal "hgun_mas_uzi_F";
  199.  //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
  200.  //_bambiPlayer addHandgunItem "optic_mas_MRD";
  201.  _bambiPlayer addItem "Exile_Item_Matches";
  202.  _bambiPlayer linkItem "ItemGPS";
  203.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  204.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  205.  _bambiPlayer addItem "Exile_Item_Foolbox";
  206.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  207.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  208.  _bambiPlayer addItem "Exile_Item_EMRE";
  209.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  210.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  211. //  systemChat "Your rank is High Executioner";
  212.    };
  213.  
  214.      case (_respect > 89999 && _respect < 149999):
  215.    {
  216.  _bambiPlayer forceAddUniform "U_BG_Guerrilla_6_1";
  217.  //for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "30Rnd_mas_9x21_Stanag";};
  218.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  219.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  220.  _bambiPlayer addHeadgear "H_Beret_blk";
  221.   //_bambiPlayer addWeapon "arifle_mas_mp5sd";
  222.  //_bambiPlayer addPrimaryWeaponItem "optic_Aco_smg";
  223.  for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
  224.  _bambiPlayer addItemToVest "hgun_mas_uzi_F";
  225.  _bambiPlayer addItemToVest "muzzle_mas_snds_L";
  226.  _bambiPlayer addItemToVest "optic_mas_MRD";
  227.  //_bambiPlayer addWeapon "hgun_mas_uzi_F";
  228.  //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
  229.  //_bambiPlayer addHandgunItem "optic_mas_MRD";
  230.  _bambiPlayer addItem "Exile_Item_Matches";
  231.  _bambiPlayer addItem "Exile_Item_Foolbox";
  232.  _bambiPlayer linkItem "ItemGPS";
  233.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  234.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  235.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  236.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  237.  _bambiPlayer addItem "Exile_Item_EMRE";
  238.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  239.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  240. //  systemChat "Your rank is Reaper";
  241.    };
  242.  
  243.      case (_respect > 149999):
  244.    {
  245.  _bambiPlayer forceAddUniform "Exile_Uniform_Woodland";
  246.  //for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "30Rnd_mas_9x39_mag";};
  247.  _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
  248.  //_bambiPlayer addBackpack "B_Bergen_mcamo";
  249.  _bambiPlayer addHeadgear "H_ShemagOpen_khk";
  250.   //_bambiPlayer addWeaponGlobal "arifle_mas_asval";
  251.  //_bambiPlayer addPrimaryWeaponItem "acc_flashlight";
  252.  //_bambiPlayer addPrimaryWeaponItem "optic_mas_kobra";
  253.  for "_i" from 1 to 2 do {_bambiPlayer addItemToVest "25Rnd_mas_9x19_Mag";};
  254.  //_bambiPlayer addWeaponGlobal "hgun_mas_uzi_F";
  255.  _bambiPlayer addItemToVest "hgun_mas_uzi_F";
  256.  _bambiPlayer addItemToVest "optic_Yorris";
  257.  _bambiPlayer addItemToVest "muzzle_mas_snds_L";
  258.  //_bambiPlayer addHandgunItem "optic_Yorris";
  259.  //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
  260.  _bambiPlayer addItem "Exile_Item_Foolbox";
  261.  _bambiPlayer addItem "Exile_Item_Matches";
  262.  _bambiPlayer linkItem "ItemGPS";
  263.  //_bambiPlayer addItemToVest "Exile_Melee_Axe";
  264.  _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  265.  _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
  266.  //_bambiPlayer addMagazine "Exile_Magazine_Swing";
  267.  _bambiPlayer addItem "Exile_Item_EMRE";
  268.  _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
  269.  _bambiPlayer addItem "Exile_Item_InstaDoc";
  270. //  systemChat "Your rank is Supreme Overlord";
  271.    };
  272.     default
  273.     {
  274. // systemChat "Your rank is Inmate";
  275.  };
  276. };
  277.  
  278. removeHeadgear _bambiPlayer;
  279.  {
  280.   _cargoType = _x call ExileClient_util_cargo_getType;
  281.   switch (_cargoType) do
  282.   {
  283.    case 1:  { _bambiPlayer addItem _x; };
  284.    case 2:  { _bambiPlayer addWeaponGlobal _x; };
  285.    case 3:  { _bambiPlayer addBackpackGlobal _x; };
  286.    case 4:  { _bambiPlayer linkItem _x; };
  287.    default      { _bambiPlayer addItem _x; };
  288.   };
  289.  }
  290.  forEach getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "loadOut");
  291.  [_sessionID, _requestingPlayer, _spawnLocationMarkerName, _bambiPlayer, _accountData] call ExileServer_object_player_createBambi;
  292. }
  293. catch
  294. {
  295.  _exception call ExileServer_util_log;
  296. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top