daily pastebin goal
40%
SHARE
TWEET

ExileServer_object_player_network_createPlayerRequest.sqf

iaretechnician Dec 10th, 2015 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Exile Mod
  3.  * www.exilemod.com
  4.  * © 2015 Exile Mod Team
  5.  *
  6.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  7.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  8.  */
  9.  
  10. private["_sessionID","_parameters","_requestingPlayer","_spawnLocationMarkerName","_playerUID","_accountData","_bambiPlayer","_cargoType"];
  11. _sessionID = _this select 0;
  12. _parameters = _this select 1;
  13. _requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject;
  14. _spawnLocationMarkerName = _parameters select 0;
  15. _playerUID = getPlayerUID _requestingPlayer;
  16. _accountData = format["getAccountStats:%1", _playerUID] call ExileServer_system_database_query_selectSingle;
  17. _group = createGroup independent;
  18. _bambiPlayer = _group createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
  19. {
  20.         _cargoType = _x call ExileClient_util_cargo_getType;
  21.         switch (_cargoType) do
  22.         {
  23.                 case 1:         { _bambiPlayer addItem _x; };
  24.                 case 2:         { _bambiPlayer addWeaponGlobal _x; };
  25.                 case 3:         { _bambiPlayer addBackpackGlobal _x; };
  26.                 case 4:         { _bambiPlayer linkItem _x; };
  27.                 default         { _bambiPlayer addItem _x; };
  28.         };
  29. }
  30. forEach getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "loadOut");
  31. [_sessionID, _requestingPlayer, _spawnLocationMarkerName, _bambiPlayer, _accountData] call ExileServer_object_player_createBambi;
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