i have been trying to give different loadout depending on what typeOF player you select at the server slot selection.
Everything works just fine if i select a normal "VirtualMan_EPOCH" slot. It's when i select "B_sniper_F" or "B_Helipilot_F" that the script is skipping part.
I don't get any error on my .rpt but it seems that the script is skipping a couple of line before ending.
So if i select for exemple (typeOf player != "B_sniper_F"), then it will go trough the code but will be skipping those lines:
player setpos _pos1; player enableFatigue false; waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"}; player switchCamera "EXTERNAL"; HALV_takegive = [player,150]; publicVariableServer "HALV_takegive";
Then the script will continue to the next part that is the "check" to see if player is either Epoch, sniper or pilot.
It's as if the script is executed before the player as spanwed on the map and don't have time to execute the first couple of line. Any help would be really appreciated to know why some of the line are skipped but not others.
This is the script i made:
Line to check are:
# //waitUntil {typeOF player != "VirtualMan_EPOCH" or typeOf player != "B_sniper_F" or typeOf player != "B_Helipilot_F"};
This is the part that is skipped on script execution:
# player setpos _pos1; player enableFatigue false; waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"}; player switchCamera "EXTERNAL"; HALV_takegive = [player,150]; publicVariableServer "HALV_takegive";
private ["_adminlist"];
//-
waitUntil {alive vehicle player};
//waitUntil {typeOF player != "VirtualMan_EPOCH" or typeOf player != "B_sniper_F" or typeOf player != "B_Helipilot_F"};
waitUntil {typeOF player != "VirtualMan_EPOCH"};
//-
_pos1 = [14636.907, 16770.1, 0.00143814];
//_adminlist = ["xx","xx","xx","xx","xx","xx"];
//--------------------------------------------------------------------//
if ((EPOCH_playerAliveTime < 0.1) && (EPOCH_playerCrypto < 1)) then
{
//spawning_script = [] execVM "custom\spawn.sqf";
//waitUntil {scriptDone spawning_script};
player setpos _pos1;
player enableFatigue false;
waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"};
player switchCamera "EXTERNAL";
HALV_takegive = [player,150];
publicVariableServer "HALV_takegive";
/* if (typeOf player == "VirtualMan_EPOCH") then
{
systemchat "YOU ARE A NORMAL EPOCH PLAYER, TEST!";
};
if (typeOf player == "B_sniper_F") then
{
systemchat "YOU ARE A SNIPER, TEST!";
};
if (typeOf player == "B_Helipilot_F") then
{
systemchat "YOU ARE A PILOT, TEST!";
};*/
/* //For Admin ASORGS Gear Selector
if ((getPlayerUID player) in _adminlist) then
{
systemchat " -=ADMIN=- Detected: -Gear selector loaded. Type !gear to access it.-";
//player addAction ["<t color='#6a8a19'>Gear Selector</t>", "ASORGS\open.sqf", "", 0, true, true, "", ""];
};*/
}
else
{
systemchat "Welcome back!";
player enableFatigue false;
waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"};
player switchCamera "EXTERNAL";
/* if (typeOf player == "VirtualMan_EPOCH") then
{
systemchat "YOU ARE A NORMAL EPOCH PLAYER, TEST!";
};
if (typeOf player == "B_sniper_F") then
{
systemchat "YOU ARE A SNIPER, TEST!";
};
if (typeOf player == "B_Helipilot_F") then
{
systemchat "YOU ARE A PILOT, TEST!";
};*/
/* //For Admin ASORGS Gear Selector
if ((getPlayerUID player) in _adminlist) then
{
systemchat " -=ADMIN=- Detected: -Gear selector loaded. Type !gear to access it.-";
//player addAction ["<t color='#6a8a19'>Gear Selector</t>", "ASORGS\open.sqf", "", 0, true, true, "", ""];
};*/
};
//--------------------------------------------------------------------//
Question
TolH
Hello,
i have been trying to give different loadout depending on what typeOF player you select at the server slot selection.
Everything works just fine if i select a normal "VirtualMan_EPOCH" slot. It's when i select "B_sniper_F" or "B_Helipilot_F" that the script is skipping part.
I don't get any error on my .rpt but it seems that the script is skipping a couple of line before ending.
So if i select for exemple (typeOf player != "B_sniper_F"), then it will go trough the code but will be skipping those lines:
player setpos _pos1;
player enableFatigue false;
waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"};
player switchCamera "EXTERNAL";
HALV_takegive = [player,150];
publicVariableServer "HALV_takegive";
Then the script will continue to the next part that is the "check" to see if player is either Epoch, sniper or pilot.
It's as if the script is executed before the player as spanwed on the map and don't have time to execute the first couple of line. Any help would be really appreciated to know why some of the line are skipped but not others.
This is the script i made:
Line to check are:
# //waitUntil {typeOF player != "VirtualMan_EPOCH" or typeOf player != "B_sniper_F" or typeOf player != "B_Helipilot_F"};
This is the part that is skipped on script execution:
# player setpos _pos1;
Edited by TolHplayer enableFatigue false;
waitUntil{!isNull (findDisplay 46) && !dialog && cameraOn isEqualTo player && cameraView == "INTERNAL"};
player switchCamera "EXTERNAL";
HALV_takegive = [player,150];
publicVariableServer "HALV_takegive";
Link to comment
Share on other sites
38 answers to this question
Recommended Posts