Raven-DMW

Ranks

7 posts in this topic

Hello

Can someone help with fixing the ranks?

I've been messing about for hours and had no joy, I've seen the code @second_coming and @BetterDeadThanZed posted http://www.exilemod.com/topic/12321-random-uniforms-for-bambis/

So I thought i'd be smart and change it to make Ranks work again

Here are my two files

ExileServer_object_player_createBambi.sqf

Spoiler

/**
 * ExileServer_object_player_createBambi
 *
 * 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","_requestingPlayer","_spawnLocationMarkerName","_bambiPlayer","_accountData","_direction","_position","_spawnAreaPosition","_spawnAreaRadius","_clanID","_clanData","_clanGroup","_player","_devFriendlyMode","_devs","_parachuteNetID","_spawnType","_parachuteObject"];
_sessionID = _this select 0;
_requestingPlayer = _this select 1;
_spawnLocationMarkerName = _this select 2;
_bambiPlayer = _this select 3;
_accountData = _this select 4;
_direction = random 360;
if ((count ExileSpawnZoneMarkerPositions) isEqualTo 0) then
{
 _position = call ExileClient_util_world_findCoastPosition;
 if ((toLower worldName) isEqualTo "namalsk") then
 {
  while {(_position distance2D [76.4239, 107.141, 0]) < 100} do
  {
   _position = call ExileClient_util_world_findCoastPosition;
  };
 };
}
else
{
 _spawnAreaPosition = getMarkerPos _spawnLocationMarkerName;
 _spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius");
 _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
 while {surfaceIsWater _position} do
 {
  _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
 };
};
_name = name _requestingPlayer;
_clanID = (_accountData select 3);
if !((typeName _clanID) isEqualTo "SCALAR") then
{
 _clanID = -1;
 _clanData = [];
}
else
{
 _clanData = missionNamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]];
 if(isNull (_clanData select 5))then
 {
  _clanGroup = createGroup independent;
  _clanData set [5,_clanGroup];
  _clanGroup setGroupIdGlobal [_clanData select 0];
  missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData];
 }
 else
 {
  _clanGroup = (_clanData select 5);
 };
 [_player] joinSilent _clanGroup;
};
_bambiPlayer setPosATL [_position select 0,_position select 1,0];
_bambiPlayer disableAI "FSM";
_bambiPlayer disableAI "MOVE";
_bambiPlayer disableAI "AUTOTARGET";
_bambiPlayer disableAI "TARGET";
_bambiPlayer disableAI "CHECKVISIBLE";
_bambiPlayer setDir _direction;
_bambiPlayer setName _name;
_bambiPlayer setVariable ["ExileMoney", 0, true];
_bambiPlayer setVariable ["ExileScore", (_accountData select 0)];
_bambiPlayer setVariable ["ExileKills", (_accountData select 1)];
_bambiPlayer setVariable ["ExileDeaths", (_accountData select 2)];
_bambiPlayer setVariable ["ExileClanID", _clanID];
_bambiPlayer setVariable ["ExileClanData", _clanData];
_bambiPlayer setVariable ["ExileHunger", 100];
_bambiPlayer setVariable ["ExileThirst", 100];
_bambiPlayer setVariable ["ExileTemperature", 37];
_bambiPlayer setVariable ["ExileWetness", 0];
_bambiPlayer setVariable ["ExileAlcohol", 0];
_bambiPlayer setVariable ["ExileName", _name];
_bambiPlayer setVariable ["ExileOwnerUID", getPlayerUID _requestingPlayer];
_bambiPlayer setVariable ["ExileIsBambi", true];
_bambiPlayer setVariable ["ExileXM8IsOnline", false, true];
_bambiPlayer setVariable ["ExileLocker", (_accountData select 4), true];
_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode");
if (_devFriendlyMode isEqualTo 1) then
{
 _devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
 {
  if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
  {
   if((name _requestingPlayer) isEqualTo (_x select 1))then
   {
    _bambiPlayer setVariable ["ExileMoney", 500000, true];
    _bambiPlayer setVariable ["ExileScore", 100000];
   };
  };
 }
 forEach _devs;
};
_parachuteNetID = "";

if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteSpawning")) isEqualTo 1) then
{
 _position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")];
 if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then
 {
  _bambiPlayer addBackpackGlobal "B_Parachute"; 
  _bambiPlayer setPosATL _position;
  _spawnType = 2;
 }
 else
 {
  _parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"];
  _parachuteObject setDir _direction;
  _parachuteObject setPosATL _position;
  _parachuteObject enableSimulationGlobal true;
  _parachuteNetID = netId _parachuteObject;
  _spawnType = 1;
 };
}
else
{
 _spawnType = 0;
};

_respect = ExileClientPlayerScore;

switch (true) do
{
    case (_respect > 2500 && _respect < 4999):
    {
 _bambiPlayer forceAddUniform "U_C_Poloshirt_redwhite";
 _bambiPlayer addVest "V_BandollierB_oli";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 ///_bambiPlayer addBackpack "B_AssaultPack_Kerry";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 //   systemChat "Your rank is Enforcer";
  };
  
    case (_respect > 5000 && _respect < 9999):
   {
 _bambiPlayer forceAddUniform "U_Competitor";
 _bambiPlayer addVest "V_BandollierB_oli";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing"; 
 //_bambiPlayer addBackpack "B_AssaultPack_Kerry";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";

//   systemChat "Your rank is Slayer";
   };
  
 case (_respect > 9999 && _respect < 19999):
   {
 _bambiPlayer forceAddUniform "U_Rangermaster";
 _bambiPlayer addHeadgear "H_Booniehat_dgtl";
 _bambiPlayer addVest "V_BandollierB_oli";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 //_bambiPlayer addBackpack "B_TacticalPack_mcamo";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Hit Man";
   };
  
    case (_respect > 19999 && _respect < 29999):
   {
 _bambiPlayer forceAddUniform "U_B_CombatUniform_mcam_worn";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Booniehat_dgtl";
 _bambiPlayer addItemToVest "hgun_mas_grach_F";
 _bambiPlayer addItemToVest "acc_mas_flash_gun";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
 //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Executioner";
   };
  
    case (_respect > 29999 && _respect < 39999):
   {
    _bambiPlayer forceAddUniform "U_C_HunterBody_grn";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Booniehat_dgtl";
 _bambiPlayer addItemToVest "hgun_mas_grach_F";
 _bambiPlayer addItemToVest "acc_mas_flash_gun";
 _bambiPlayer addItemToVest "optic_mas_MRD";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
  //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
 //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
 //_bambiPlayer addHandgunItem "optic_mas_MRD";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";

//  systemChat "Your rank is Tyrant";
   };
  
    case (_respect > 39999 && _respect < 49999):
   {
 _bambiPlayer forceAddUniform "U_I_G_Story_Protagonist_F";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Cap_brn_SPECOPS";
 _bambiPlayer addItemToVest "hgun_mas_grach_F";
 _bambiPlayer addItemToVest "acc_mas_flash_gun";
 _bambiPlayer addItemToVest "muzzle_mas_snds_LM";
 _bambiPlayer addItemToVest "optic_Yorris";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
  //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
 //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_LM";
 //_bambiPlayer addHandgunItem "optic_Yorris";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
     
//  systemChat "Your rank is Triggerman";
   };
  
    case (_respect > 49999 && _respect < 69999):
   {
 _bambiPlayer forceAddUniform "U_I_G_resistanceLeader_F";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Cap_oli_hs";
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
  //_bambiPlayer addWeapon "hgun_mas_uzi_F";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Trooper";
   };
  
    case (_respect > 69999 && _respect < 89999):
   {
 _bambiPlayer forceAddUniform "U_B_survival_uniform";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_ShemagOpen_tan";
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "muzzle_mas_snds_L";
 _bambiPlayer addItemToVest "optic_mas_MRD";
  //_bambiPlayer addWeaponGlobal "hgun_mas_uzi_F";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
 //_bambiPlayer addHandgunItem "optic_mas_MRD";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is High Executioner";
   };
  
     case (_respect > 89999 && _respect < 149999):
   {
 _bambiPlayer forceAddUniform "U_BG_Guerrilla_6_1";
 //for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "30Rnd_mas_9x21_Stanag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Beret_blk";
  //_bambiPlayer addWeapon "arifle_mas_mp5sd";
 //_bambiPlayer addPrimaryWeaponItem "optic_Aco_smg";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "muzzle_mas_snds_L";
 _bambiPlayer addItemToVest "optic_mas_MRD";
 //_bambiPlayer addWeapon "hgun_mas_uzi_F";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
 //_bambiPlayer addHandgunItem "optic_mas_MRD";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer linkItem "ItemGPS";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Reaper";
   };

     case (_respect > 149999):
   {
 _bambiPlayer forceAddUniform "Exile_Uniform_Woodland";
 //for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "30Rnd_mas_9x39_mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_ShemagOpen_khk";
  //_bambiPlayer addWeaponGlobal "arifle_mas_asval";
 //_bambiPlayer addPrimaryWeaponItem "acc_flashlight";
 //_bambiPlayer addPrimaryWeaponItem "optic_mas_kobra";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToVest "25Rnd_mas_9x19_Mag";};
 //_bambiPlayer addWeaponGlobal "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "optic_Yorris";
 _bambiPlayer addItemToVest "muzzle_mas_snds_L";
 //_bambiPlayer addHandgunItem "optic_Yorris";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Supreme Overlord";
   };
    default
    { 
// systemChat "Your rank is Inmate";
 };
};
 
_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
_bambiPlayer call ExileServer_object_player_database_insert;
_bambiPlayer call ExileServer_object_player_database_update;
[
 _sessionID,
 "createPlayerResponse",
 [
  _bambiPlayer,
  _parachuteNetID,
  str (_accountData select 0),
  (_accountData select 1),
  (_accountData select 2),
  100,
  100,
  0,
  (getNumber (configFile >> "CfgSettings" >> "BambiSettings" >> "protectionDuration")) * 60,
  _clanData,
  _spawnType
 ]
]
call ExileServer_system_network_send_to;
[_sessionID, _bambiPlayer] call ExileServer_system_session_update;
true

ExileServer_object_player_network_createPlayerRequest.sqf

Spoiler

/**
 * 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;
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"];

_respect = ExileClientPlayerScore;

switch (true) do
{
    case (_respect > 2500 && _respect < 4999):
    {
 _bambiPlayer forceAddUniform "U_C_Poloshirt_redwhite";
 _bambiPlayer addVest "V_BandollierB_oli";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 ///_bambiPlayer addBackpack "B_AssaultPack_Kerry";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 //   systemChat "Your rank is Enforcer";
  };
  
    case (_respect > 5000 && _respect < 9999):
   {
 _bambiPlayer forceAddUniform "U_Competitor";
 _bambiPlayer addVest "V_BandollierB_oli";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing"; 
 //_bambiPlayer addBackpack "B_AssaultPack_Kerry";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";

//   systemChat "Your rank is Slayer";
   };
  
 case (_respect > 9999 && _respect < 19999):
   {
 _bambiPlayer forceAddUniform "U_Rangermaster";
 _bambiPlayer addHeadgear "H_Booniehat_dgtl";
 _bambiPlayer addVest "V_BandollierB_oli";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 //_bambiPlayer addBackpack "B_TacticalPack_mcamo";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Hit Man";
   };
  
    case (_respect > 19999 && _respect < 29999):
   {
 _bambiPlayer forceAddUniform "U_B_CombatUniform_mcam_worn";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Booniehat_dgtl";
 _bambiPlayer addItemToVest "hgun_mas_grach_F";
 _bambiPlayer addItemToVest "acc_mas_flash_gun";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
  //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
 //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Executioner";
   };
  
    case (_respect > 29999 && _respect < 39999):
   {
    _bambiPlayer forceAddUniform "U_C_HunterBody_grn";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Booniehat_dgtl";
 _bambiPlayer addItemToVest "hgun_mas_grach_F";
 _bambiPlayer addItemToVest "acc_mas_flash_gun";
 _bambiPlayer addItemToVest "optic_mas_MRD";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
  //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
 //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
 //_bambiPlayer addHandgunItem "optic_mas_MRD";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";

//  systemChat "Your rank is Tyrant";
   };
  
    case (_respect > 39999 && _respect < 49999):
   {
 _bambiPlayer forceAddUniform "U_I_G_Story_Protagonist_F";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "17Rnd_mas_9x21_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Cap_brn_SPECOPS";
 _bambiPlayer addItemToVest "hgun_mas_grach_F";
 _bambiPlayer addItemToVest "acc_mas_flash_gun";
 _bambiPlayer addItemToVest "muzzle_mas_snds_LM";
 _bambiPlayer addItemToVest "optic_Yorris";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
  //_bambiPlayer addWeaponGlobal "hgun_mas_grach_F";
 //_bambiPlayer addHandgunItem "acc_mas_flash_gun";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_LM";
 //_bambiPlayer addHandgunItem "optic_Yorris";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
     
//  systemChat "Your rank is Triggerman";
   };
  
    case (_respect > 49999 && _respect < 69999):
   {
 _bambiPlayer forceAddUniform "U_I_G_resistanceLeader_F";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Cap_oli_hs";
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
  //_bambiPlayer addWeapon "hgun_mas_uzi_F";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Trooper";
   };
  
    case (_respect > 69999 && _respect < 89999):
   {
 _bambiPlayer forceAddUniform "U_B_survival_uniform";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_ShemagOpen_tan";
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "muzzle_mas_snds_L";
 _bambiPlayer addItemToVest "optic_mas_MRD";
  //_bambiPlayer addWeaponGlobal "hgun_mas_uzi_F";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
 //_bambiPlayer addHandgunItem "optic_mas_MRD";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is High Executioner";
   };
  
     case (_respect > 89999 && _respect < 149999):
   {
 _bambiPlayer forceAddUniform "U_BG_Guerrilla_6_1";
 //for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "30Rnd_mas_9x21_Stanag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_Beret_blk";
  //_bambiPlayer addWeapon "arifle_mas_mp5sd";
 //_bambiPlayer addPrimaryWeaponItem "optic_Aco_smg";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "25Rnd_mas_9x19_Mag";};
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "muzzle_mas_snds_L";
 _bambiPlayer addItemToVest "optic_mas_MRD";
 //_bambiPlayer addWeapon "hgun_mas_uzi_F";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
 //_bambiPlayer addHandgunItem "optic_mas_MRD";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer linkItem "ItemGPS";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Reaper";
   };

     case (_respect > 149999):
   {
 _bambiPlayer forceAddUniform "Exile_Uniform_Woodland";
 //for "_i" from 1 to 2 do {_bambiPlayer addItemToUniform "30Rnd_mas_9x39_mag";};
 _bambiPlayer addVest "TRYK_V_Sheriff_BA_T5";
 //_bambiPlayer addBackpack "B_Bergen_mcamo";
 _bambiPlayer addHeadgear "H_ShemagOpen_khk";
  //_bambiPlayer addWeaponGlobal "arifle_mas_asval";
 //_bambiPlayer addPrimaryWeaponItem "acc_flashlight";
 //_bambiPlayer addPrimaryWeaponItem "optic_mas_kobra";
 for "_i" from 1 to 2 do {_bambiPlayer addItemToVest "25Rnd_mas_9x19_Mag";};
 //_bambiPlayer addWeaponGlobal "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "hgun_mas_uzi_F";
 _bambiPlayer addItemToVest "optic_Yorris";
 _bambiPlayer addItemToVest "muzzle_mas_snds_L";
 //_bambiPlayer addHandgunItem "optic_Yorris";
 //_bambiPlayer addHandgunItem "muzzle_mas_snds_L";
 _bambiPlayer addItem "Exile_Item_Foolbox";
 _bambiPlayer addItem "Exile_Item_Matches";
 _bambiPlayer linkItem "ItemGPS";
 //_bambiPlayer addItemToVest "Exile_Melee_Axe";
 _bambiPlayer addItemToVest "Exile_Magazine_Swing";
 _bambiPlayer addWeaponGlobal "Exile_Melee_Axe";
 //_bambiPlayer addMagazine "Exile_Magazine_Swing";
 _bambiPlayer addItem "Exile_Item_EMRE";
 _bambiPlayer addItem "Exile_Item_PlasticBottleFreshWater";
 _bambiPlayer addItem "Exile_Item_InstaDoc";
//  systemChat "Your rank is Supreme Overlord";
   };
    default
    { 
// systemChat "Your rank is Inmate";
 };
};
 
 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;
};

I thought it was maybe _respect = ExileClientPlayerScore; as the old code was _respect = (_accountData select 1); and it wasn't calling the correct detail anymore

Anyone able to help?

Cheers

Share this post


Link to post
Share on other sites
Advertisement

my hero!!!

Dude thanks you so much that worked, I messed about for hours with that!!! I knew it wasn't getting the correct value but just didn't know _accountData select 0 was respect points

Anyone who wants the code remember to replace _respect = ExileClientPlayerScore; with _respect = (_accountData select 0);

Thanks again dude!!!

Share this post


Link to post
Share on other sites
On 7/2/2016 at 8:58 AM, Raven-DMW said:

my hero!!!

Dude thanks you so much that worked, I messed about for hours with that!!! I knew it wasn't getting the correct value but just didn't know _accountData select 0 was respect points

Anyone who wants the code remember to replace _respect = ExileClientPlayerScore; with _respect = (_accountData select 0);

Thanks again dude!!!

CAn you please teach me how todo this? :( been asking for days i havent really get any reply please help :(

 

Share this post


Link to post
Share on other sites
On 9/22/2016 at 7:34 PM, Raven-DMW said:

All the code you need is up above, what issues are you having?

everytime i put those 2 it always fk up the server even if i replace the script... do i need to put them both at the same time? im really confuse T_T

Share this post


Link to post
Share on other sites
On 24/09/2016 at 7:22 AM, ุ said:

everytime i put those 2 it always fk up the server even if i replace the script... do i need to put them both at the same time? im really confuse T_T

Yeah same here, i think its because it's not supported on Exile 1.0.2. It always fails to create Bambi characters.

Edit: Here you go, modified for Exile 1.0.2

ExileServer_object_player_createBambi.sqf     -    http://pastebin.com/5Y1dBGB1

ExileServer_object_player_network_createPlayerRequest.sqf     -    http://pastebin.com/r6DCmHjt

Edited by blacksheep25
Added fix
1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.