[SUPPORT] Matt's Random Skin based on Sex

I tried this in Dayz 1.8.1 and couldn't get it to work. I just spawn with the default skin. I have it working on my Epoch servers, however.

For the Dayz 1.8.1 server, I made this change in the server_playerSetup.sqf,

I changed this:
Code:
PVCDZ_plr_Login2 = [_worldspace,_state,_Achievements];

To this:
Code:
PVCDZ_plr_Login2 = [_worldspace,_state,_Achievements,_randomSpot];

There was no dayzPlayerLogin2 = [_worldspace,_state]; in Dayz 1.8.1 so I figured this was where I need to make the change.

Also, the init.sqf code is slightly changed to look like this:

Code:
    sexcheck = compile preprocessFileLineNumbers "custom\sexcheck\sexcheck.sqf";
    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (PVCDZ_plr_Login2 select 2) then
    {
        player spawn sexcheck;
    };  
};

Any ideas?
 
I tried this in Dayz 1.8.1 and couldn't get it to work. I just spawn with the default skin. I have it working on my Epoch servers, however.

For the Dayz 1.8.1 server, I made this change in the server_playerSetup.sqf,

I changed this:
Code:
PVCDZ_plr_Login2 = [_worldspace,_state,_Achievements];

To this:
Code:
PVCDZ_plr_Login2 = [_worldspace,_state,_Achievements,_randomSpot];

There was no dayzPlayerLogin2 = [_worldspace,_state]; in Dayz 1.8.1 so I figured this was where I need to make the change.

Also, the init.sqf code is slightly changed to look like this:

Code:
    sexcheck = compile preprocessFileLineNumbers "custom\sexcheck\sexcheck.sqf";
    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (PVCDZ_plr_Login2 select 2) then
    {
        player spawn sexcheck;
    }; 
};

Any ideas?
that's calling on it to execute the _Achievements variable which i've never seen before, so make it look like
Code:
sexcheck = compile preprocessFileLineNumbers "custom\sexcheck\sexcheck.sqf";
    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (PVCDZ_plr_Login2 select 3) then
    {
        player spawn sexcheck;
    };
};
 
ALSO, NOTE FOR EPOCH THIS IS NO LONGER NECESSARY AS OF 1.0.5 You can just put a config line in your init.sqf like so
Code:
DZE_defaultSkin = [["male","male","male"],["female","female","female"]];
 
I'm getting errors in infistar with it banning players says, badskin, anyone know what the allowed action would be to stop this?
 
I've never heard of that issue Zedmau5, are you sure it's this script causing it? I have plenty of buddies that are using this on semi-popular servers straight out of the box, that is one strange error
 
It's possible. Anyway you can check the logs that it spits out? I'm about to go to bed but I'll look into it tomorrow
 
Im not the best at coding, but are ur script supposed to give a random skin everytime u join the server ? :) Because thats pretty much what its doing when i get it to work on the epoch version.
 
Im not the best at coding, but are ur script supposed to give a random skin everytime u join the server ? :) Because thats pretty much what its doing when i get it to work on the epoch version.
Then you have the init.sqf set up wrong. If you set up the execution wrong then it will do that.
 
Well my execution code seems to be right! though!, i havent installed huge amount of scripts on the server (yet), so i dont think that i have anything to overwrite ur script! ;)
//Random Start Skin
sexcheck = compile preprocessFileLineNumbers "scripts\sexcheck.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn sexcheck;
};

I linked my init.sqf if u wanna take a quick look! thx!
/*
For DayZ Epoch
Addons Credits: Jetski Yanahui by Kol9yN, Zakat, Gerasimow9, YuraPetrov, zGuba, A.Karagod, IceBreakr, Sahbazz
*/
startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];

//REALLY IMPORTANT VALUES
dayZ_instance = 11; //The instance
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;

//disable greeting menu
player setVariable ["BIS_noCoreConversations", true];
//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio false;
// May prevent "how are you civillian?" messages from NPC
enableSentences false;

// DayZ Epoch config
spawnShoremode = 0; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500

MaxVehicleLimit = 300; // Default = 50
MaxDynamicDebris = 500; // Default = 100
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 30; // Default = 30
DZE_selfTransfuse = true;
DZE_selfTransfuse_Values = [6000, 10, 600];
//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","ItemHatchet_DZE"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

dayz_paraSpawn = false;

dayz_minpos = -1;
dayz_maxpos = 16000;

dayz_sellDistance_vehicle = 10;
dayz_sellDistance_boat = 40;
dayz_sellDistance_air = 60;

dayz_maxAnimals = 5; // Default: 8
dayz_tameDogs = true;
DynamicVehicleDamageLow = 0; // Default: 0
DynamicVehicleDamageHigh = 100; // Default: 100

DZE_BuildOnRoads = false; // Default: False

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
dayz_fullMoonNights = true;

//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders.sqf"; //Compile trader configs
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile Custom compiles
progressLoadingScreen 1.0;

"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

if (isServer) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";
//Compile vehicle configs

// Add trader citys
_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "playerspawn.sqf";}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_nul = [] execVM "playerspawn.sqf";

// Epoch Admin Tools
[] execVM "admintools\AdminList.sqf";
if ( !((getPlayerUID player) in AdminList) && !((getPlayerUID player) in ModList) && !((getPlayerUID player) in tempList)) then
{
[] execVM "\z\addons\dayz_code\system\antihack.sqf";
};
// Epoch Admin Tools
[] execVM "admintools\AdminList.sqf";
//Lights
//[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

};

#include "\z\addons\dayz_code\system\REsec.sqf"

//Start Dynamic Weather
execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";


#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"

// Epoch Admin Tools
[] execVM "admintools\Activate.sqf";
//Start music
//[] execVM "playerspawn.sqf";

//Random Start Skin
sexcheck = compile preprocessFileLineNumbers "scripts\sexcheck.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
player spawn sexcheck;
};
 
dunno man. the init prevents it from being activated unless the dude has died or is new to the server.
 
Back
Top