God Mode Traders

mission.sqm (sensors)
Code:
class Sensors
{
items=9;
class Item0
{
position[]={4053.8501,364.76645,11668.645};
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zonebash";
expCond="(player distance zonebash) < 75;";
expActiv="TitleText[""Now entering trader city Bash"",""PLAIN DOWN""]; canbuild = false;";
expDesactiv="TitleText[""Now leaving trader city Bash"",""PLAIN DOWN""]; canbuild = true;";
class Effects
{
soundDet="arabian_market_1";
};
};
class Item1
{
position[]={11463.747,317.3078,11349.89};
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zoneklen";
expCond="(player distance zoneklen) < 75;";
expActiv="TitleText[""Now entering trader city Klen"",""PLAIN DOWN""]; canbuild = false;";
expDesactiv="TitleText[""Now leaving trader city Klen"",""PLAIN DOWN""]; canbuild = true;";
class Effects
{
soundDet="arabian_market_1";
};
};
class Item2
{
position[]={6325.6772,304.99033,7807.7412};
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zonestary";
expCond="(player distance zonestary) < 75;";
expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false;";
expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;";
class Effects
{
soundDet="arabian_market_1";
};
};
class Item3
{
position[]={4053.8501,364.76645,11668.645};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zonebash_safezone";
expCond="(player distance zonebash_safezone) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
 
};
};
class Item4
{
position[]={11463.747,317.3078,11349.89};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zoneklen_safezone";
expCond="(player distance zoneklen_safezone) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
 
};
};
class Item5
{
position[]={6325.6772,304.99033,7807.7412};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zonestary_safezone";
expCond="(player distance zonestary_safezone) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
 
};
};
class Item6
{
position[]={1606.6443,289.70795,7803.5156};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="bandit_safezone";
expCond="(player distance bandit_safezone) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
 
};
};
class Item7
{
position[]={12944.227,210.19823,12766.889};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Hero_safezone";
expCond="(player distance Hero_safezone) < 150;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
 
};
};
class Item8
{
position[]={12060.471,158.85699,12638.533};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Aircraft_safezone";
expCond="(player distance Aircraft_safezone) < 100;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;";
class Effects
{
 
};
};
 
};
};
 
};
 
safezone.sqf
Code:
Private ["_EH_Fired"];
 
if (isNil "inSafezone") then {
        inSafezone = false;
};
 
while {true} do {
        waitUntil { inSafeZone };
        titleText [format["Entering Safe Zone. Your weapons have been deactivated."],"PLAIN DOWN"]; titleFadeOut 4;
 
        waitUntil { player == vehicle player };
 
        thePlayer = vehicle player;
        _EH_Fired = thePlayer addEventHandler ["Fired", {
                titleText ["You can not fire your weapon in a safe zone.","PLAIN DOWN"]; titleFadeOut 4;
                NearestObject [_this select 0,_this select 4] setPos[0,0,0];
        }];
 
        player_zombieCheck = {};
        fnc_usec_damageHandler = {};
        fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
        thePlayer removeAllEventHandlers "handleDamage";
        thePlayer addEventHandler ["handleDamage", {false}];
        thePlayer allowDamage false;
 
        waitUntil { !inSafeZone };
 
        titleText [format["Exiting Safe Zone. Your weapons have been reactivated."],"PLAIN DOWN"]; titleFadeOut 4;
        thePlayer removeEventHandler ["Fired", _EH_Fired];
 
        player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
        fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
        fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
        thePlayer addEventHandler ["handleDamage", {true}];
        thePlayer removeAllEventHandlers "handleDamage";
        thePlayer allowDamage true;
};
script.txt
Code:
5 "addMagazine !"addMagazine _" !"addMagazine \"" !"addMagazine '" !"\"addMagazine\"" !addMagazineCargo !="raddMagazine = 'addMagazine'"  !="raddMagazinecode={diag_log(\"WARNING illegal RE raddMagazinecode with args:\"+str(_this));};" !="raddMagazinecode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addMagazine.sqf')" !"ate_ammo_rest != 0) then {\nplayer addMagazine [_create,_qtynew_create_ammo_rest]" !"if (_ammo > 0) then {\nplayer removeMagazines \"Quiver\";\nplayer addMagazine [\"Quiver\", _ammo];" !"mmo_rest != 0) then {\nplayer addMagazine [_consume,_qtynew_consume_ammo_res" !"ume_ammo_rest != 0) then {\nplayer addMagazine [_consume,_qtynew_consume_ammo_res" !"o_rest != 0) then {\nplayer addMagazine [_create,_qtynew_create_ammo_rest]" !"Magazine \"WoodenArrow\";\n};\nplayer addMagazine [\"Quiver\",_qty_quiverarrows+_qty_a" !"ame _x == \"ARRAY\") then {_newUnit addMagazine [_x select 0,_x select 1] } else {" !"n {\nif (_val != -1) then {\nplayer addMagazine [_item,_val];\n} else {\nplayer " !"{\n_vehicle removeMagazineTurret [_ammo,_turret];\n_vehicle addMagazineTurret [_ammo,_turret];\nplayer removeMagazine _ammo;\n\ncutText [for" !"_item = createVehicle [\"WeaponHolder\", getPosATL player, [], 1, \"CAN_COLLIDE\"];\n_item addMagazineCargoGlobal [_itemOut,_countOut];"
5 "addMagazine _" !"addMagazine _c" !"addMagazine _x" !"addMagazine _i" !"addMagazine _p" !"_invRemove);\nfor \"_x\" from 1 to _removed do {\nplayer addMagazine _meatcooked;\n};" !if (local _animalbody) then {\nfor \"_x\" from 1 to _qty do {\n_animalbody addMagazine _rawfoodtype;\n};\n" !"_selectRandomWeighted;\nif(!isNil \"_array\") then {\n_agent addMagazine _loot;\n};\n" !"\nfor \"_x\" from 1 to _third_parts_out do {\nplayer addMagazine _third_highest_bar;\n};\n" !"\nfor \"_x\" from 1 to _remainder do {\nplayer addMagazine _next_highest_bar;\n};\n"
5 "addMagazine _p" !"alive _obj) then {\n\nfor \"_x\" from 1 to _qty_out do {\nplayer addMagazine _part_out;\n};" !"removeBackpack player;\nfor \"_x\" from 1 to _qty_out do {\nplayer addMagazine _part_out;\n};" !"\nfor \"_x\" from 1 to _removed do {\nplayer addMagazine _part_in;\n};\n" !"\nfor \"_x\" from 1 to _remainder do {\nplayer addMagazine _part_out;\n};\n" !"\nfor \"_x\" from 1 to _total_parts_out do {\nplayer addMagazine _part_out;\n};" !"do {\nplayer addMagazine _part_out;\nif(_part_out == \"FoodBioMeat\") then {\n_humanityGain = _humanityGain + 20;\n};" !"if(_buy_o_sell == \"buy\") then {\nplayer addWeapon _part_out;\n} else {\nplayer addMagazine _part_out;\n};"
5 "addMagazine _i" !"\nfor \"_x\" from 1 to _countOut do {\nplayer addMagazine _itemOut;\n};" !"drop,1];\n} else {\nplayer addMagazine _itemOut;\n};" !"_invRemove) == 1) then {\nplayer addMagazine _itemNew;\n[dayz_playerUID,dayz_c" !"\nif (_isOK) then {\nif (_val != -1) then {\nplayer addMagazine [_item,_val];\n} else {\nplayer addMagazine _item;\n};\n" !"s (configfile >> \"cfgmagazines\" >> (_item))) then {_unit addMagazine _item;};" 
5 "addMagazine _c" !"ynew_create_mags_full do {\nplayer addMagazine _create;\n};\nif (_qtynew_create_amm" !"new_consume_mags_full do {\nplayer addMagazine _consume;\n};\nif (_qtynew_consume_a" !"[player,\"refuel\",0,false] call dayz_zombieSpeak;\nplayer addMagazine _canName;\ncutText " !"[player,\"refuel\",0,false] call dayz_zombieSpeak;\nplayer addMagazine _canName+\"Empty\";\ncutText "
5 "addMagazine _x" !"{player addMagazine _x;} forEach _temp_removed_array;\n\ncutText" !" 0,_x select 1] } else { _newUnit addMagazine _x };\n\n} forEach _magazines;\n\n{\n_n" !" >> _x);\nif (_isOK) then {\nplayer addMagazine _x;\n};\n} forEach _wpns;" !"gFile >> "CfgMagazines" >> _x);if (_isOK) then {\nplayer addMagazine _x;\n};\n} forEach _mags;\n{\n_isOK = isClass(configFile >> "C"
5 "addMagazine \"" !"for \"_x\" from 1 to _removed do {\nplayer addMagazine \"ItemWaterbottleBoiled\";\n};" !"Jerrycan\"] call BIS_fnc_invRemove) == 1) then {\nplayer addMagazine \"ItemJerrycanEmpty\";\n" !"if(([player,_x] call BIS_fnc_invRemove) == 1) then {\nif (_x == ItemFuelBarrelEmpty) then {\nplayer addMagazine "ItemFuelBarrel";\n} else {\nplayer addMagazine "ItemJerrycan";\n};" !"n player_alertZombies;\nplayer addMagazine \"ItemWaterbottleUnfilled\";" !"WaterbottleUnfilled\"] call BIS_fnc_invRemove) == 1) then {\nplayer addMagazine \"ItemWaterbottle\";\n};" !"Waterbottle\"] call BIS_fnc_invRemove) == 1) then {\nplayer addMagazine \"ItemWaterbottleUnfilled\";\n};" !"if (local _zombiebody) then {\n_zombiebody addMagazine \"ItemZombieParts\";" !"ayer playActionNow \"stop\";\n};\nplayer addMagazine \"ItemBandage\";\n};"
5 "addMagazine '" !" addMagazine 'crowbar_swing';" !" addMagazine 'hatchet_swing';" !" addMagazine 'Machete_swing';" !" addMagazine 'Fishing_Swing';"
 
followed everything to the letter and the players on the game are getting put to the lobby so they have to load in. i dont understand as it works fine for myself just other players on my server get booted. anyone got any ideas?
 
Back
Top