ShootingBlanks
OpenDayZ Guru!
arma and dayz make MASSIVE use of setvariable to store information about an object, ai or vehicle .... embrace that philosophy.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if ( cursorTarget isKindOf "Infostand_2_EP1" && (player distance cursorTarget) < 2 && (cursortarget getvariable["Entertype", -1] == 1) ) then {
if (s_player_bunker < 0) then {
s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("Enter The Trader") +"</t>"),"scripts\trader\bunkerin.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_bunker;
s_player_bunker = -1;
};
if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 && (cursortarget getvariable["Exittype", 0] == 0) ) then {
if (s_player_bunkero < 0) then {
s_player_bunkero = player addaction[("<t color=""#0000ff"">" + ("Leave the Trader") +"</t>"),"scripts\trader\bunkerout.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_bunkero;
s_player_bunkero = -1;
};
Code:if ( cursorTarget isKindOf "Infostand_2_EP1" && (player distance cursorTarget) < 2 && (cursortarget getvariable["Entertype", -1] == 1) ) then { if (s_player_bunker < 0) then { s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("Enter The Trader") +"</t>"),"scripts\trader\bunkerin.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_bunker; s_player_bunker = -1; }; if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 && (cursortarget getvariable["Entertype", -1] == 0) ) then { if (s_player_bunkero < 0) then { s_player_bunkero = player addaction[("<t color=""#0000ff"">" + ("Leave the Trader") +"</t>"),"scripts\trader\bunkerout.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_bunkero; s_player_bunkero = -1; };
if (isServer) then {
infoArray = [
[8374.78,15431.3,0.131453],
[9081.77,5452.34,0.00144196],
[9249.63,5522.89,0.00144196],
[etc],
[etc],
[x 50]
];
randomloc = infoArray select (round (random 50));
_this = createVehicle ["Infostand_2_EP1", randomloc, [], 0, "CAN_COLLIDE"];
_this setvariable[" Entertype", 1];
};
if (isServer) then {
_vehicle_157 = objNull;
if (true) then
{
_this = createVehicle ["Infostand_2_EP1", [16423.408, 18363.781, 3.6052532], [], 0, "CAN_COLLIDE"];
_vehicle_157 = _this;
_this setvariable[" Entertype", 1];
_this setDir -107.81516;
_this setPos [16423.408, 18363.781, 3.6052532];
};
};
_vehicle_39 = objNull;
if (true) then
{
_this = createVehicle ["Infostand_1_EP1", [12466.351, 6759.3394, 0.00061482762], [], 0, "CAN_COLLIDE"];
_vehicle_39 = _this;
_this setvariable[" Entertype", 0];
_this setDir 78.223656;
_this setPos [12466.351, 6759.3394, 0.00061482762];
};
if ( cursorTarget isKindOf "Infostand_2_EP1" && (player distance cursorTarget) < 2 && (cursortarget getvariable["Entertype", -1] == 1) ) then {
if (s_player_bunker < 0) then {
s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("Enter The Trader") +"</t>"),"scripts\trader\bunkerin.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_bunker;
s_player_bunker = -1;
};
if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 && (cursortarget getvariable["Entertype", -1] == 0) ) then {
if (s_player_bunkero < 0) then {
s_player_bunkero = player addaction[("<t color=""#0000ff"">" + ("Leave the Trader") +"</t>"),"scripts\trader\bunkerout.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_bunkero;
s_player_bunkero = -1;
};
.....................
player removeAction s_garage_dialog;
s_garage_dialog = -1;
player removeAction s_givemoney_dialog;
s_givemoney_dialog = -1;
player removeAction s_bank_dialog;
s_bank_dialog = -1;
player removeAction s_bank_dialog2;
s_bank_dialog2 = -1;
player removeAction s_player_bunker;
s_player_bunker = -1;
player removeAction s_player_bunkero;
s_player_bunkero = -1;
...............
s_player_bunker = -1;
s_player_bunkero = -1;
...............
if ( cursorTarget isKindOf "Infostand_2_EP1" && (player distance cursorTarget) < 2 ) then {
if (s_player_bunker < 0) then {
s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("Enter The Trader") +"</t>"),"scripts\trader\bunkerin.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_bunker;
s_player_bunker = -1;
};
if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 ) then {
if (s_player_bunkero < 0) then {
s_player_bunkero = player addaction[("<t color=""#0000ff"">" + ("Leave the Trader") +"</t>"),"scripts\trader\bunkerout.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_bunkero;
s_player_bunkero = -1;
};