Jump to content

chaingun427

Member
  • Content Count

    125
  • Joined

  • Last visited

About chaingun427

  • Rank
    Hardened

Recent Profile Visitors

811 profile views
  1. Well it's not exactly a Taviana issue, I think I got it Fixed. I had Full moon nights enabled, and it sets a static date in the server_functions.sqf. Somehow between that date (6/6/12) and my Hive.ini (same date) and whatever this script is doing it was going nuts, so i turned off full moon nights.
  2. The times aren't the problem, it's the position on the sun, which does change based on your server date. I'm playing on Taviana and with it hard coded to Sep 21 in my hive.ini, it's a long sunlit day with a normal arc through the sky, until I enable this mod and it moves 35 degrees to the east and never fully rises
  3. For whatever reason it's not working for me. I tried setting as static date with this disabled and it works fine, the sun rises in a normal arc across the sky. With this mod enabled it is like living in alaska, the sun never fully rises just moves in an arc across the eastern sky, it's like it's perpetually dawn and very annoying. Could I just remove this part of the code and have it revert to my static date? "cad_pvar_server_date" addPublicVariableEventHandler {(_this select 1) call donn_setdate;}; donn_setdate = { private ["_dateSer","_dateCli","_date_diff"]; donn_speed = _this select 1; 0 setOvercast 0; _dateSer = dateToNumber (_this select 0); _dateCli = dateToNumber date; _date_diff = (_dateSer-_dateCli)*12*31*24; if (abs _date_diff > 5/60) then {setDate (_this select 0);}; }; };
  4. Does this allow the date to be set to a static one? If so how can I implement it?
  5. Bump for a way to set it to a static date. On Taviana the sun never seems to rise very high and its getting annoying
  6. Tried at the beginning and end of that line just for giggles and same situation. Maybe I can't use the MAP_Heli_H_Cross Class? It's a pain to work with in the editor anyways but I know it's not used anywhere else on the map. Also no errors in the local or server RPT files that point toward this script, just one from my bury/eat body script.
  7. This didn't work, No option to claim anywhere, with the line you gave me removed it works though. /***********************************/ /* Vehicle Key Changer v1.5.4 */ /* Written by OtterNas3 */ /* January, 11, 2014 */ /* Last update: 26/10/2014 */ /* Advanced by hellraver */ /***********************************/ ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Edit these settings to fit your needs/likes // ///////////////////////////////////////////////// ///////////////////////////////////////////////// ///// Claim Vehicles that do not have a Key ///// ///////// 0 = Not allowed | 1 = Allowed ///////// vkc_claimKey = 1; ///////////////////////////////////////////////// /////// Change Key to create a Masterkey //////// ///////// 0 = Not allowed | 1 = Allowed ///////// vkc_changeKey = 1; ///////////////////////////////////////////////// //////// Set to "0" to disable the costs //////// vkc_claimKeyPrice = "ItemGoldBar10oz"; ///////////////////////////////////////////////// //////// Set to "0" to disable the costs //////// vkc_changeKeyPrice = "ItemGoldBar10oz"; ///////////////////////////////////////////////// ////// Need KeyKit to use Claim Vehicle Key ///// ////////// 0 = Not needed | 1 = Needed ////////// vkc_claimNeedKeykit = 1; ///////////////////////////////////////////////// ///// Need KeyKit to use Change Vehicle Key ///// ////////// 0 = Not needed | 1 = Needed ////////// vkc_changeNeedKeykit = 1; ///////////////////////////////////////////////// // Change Key & Claim Vehicles costs this Item // /// Any Item can be used here, some examples: /// //// ItemTinBar, ItemSilverBar, ItemGoldBar, //// ////// ItemSilverBar10oz, ItemGoldBar10oz, ////// ///// ItemBriefcase20oz, ItemBriefcase100oz ///// ///////////////////////////////////////////////// ///////////////////////////////////////////////// /////////////// DONT EDIT BELOW ! /////////////// ///////////////////////////////////////////////// /* Wait for player full ingame so we can access the action-menu */ waitUntil {!isNil "dayz_animalCheck"}; /* Start the loop check */ while{true} do { if (!isNull cursorTarget && (cursorTarget isKindOf "AllVehicles") && (player distance cursorTarget <= 10) && (!isEngineOn cursorTarget) && (nearestObjects [player, "Map_Heli_H_Cross", 10] > 0)) then { vkc_cursorTarget = cursorTarget; vkc_ownerID = vkc_cursorTarget getVariable ["CharacterID","0"]; if (vkc_claimKey == 1 && vkc_ownerID == "0" && vkc_cursorTarget getVariable ["VKC_claiming_disabled", 0] == 0) then { vkc_magazinesPlayer = magazines player; vkc_itemsPlayer = items player; if (("ItemKeyKit" in vkc_itemsPlayer || vkc_claimNeedKeykit == 0) && (vkc_claimKeyPrice == "0" || vkc_claimKeyPrice in vkc_magazinesPlayer)) then { vkc_objectID = vkc_cursorTarget getVariable ["ObjectID","0"]; vkc_objectUID = vkc_cursorTarget getVariable ["ObjectUID","0"]; if (!(vkc_objectID == "0" && vkc_objectUID == "0")) then { if (s_player_claimKey < 0) then { s_player_claimKey = player addAction [("<t color='#00FFFF'>" + ("Claim Vehicle Key") + "</t>"),"custom\VehicleKeyChanger\VehicleKeyChanger.sqf",[vkc_cursorTarget, vkc_temp_keys, vkc_ownerID, vkc_temp_keysDisplayName, "0", "0", "0", vkc_claimKeyPrice],-1002,false,false,"",""]; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; }; if (vkc_changeKey == 1 && vkc_ownerID != "0" && vkc_cursorTarget getVariable ["VKC_disabled",0] == 0) then { vkc_magazinesPlayer = magazines player; vkc_itemsPlayer = items player; if (("ItemKeyKit" in vkc_itemsPlayer || vkc_changeNeedKeykit == 0) && (vkc_changeKeyPrice == "0" || vkc_changeKeyPrice in vkc_magazinesPlayer)) then { vkc_objectID = vkc_cursorTarget getVariable ["ObjectID","0"]; vkc_objectUID = vkc_cursorTarget getVariable ["ObjectUID","0"]; if (!(vkc_objectID == "0" && vkc_objectUID == "0")) then { vkc_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; vkc_temp_keys = []; vkc_temp_keysDisplayName = []; vkc_temp_keysDisplayNameParse = []; vkc_temp_keysParse = []; { if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in vkc_key_colors) then { vkc_ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid"); vkc_keyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName"); vkc_temp_keysDisplayName set [count vkc_temp_keysDisplayName,vkc_keyName]; vkc_temp_keysDisplayNameParse set [vkc_ownerKeyId,vkc_keyName]; vkc_temp_keys set [count vkc_temp_keys,str(vkc_ownerKeyId)]; vkc_temp_keysParse set [vkc_ownerKeyId, _x]; }; } forEach vkc_itemsPlayer; vkc_hasKey = vkc_ownerID in vkc_temp_keys; if (vkc_hasKey && (count vkc_temp_keys) > 1) then { vkc_carKeyName = (vkc_temp_keysDisplayNameParse select (parseNumber vkc_ownerID)); vkc_targetVehicleKey = (vkc_temp_keysParse select (parseNumber vkc_ownerID)); vkc_temp_keys = vkc_temp_keys - [vkc_ownerID]; vkc_temp_keysDisplayName = vkc_temp_keysDisplayName - [vkc_carKeyName]; if (s_player_changeKey < 0) then { s_player_changeKey = player addAction [("<t color=""#0000FF"">" + ("Change Vehicle Key") + "</t>"),"custom\VehicleKeyChanger\VehicleKeyChanger.sqf",[vkc_cursorTarget, vkc_temp_keys, vkc_ownerID, vkc_temp_keysDisplayName, vkc_carKeyName, vkc_targetVehicleKey, vkc_changeKeyPrice, "0"],-1002,false,false,"",""]; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; player removeAction s_player_changeKey; s_player_changeKey = -1; }; }; Hellraver i'm not sure what you mean, i know you don't speak english natively so we must be losing something in translation
  8. I've tried a few different ways to make it so this can only be used at certain locations, specifically within 10m of "Map_Heli_H_cross" which is my service point object. This is so the key changer will act like part of the service point, and players have to travel to a certain location to claim vehicles and change keys. Is that something you can help me accomplish?
  9. you would need to add overwatch weapons etc to these loot tables
  10. Well plug him in then lol. Do you happen to have a fuel pump nearby, or is fuelpumparray still in the service point objects list?
  11. I'm loving these, i've tweaked them a bit to add in some new weapons but otherwise it's perfect for my server
  12. I've tried both ways and no joy, with the code removed it works everywhere, but with it in place as shown here, nothing happens. (this is an updated version of the script as well) /***********************************/ /* Vehicle Key Changer v1.5.3 *//* Written by OtterNas3 *//* January, 11, 2014 *//* Last update: 23/10/2014 *//* Advanced by hellraver *//***********************************/private ["_nearSP","_playerPos","_ServiceObj","_distAllow"]; //////////////////////////////////////////////////////////////////////////////////////////////////// Edit these settings to fit your needs/likes ///////////////////////////////////////////////////////////////////////////////////////////////////////// Claim Vehicles that do not have a Key ////////////// 0 = Not allowed | 1 = Allowed /////////vkc_claimKey = 1;//////////////////////////////////////////////////////// Change Key to create a Masterkey ///////////////// 0 = Not allowed | 1 = Allowed /////////vkc_changeKey = 1;///////////////////////////////////////////////////////// Set to "0" to disable the costs ////////vkc_claimKeyPrice = "ItemGoldBar10oz";///////////////////////////////////////////////////////// Set to "0" to disable the costs ////////vkc_changeKeyPrice = "ItemGoldBar10oz";/////////////////////////////////////////////////////// Need KeyKit to use Claim Vehicle Key /////////////// 0 = Not needed | 1 = Needed //////////vkc_claimNeedKeykit = 1;////////////////////////////////////////////////////// Need KeyKit to use Change Vehicle Key /////////////// 0 = Not needed | 1 = Needed //////////vkc_changeNeedKeykit = 1;/////////////////////////////////////////////////// Change Key & Claim Vehicles costs this Item ///// Any Item can be used here, some examples: /////// ItemTinBar, ItemSilverBar, ItemGoldBar, ////////// ItemSilverBar10oz, ItemGoldBar10oz, /////////// ItemBriefcase20oz, ItemBriefcase100oz ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// DONT EDIT BELOW ! /////////////////////////////////////////////////////////////////* Wait for player full ingame so we can access the action-menu */waitUntil {!isNil "dayz_animalCheck"};// Increase distance only if AIR || SHIP_ServiceObj = "MAP_Heli_H_cross";_distAllow = 10;_playerPos = getPosATL player;_nearSP = count nearestObjects [_playerPos, _ServiceObj, _distAllow] &gt; 0;_allowedDistance = 4;_isAir = cursorTarget isKindOf "Air";_isShip = cursorTarget isKindOf "Ship";if(_isAir || _isShip) then { _allowedDistance = 8;};/* Start the loop check */while{true} do {if (_nearSP) then { if (!isNull cursorTarget && (cursorTarget isKindOf "AllVehicles") && (player distance cursorTarget &lt; _allowedDistance) && (!isEngineOn cursorTarget)) then { vkc_cursorTarget = cursorTarget; vkc_ownerID = vkc_cursorTarget getVariable ["CharacterID","0"]; if (vkc_claimKey == 1 && vkc_ownerID == "0" && vkc_cursorTarget getVariable ["VKC_claiming_disabled", 0] == 0) then { vkc_magazinesPlayer = magazines player; vkc_itemsPlayer = items player; if (("ItemKeyKit" in vkc_itemsPlayer || vkc_claimNeedKeykit == 0) && (vkc_claimKeyPrice == "0" || vkc_claimKeyPrice in vkc_magazinesPlayer)) then { vkc_objectID = vkc_cursorTarget getVariable ["ObjectID","0"]; vkc_objectUID = vkc_cursorTarget getVariable ["ObjectUID","0"]; if (!(vkc_objectID == "0" && vkc_objectUID == "0")) then { if (s_player_claimKey &lt; 0) then { s_player_claimKey = player addAction [("" + ("Claim Vehicle Key") + ""),"custom\VehicleKeyChanger\VehicleKeyChanger.sqf",[vkc_cursorTarget, vkc_temp_keys, vkc_ownerID, vkc_temp_keysDisplayName, "0", "0", "0", vkc_claimKeyPrice],-1002,false,false,"",""]; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; }; if (vkc_changeKey == 1 && vkc_ownerID != "0" && vkc_cursorTarget getVariable ["VKC_disabled",0] == 0) then { vkc_magazinesPlayer = magazines player; vkc_itemsPlayer = items player; if (("ItemKeyKit" in vkc_itemsPlayer || vkc_changeNeedKeykit == 0) && (vkc_changeKeyPrice == "0" || vkc_changeKeyPrice in vkc_magazinesPlayer)) then { vkc_objectID = vkc_cursorTarget getVariable ["ObjectID","0"]; vkc_objectUID = vkc_cursorTarget getVariable ["ObjectUID","0"]; if (!(vkc_objectID == "0" && vkc_objectUID == "0")) then { vkc_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; vkc_temp_keys = []; vkc_temp_keysDisplayName = []; vkc_temp_keysDisplayNameParse = []; vkc_temp_keysParse = []; { if (configName(inheritsFrom(configFile &gt;&gt; "CfgWeapons" &gt;&gt; _x)) in vkc_key_colors) then { vkc_ownerKeyId = getNumber(configFile &gt;&gt; "CfgWeapons" &gt;&gt; _x &gt;&gt; "keyid"); vkc_keyName = getText(configFile &gt;&gt; "CfgWeapons" &gt;&gt; _x &gt;&gt; "displayName"); vkc_temp_keysDisplayName set [count vkc_temp_keysDisplayName,vkc_keyName]; vkc_temp_keysDisplayNameParse set [vkc_ownerKeyId,vkc_keyName]; vkc_temp_keys set [count vkc_temp_keys,str(vkc_ownerKeyId)]; vkc_temp_keysParse set [vkc_ownerKeyId, _x]; }; } forEach vkc_itemsPlayer; vkc_hasKey = vkc_ownerID in vkc_temp_keys; if (vkc_hasKey && (count vkc_temp_keys) &gt; 1) then { vkc_carKeyName = (vkc_temp_keysDisplayNameParse select (parseNumber vkc_ownerID)); vkc_targetVehicleKey = (vkc_temp_keysParse select (parseNumber vkc_ownerID)); vkc_temp_keys = vkc_temp_keys - [vkc_ownerID]; vkc_temp_keysDisplayName = vkc_temp_keysDisplayName - [vkc_carKeyName]; if (s_player_changeKey &lt; 0) then { s_player_changeKey = player addAction [("" + ("Change Vehicle Key") + ""),"custom\VehicleKeyChanger\VehicleKeyChanger.sqf",[vkc_cursorTarget, vkc_temp_keys, vkc_ownerID, vkc_temp_keysDisplayName, vkc_carKeyName, vkc_targetVehicleKey, vkc_changeKeyPrice, "0"],-1002,false,false,"",""]; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_changeKey; s_player_changeKey = -1; }; } else { player removeAction s_player_claimKey; s_player_claimKey = -1; player removeAction s_player_changeKey; s_player_changeKey = -1; };};
  13. With private ["_playerPOS","_nearSP"]; it doesn't work at all, without it, it the script still works anywhere. I've changed the object I want the player to be in proximity to as well, it's now // Increase distance only if AIR || SHIP_playerPos = getPosATL player;_nearSP = count nearestObjects [_playerPos, ["Map_Heli_H_cross],15] &gt; 0;_allowedDistance = 4;_isAir = cursorTarget isKindOf "Air";_isShip = cursorTarget isKindOf "Ship";if(_isAir || _isShip) then { _allowedDistance = 8;};/* Start the loop check */while{true} do { if (!isNull cursorTarget &amp;&amp; (cursorTarget isKindOf "AllVehicles") &amp;&amp; (player distance cursorTarget &lt; _allowedDistance) &amp;&amp; (!isEngineOn cursorTarget) &amp;&amp; (_nearSP)) then {
  14. &nbsp; &nbsp; Man that was staring me right in the face, I really shouldn't try to play with scripts when i'm that tired lol Thank you!
  15. This script works great when i'm using the fuel pump array, but i've tried to make it the same class as a trader "worker4", a helicopter landing pad "Map_Heli_H_cross", and neither works and both give me the follwing error (which disappears when I change it back to stock) // Vehicle Service Point by Axe Cop private ["_folder","_servicePointClasses","_maxDistance","_actionTitleFormat","_actionCostsFormat","_costsFree","_message","_messageShown","_refuel_enable","_refuel_costs","_refuel_updateInterval","_refuel_amount","_repair_enable","_repair_costs","_repair_repairTime","_rearm_enable","_rearm_costs","_rearm_magazineCount","_lastVehicle","_lastRole","_fnc_removeActions","_fnc_getCosts","_fnc_actionTitle","_fnc_isArmed","_fnc_getWeapons"]; // ---------------- CONFIG START ---------------- // general settings _folder = "service_point\"; // folder where the service point scripts are saved, relative to the mission file _servicePointClasses = MAP_Heli_H_cross; // service point classes (can be house, vehicle and unit classes) Error in expression <_servicePoints = (nearestObjects [_pos, _servicePointClasses, _maxDistance]) - [> Error position: <_servicePointClasses, _maxDistance]) - [> Error Undefined variable in expression: _servicepointclasses File mpmissions\__CUR_MP.Tavi\service_point\service_point.sqf, line 113
×
×
  • Create New...