Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * ExileServer_object_player_network_createPlayerRequest
- *
- * Exile Mod
- * www.exilemod.com
- * © 2015 Exile Mod Team
- *
- * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
- * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
- */
- private["_sessionID","_parameters","_requestingPlayer","_spawnLocationMarkerName","_playerUID","_accountData","_bambiPlayer","_cargoType"];
- _sessionID = _this select 0;
- _parameters = _this select 1;
- _requestingPlayer = _sessionID call ExileServer_system_session_getPlayerObject;
- _bambiuniforms = [
- "U_C_Journalist",
- "U_C_Poloshirt_blue",
- "U_C_Poloshirt_burgundy",
- "U_C_Poloshirt_salmon",
- "U_C_Poloshirt_stripped",
- "U_C_Poloshirt_tricolour",
- "U_C_Poor_1",
- "U_C_Poor_2",
- "U_C_Poor_shorts_1",
- "U_C_Scientist",
- "U_OrestesBody",
- "U_Rangemaster",
- "U_NikosAgedBody",
- "U_NikosBody",
- "U_Competitor",
- "U_B_CombatUniform_mcam",
- "U_B_CombatUniform_mcam_tshirt",
- "U_B_CombatUniform_mcam_vest",
- "U_B_CombatUniform_mcam_worn",
- "U_B_CTRG_1",
- "U_B_CTRG_2",
- "U_B_CTRG_3",
- "U_I_CombatUniform",
- "U_I_CombatUniform_shortsleeve",
- "U_I_CombatUniform_tshirt",
- "U_I_OfficerUniform",
- "U_O_CombatUniform_ocamo",
- "U_O_CombatUniform_oucamo",
- "U_O_OfficerUniform_ocamo",
- "U_B_SpecopsUniform_sgg",
- "U_O_SpecopsUniform_blk",
- "U_O_SpecopsUniform_ocamo",
- "U_I_G_Story_Protagonist_F",
- "Exile_Uniform_Woodland",
- "U_C_HunterBody_grn",
- "U_IG_Guerilla1_1",
- "U_IG_Guerilla2_1",
- "U_IG_Guerilla2_2",
- "U_IG_Guerilla2_3",
- "U_IG_Guerilla3_1",
- "U_BG_Guerilla2_1",
- "U_IG_Guerilla3_2",
- "U_BG_Guerrilla_6_1",
- "U_BG_Guerilla1_1",
- "U_BG_Guerilla2_2",
- "U_BG_Guerilla2_3",
- "U_BG_Guerilla3_1",
- "U_BG_leader",
- "U_IG_leader",
- "U_I_G_resistanceLeader_F"
- ] call BIS_fnc_selectRandom;
- _bambifood = ["Exile_Item_EMRE","Exile_Item_GloriousKnakworst","Exile_Item_Surstromming","Exile_Item_SausageGravy","Exile_Item_Catfood","Exile_Item_ChristmasTinner","Exile_Item_BBQSandwich","Exile_Item_Dogfood","Exile_Item_BeefParts","Exile_Item_Cheathas","Exile_Item_Noodles","Exile_Item_SeedAstics","Exile_Item_Raisins","Exile_Item_Moobar"] call BIS_fnc_selectRandom;
- _bambidrink = ["Exile_Item_PlasticBottleCoffee","Exile_Item_PowerDrink","Exile_Item_PlasticBottleFreshWater","Exile_Item_Beer","Exile_Item_EnergyDrink","Exile_Item_MountainDupe"] call BIS_fnc_selectRandom;
- try
- {
- if (isNull _requestingPlayer) then
- {
- throw format ["Session %1 requested a bambi character, but doesn't have a player object. Hacker or Monday?", _sessionID];
- };
- _spawnLocationMarkerName = _parameters select 0;
- _playerUID = getPlayerUID _requestingPlayer;
- if(_playerUID isEqualTo "")then
- {
- throw format ["Player: '%1' has no player UID. Arma/Steam sucks!.",name _requestingPlayer];
- };
- _accountData = format["getAccountStats:%1", _playerUID] call ExileServer_system_database_query_selectSingle;
- _group = call ExileServer_system_group_getOrCreateLoneWolfGroup;
- _bambiPlayer = _group createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
- _bambiplayer forceadduniform _bambiuniforms;
- _bambiplayer addItem _bambifood;
- _bambiplayer addItem _bambidrink;
- removeHeadgear _bambiPlayer;
- {
- _cargoType = _x call ExileClient_util_cargo_getType;
- switch (_cargoType) do
- {
- case 1: { _bambiPlayer addItem _x; };
- case 2: { _bambiPlayer addWeaponGlobal _x; };
- case 3: { _bambiPlayer addBackpackGlobal _x; };
- case 4: { _bambiPlayer linkItem _x; };
- default { _bambiPlayer addItem _x; };
- };
- }
- forEach getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "loadOut");
- [_sessionID, _requestingPlayer, _spawnLocationMarkerName, _bambiPlayer, _accountData] call ExileServer_object_player_createBambi;
- }
- catch
- {
- _exception call ExileServer_util_log;
- };
Add Comment
Please, Sign In to add comment