adg Posted March 22, 2014 Report Share Posted March 22, 2014 Please check your rpt log and see if it shows any error. Link to comment Share on other sites More sharing options...
Nexarion Posted March 22, 2014 Report Share Posted March 22, 2014 I already look into the Server-rpt, there are no errors. I don´t know if I´ve got a local one too. Have rebooted the server serval times and uploaded your files 3-4 times to avoid bad uploads. I think I found something: /* Checking if player has a Evac-Chopper */ _evacCallerID = (player getVariable ["CharacterID","0"]); _evacCallerUID = (getPlayerUID player); _playerEvacField = []; playerHasEvacField = false; _evacFields = nearestObjects [player, ["HeliHRescue"], 40000]; if ((count _evacFields) > 0) then { { _evacFieldID = _x getVariable ["CharacterID", "0"]; if (_evacCallerID == _evacFieldID || _evacCallerUID == _evacFieldID) then { playerHasEvacField = true; playersEvacField = _x; }; } forEach _evacFields; }; if (playerHasEvacField) then { systemChat("WARNING! You already have a Evac-Chopper - Maximum reached"); _cnt = 5; _locationPlayer = (getPosATL player); for "_p" from 1 to 5 do { systemChat(format ["WARNING! Changing Evac-Chopper to this target in %1s - Move to cancel",_cnt]); if (player distance _locationPlayer > 0.2) then { systemChat("Changing Evac-Chopper canceled"); s_player_makeEvacChopper = -1; breakOut "exit"; }; sleep 1; _cnt = _cnt - 1; }; _objectID = _playerEvacField getVariable["ObjectID","0"]; _objectUID = _playerEvacField getVariable["ObjectUID","0"]; PVDZE_obj_Delete = [_objectID,_objectUID,player]; publicVariableServer "PVDZE_obj_Delete"; deleteVehicle _playerEvacField; playerHasEvacField = false; playersEvacField = nil; }; The 2nd marked Variable should already be empty... so the script can´t delete something, or am I wrong? Ok, I can´t highligt it... _objectID = _playerEvacField getVariable["ObjectID","0"]; should be empty, or am I wrong? So the script can´t delete an "empty" field. Link to comment Share on other sites More sharing options...
adg Posted March 22, 2014 Report Share Posted March 22, 2014 Updated first zip. Be sure to replace all files in JAEM folder. Should be working correctly now. If you guys run into any more problems, please let me know! :) Link to comment Share on other sites More sharing options...
Nexarion Posted March 23, 2014 Report Share Posted March 23, 2014 Wonderful, everything works fine now ;) Link to comment Share on other sites More sharing options...
jbladel Posted May 18, 2014 Report Share Posted May 18, 2014 after death i cant find a heli anymore, does this have something to do with the keys? _edit_ it will run the script but just said it cant find my heli in evac field Link to comment Share on other sites More sharing options...
Pro_Speedy Posted September 3, 2014 Report Share Posted September 3, 2014 Got a version for 1.4 Tried comparing files and editing but had no luck Link to comment Share on other sites More sharing options...
Pro_Speedy Posted September 6, 2014 Report Share Posted September 6, 2014 Bump Link to comment Share on other sites More sharing options...
pangea Posted February 7, 2015 Report Share Posted February 7, 2015 Hi! Is this script up-to-date? I have installed it, and got this errors: 10:37:45 Error in expression <ayerHasEvacField = false; _evacFields = nearestObjects [player, ["HeliHRescue"],> 10:37:45 Error position: <nearestObjects [player, ["HeliHRescue"],> 10:37:45 Error 0 elements provided, 3 expected 10:37:45 File mpmissions\__cur_mp.chernarus\custom\JAEM\EvacChopper_init.sqf, line 47 Seems to work, but after serverrestart the helipad disappears. Any ideas? this is my evacchopper_init.sqf: /*------------------------------------*/ /* JAEM */ /* Just another Chopper-Evac Mod v1.3 */ /* OtterNas3 */ /* 01/14/2014 */ /* Last update: 02/20/2014 */ /* Made clickable by adg */ /*------------------------------------*/ /* Wait for the player got his login Data to make sure he has a valid PlayerUID */ waitUntil {count PVDZE_plr_Login2 > 0}; private ["_evacCallerID","_evacCallerUID","_evacFields","_evacFieldID","_ownerKeyId","_itemsPlayer","_temp_keys","_key_colors","_hasKey","_cTarget","_vehicleKey","_evacChopperConfigArray"]; ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Edit these settings to fit your needs/likes // ///////////////////////////////////////////////// ///////////////////////////////////////////////// /// Amount of Briefcases a Evac-Chopper costs /// /////////// Any amount between 1-12 ///////////// evac_chopperPrice = 3; ///////////////////////////////////////////////// // Evac-Zone marker type Smoke or Landingpad? /// ////////// 0 = Landingpad | 1 = Smoke /////////// evac_zoneMarker = 0; ///////////////////////////////////////////////// /// Minimum Distance to call for Evac-Chopper /// ///////// Dont set this lower then 500! ///////// evac_minDistance = 500; ///////////////////////////////////////////////// /////////////// DONT EDIT BELOW ! /////////////// ///////////////////////////////////////////////// evac_chopperCalled = false; /* Reset Action-Menu cvars */ s_player_makeEvacChopper = -1; s_player_clearEvacChopper = -1; /* Wait for the player full ingame so we can add the action-menu entry */ waitUntil {!isNil ("PVDZE_plr_LoginRecord")}; /* Checking if player has a Evac-Chopper to decide if we show the Call-Evac action menu */ _evacCallerID = (player getVariable ["CharacterID","0"]); _evacCallerUID = (getPlayerUID player); playerHasEvacField = false; _evacFields = nearestObjects [player, ["HeliHRescue"], 40000]; if ((count _evacFields) > 0) then { { _evacFieldID = _x getVariable ["CharacterID", "0"]; if (_evacCallerID == _evacFieldID || _evacCallerUID == _evacFieldID) then { playerHasEvacField = true; playersEvacField = _x; }; } forEach _evacFields; }; /* Starting the check loop */ while{true} do { sleep 3; if (!isNull cursorTarget && vehicle player == player && cursorTarget isKindOf "Helicopter" && player distance cursorTarget <= 10 && !isEngineOn cursorTarget) then { _cTarget = cursorTarget; _vehicleKey = _cTarget getVariable ["CharacterID","0"]; if (_vehicleKey != "0") then { _itemsPlayer = items player; _temp_keys = []; _key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; { if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then { _ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid"); _keyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName"); _temp_keys set [count _temp_keys,str(_ownerKeyId)]; }; } forEach _itemsPlayer; _hasKey = _vehicleKey in _temp_keys; if (_hasKey) then { if (s_player_makeEvacChopper < 0) then { s_player_makeEvacChopper = player addAction [("<t color="#0000FF"">" + ("Set Evac-Chopper") + "</t>"),"custom\JAEM\SetEvacChopper.sqf",_cTarget,-1,false,false,"","]; }; if (playerHasEvacField && (_cTarget distance playersEvacField) <= 10) then { if (s_player_clearEvacChopper < 0) then { s_player_clearEvacChopper = player addAction [("<t color="#0000FF"">" + ("Clear Evac-Chopper") + "</t>"),"custom\JAEM\ClearEvacChopper.sqf",_cTarget,-1,false,false,"","]; }; } else { player removeAction s_player_clearEvacChopper; s_player_clearEvacChopper = -1; }; } else { player removeAction s_player_makeEvacChopper; s_player_makeEvacChopper = -1; player removeAction s_player_clearEvacChopper; s_player_clearEvacChopper = -1; }; } else { player removeAction s_player_makeEvacChopper; s_player_makeEvacChopper = -1; player removeAction s_player_clearEvacChopper; s_player_clearEvacChopper = -1; }; } else { player removeAction s_player_makeEvacChopper; s_player_makeEvacChopper = -1; player removeAction s_player_clearEvacChopper; s_player_clearEvacChopper = -1; }; }; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now