-
Posts
518 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Articles
Posts posted by jahangir13
-
-
Use a condition like this around the whole part in ui_selectSlot.sqf:
if ((getPlayerUID player) in ["1234123456789","1234123456723","12341234565432"]) then { ... ... ... };
And the menu is only shown to those players (I guess).
-
This is another kind of Vehicle Locator.
Script adds a right-click option to an vehicle key in the gear menu.
The script searches for the vehicle belonging to this key in a near range and marks the vehicle (via sign/light) if found.
If not found in the near range a full map search will be done and if then found a map marker will show where the vehicle is located.
Everything is configurable and well documented.
The video shows how it works:
https://www.youtube.com/watch?v=FhUoLVYeAK8
The script ( vehicle_pointer.sqf ):// // Jahan Vehicle Pointer v0.1 (jahangir13 - 10/2014) // [email protected]<script type="text/javascript"> /* */ </script> // Shows you a vehicle belonging to a key if in 1st search range. If not shows it on map (if allowed via config). // private ["_vehDistance","_showMarkerSearchText","_inventoryItems","_rNum""_name","_mark","_showMarkerType","_showMarkerColor","_showMarkerShape","_showMarkerSize","_showMarkerSearchText","_showFlareType","_showFlareOthers","_flare","_light","_showTime","_showMarkerTime","_showSign","_signHeight","_showOthers","_scanRadius","_scanRadius2","_showVehMapMarker","_vehTarget","_arrow","_vehsAround","_keyOwner","_x","_keyName","_ownerID","_vehFoundInRange","_classname","_vehDisplayName","_positionArrow","_location","_inventoryItems"]; //############################################################################################################################################### // Configuration Options: // /////// Sign showing above vehicle // How long should the sign be shown above the vehicle (in seconds) _showTime = 5; // Classname of the sign to show above the car (here red arrow. Or "testsphere1" ... whatever) _showSign = "Sign_arrow_down_large_EP1"; // How high above the vehicle the sign shows up (in meters) _signHeight = 2; // Shall the sign above the vehicle be seen by others (if false can only be seen by the player) _showSignOthers = false; // 1st Range radius to scan for vehicles near the player (should not be too far...as you need to see it) / 2nd range _scanRadius2 for the bigger map marker scan (should cover whole map) _scanRadius = 80; _scanRadius2 = 25000; // /////// Flare coming down over vehicle (That's for those who like special effects ,) ). _showFlare = true; // Show flare to others (false: only player can see the flare) _showFlareOthers = false; // The height over map the flare is starting. (The higher the longer it takes to come down.) _showFlareHeight = 50; // The type of the flair (classname). Also possible (maybe others too): _showFlareType = "F_40mm_White"; // /////// Marker showing on Map // Show vehicle on map if nothing was found in first scan doing an extended search (true: show marker on map / false: don't show marker on map) _showVehMapMarker = true; // Time the marker stays on the map (in seconds) _showMarkerTime = 20; // Color of the map marker ( https://community.bistudio.com/wiki/setMarkerColorLocal ) _showMarkerColor = "ColorRedAlpha"; // Type of the map marker (icon on map / E.g.: https://community.bistudio.com/wikidata/images/e/ea/Arma2_markers4.jpg) _showMarkerType = "Artillery"; // Shape of the marker ( "ICON", "RECTANGLE" or "ELLIPSE" are possible ) _showMarkerShape = "ICON"; // Size of the marker ( Size is in format [a-axis, b-axis]. Depends on which marker type is chosen. ) _showMarkerSize = [3,3]; // Text which shows up behind the marker in the map (after the ': ' the vehicle name is showing.) _showMarkerSearchText = "Search:"; // Shall the map marker be seen by others (if false can only be seen by the player. Could make some fun if others could see where someone is looking for the vehicle ,) ) _showMarkerOthers = false; //############################################################################################################################################### // get key Owner from ui_selectSlot.sqf _keyOwner = _this select 0; _keyName = _this select 1; // variable to remember if vehicle has been found in range _vehFoundInRange = false; // The target vehicle which belong to the key _vehTarget = objNull; //--------------------------------------------------------------------------------------------------------- // compare with vehicles around _vehsAround = nearestObjects [getPos player, ["Plane","LandVehicle","Helicopter","Ship"], _scanRadius]; { _ownerID = _x getVariable ["CharacterID", "0"]; if ( _keyOwner == _ownerID ) exitWith { _vehFoundInRange = true; _vehTarget = _x; }; } forEach _vehsAround; //--------------------------------------------------------------------------------------------------------- // if vehicle has been found in range show marker above vehicle if (_vehFoundInRange) then { _classname = typeOf _vehTarget; _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName"); systemChat format ["VP: %1 belongs to %2 found in range. Trying to mark it...",_keyName, _vehDisplayName]; // create the sign which shows up above the target vehicle _location = position _vehTarget; _positionArrow = _vehTarget modelToWorld [0,0,2]; // local or globally visible if (_showSignOthers) then { _arrow = createVehicle [_showSign, _location, [], 0, "NONE"]; _light = "#lightpoint" createVehicle [0,0,0]; } else { _arrow = _showSign createVehicleLocal _location; _light = "#lightpoint" createVehicleLocal [0,0,0]; }; _arrow setVehiclePosition [_positionArrow, [], 0]; _arrow attachTo [_vehTarget,[0,0,_signHeight],""]; // Create a small local white light and attach it to the object. if ( _showFlare ) then { if ( _showFlareOthers ) then { _flare = _showFlareType createVehicle [getPos _vehTarget select 0, getPos _vehTarget select 1, _showFlareHeight]; } else { _flare = _showFlareType createVehicleLocal [getPos _vehTarget select 0, getPos _vehTarget select 1, _showFlareHeight]; }; }; // Create the light effect _light setLightBrightness 0.01; _light setLightAmbient[1.0, 1.0, 1.0]; _light setLightColor[1.0, 1.0, 1.0]; _light lightAttachObject [_vehTarget, [0,0,1]]; // Show the sign that long above the vehicle sleep _showTime; // Delete the Sign again deleteVehicle _arrow; // Turn off the light. deletevehicle _light; // if vehicle has not been found in range search in wider range and set marker on map (if config option allows that) } else { //cutText [format["Key does not belong to any vehicle in range."], "PLAIN DOWN"]; systemChat format ["JVP: %1 does not belong to any vehicle in range.", _keyName]; // exit if marker config set to 'false' if !( _showVehMapMarker ) exitWith { }; // exit if player has no map to see the marker _inventoryItems = [player] call BIS_fnc_invString; if !("ItemMap" in _inventoryItems) exitWith { systemChat "JVP: You do not have a map to see the marker! Exit.";}; systemChat format ["JVP: Searching for Vehicle in wider range...", _keyName]; //--------------------------------------------------------------------------------------------------------- // Do the bigger search (whole map) _vehsAround = nearestObjects [getPos player, ["Plane","LandVehicle","Helicopter","Ship"], _scanRadius2]; { _ownerID = _x getVariable ["CharacterID", "0"]; if ( _keyOwner == _ownerID ) exitWith { _vehFoundInRange = true; _vehTarget = _x; }; } forEach _vehsAround; //--------------------------------------------------------------------------------------------------------- if (_vehFoundInRange) then { _classname = typeOf _vehTarget; _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName"); _vehDistance = floor (player distance _vehTarget); systemChat format ["JVP: %1 belongs to %2 found in range. Trying to show on map...",_keyName, _vehDisplayName]; _location = position _vehTarget; // Get the vehicle display name from config _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName"); // Create the map marker: http://forums.bistudio.com/showthread.php?135013-Marker-that-created-with-createMarkerLocal-can-seen-by-everyone // random number for map marker name needs to be unique: _rNum = floor random 10; _name = format ["Search: %1" + " [%2]", _vehDisplayName, _rNum]; // local or globally visible if ( _showMarkerOthers ) then { _mark = createMarker [_name, _location]; _name setMarkerShape _showMarkerShape; _name setMarkerType _showMarkerType; _name setMarkerColor _showMarkerColor; _name setMarkerSize _showMarkerSize; _name setMarkerAlpha 1; _name setMarkerText format [_showMarkerSearchText + " " + "%1", _vehDisplayName]; //Marker stays this time on map } else { _mark = createMarkerLocal [_name, _location]; _name setMarkerShapeLocal _showMarkerShape; _name setMarkerTypeLocal _showMarkerType; _name setMarkerColorLocal _showMarkerColor; _name setMarkerSizeLocal _showMarkerSize; _name setMarkerAlphaLocal 1; _name setMarkerTextLocal format [_showMarkerSearchText + " " + "%1" + " " + "[%2 m]", _vehDisplayName, _vehDistance]; }; sleep _showMarkerTime; // Delete map marker again //deleteMarker _name; deleteMarker _name; } else { systemChat format ["JVP: %1 does not belong to any vehicle in big search range.", _keyName]; }; };
Create a file vehicle_pointer.sqf with the content above and place it somewhere in your mission.
New: The script - Masterkey version ( vehicle_pointer_mk.sqf ):
This is a version which works with 1:n relations between key and car(s) (so, 1 master key for several vehicles). If you do not use the Mayterkey mod use the normal vehicle_pointer.sqf.
(As for this version the searches for vehicles cannot be stopped after already finding one (as there could be more for this key) the search always goes over all vehicles available which could cause some longer runtimes the more vehicles are on the map!)
// // Jahan Vehicle Pointer v0.1 - Masterkey mod compatible version (jahangir13 - 11/2014) // [email protected] /* */ // Shows you vehicles belonging to a key if in 1st search range. If not shows them on map (if allowed via config). // private ["_markerNames","_i","_j","_arrow1","_arrow2","_arrow3","_arrow4","_arrow5","_light1","_light2","_light3","_light4","_light5","_vehsNearFound","_vehsNearNotFound","_vehDistance","_showMarkerSearchText","_inventoryItems","_rNum""_name","_mark","_showMarkerType","_showMarkerColor","_showMarkerShape","_showMarkerSize","_showMarkerSearchText","_showFlareType","_showFlareOthers","_flare","_light","_showTime","_showMarkerTime","_showSign","_signHeight","_showOthers","_scanRadius","_scanRadius2","_showVehMapMarker","_vehTarget","_arrow","_vehsAround","_keyOwner","_x","_keyName","_ownerID","_vehFoundInRange","_classname","_vehDisplayName","_positionArrow","_location","_inventoryItems"]; //############################################################################################################################################### // Configuration Options: // /////// Sign showing above vehicle // How long should the sign be shown above the vehicle (in seconds) _showTime = 5; // Classname of the sign to show above the car (here red arrow. Or "testsphere1" ... whatever) _showSign = "Sign_arrow_down_large_EP1"; // How high above the vehicle the sign shows up (in meters) _signHeight = 2; // Shall the sign above the vehicle be seen by others (if false can only be seen by the player) _showSignOthers = false; // 1st Range radius to scan for vehicles near the player (should not be too far...as you need to see it) / 2nd range _scanRadius2 for the bigger map marker scan (should cover whole map) _scanRadius = 80; _scanRadius2 = 25000; // /////// Flare coming down over vehicle (That's for those who like special effects ,) ). _showFlare = true; // Show flare to others (false: only player can see the flare) _showFlareOthers = false; // The height over map the flare is starting. (The higher the longer it takes to come down.) _showFlareHeight = 50; // The type of the flair (classname). Also possible (maybe others too): _showFlareType = "F_40mm_White"; // /////// Marker showing on Map // Show vehicle on map if nothing was found in first scan doing an extended search (true: show marker on map / false: don't show marker on map) _showVehMapMarker = true; // Time the marker stays on the map (in seconds) _showMarkerTime = 20; // Color of the map marker ( https://community.bistudio.com/wiki/setMarkerColorLocal ) _showMarkerColor = "ColorRedAlpha"; // Type of the map marker (icon on map / E.g.: https://community.bistudio.com/wikidata/images/e/ea/Arma2_markers4.jpg) _showMarkerType = "Artillery"; // Shape of the marker ( "ICON", "RECTANGLE" or "ELLIPSE" are possible ) _showMarkerShape = "ICON"; // Size of the marker ( Size is in format [a-axis, b-axis]. Depends on which marker type is chosen. ) _showMarkerSize = [3,3]; // Text which shows up behind the marker in the map (after the ': ' the vehicle name is showing.) _showMarkerSearchText = "Search:"; // Shall the map marker be seen by others (if false can only be seen by the player. Could make some fun if others could see where someone is looking for the vehicle ,) ) _showMarkerOthers = true; //############################################################################################################################################### // get key Owner from ui_selectSlot.sqf _keyOwner = _this select 0; _keyName = _this select 1; // variable to remember if vehicle has been found in range _vehFoundInRange = false; // The target vehicle which belong to the key _vehTarget = objNull; //--------------------------------------------------------------------------------------------------------- // compare with vehicles around // array to store vehicles found (could be more than one if masterkey script is used) systemChat format ["JVP: >>>>>"]; systemChat format ["JVP: Searching for Vehicles in near range..."]; _vehsNearFound = []; _vehsAround = nearestObjects [getPos player, ["Plane","LandVehicle","Helicopter","Ship"], _scanRadius]; { _ownerID = _x getVariable ["CharacterID", "0"]; if ( _keyOwner == _ownerID ) then { _vehFoundInRange = true; _vehsNearFound = _vehsNearFound + [_x]; }; } forEach _vehsAround; //--------------------------------------------------------------------------------------------------------- // if vehicle has been found in range show marker above vehicle if (_vehFoundInRange) then { _i = 0; // for all found vehicles in near range { _vehTarget = _x; _classname = typeOf _vehTarget; _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName"); _i = _i + 1; systemChat format ["JVP: %1 belongs to %2 found in range. Mark with Arrow...",_keyName, _vehDisplayName]; // create the sign which shows up above the target vehicle _location = position _vehTarget; _positionArrow = _vehTarget modelToWorld [0,0,2]; // local or globally visible if (_showSignOthers) then { _arrow = createVehicle [_showSign, _location, [], 0, "NONE"]; _light = "#lightpoint" createVehicle [0,0,0]; } else { _arrow = _showSign createVehicleLocal _location; _light = "#lightpoint" createVehicleLocal [0,0,0]; }; _lightname = format ["light%1", _i]; _light setVehicleVarName _lightname; call compile format["%1 = _light", _lightname]; _arrowname = format ["arrow%1", _i]; _arrow setVehicleVarName _arrowname; call compile format["%1 = _arrow", _arrowname]; _arrow setVehiclePosition [_positionArrow, [], 0]; _arrow attachTo [_vehTarget,[0,0,_signHeight],""]; // Create the light effect _light setLightBrightness 0.01; _light setLightAmbient[1.0, 1.0, 1.0]; _light setLightColor[1.0, 1.0, 1.0]; _light lightAttachObject [_vehTarget, [0,0,1]]; if ( _showFlare ) then { if ( _showFlareOthers ) then { _flare = _showFlareType createVehicle [getPos _vehTarget select 0, getPos _vehTarget select 1, _showFlareHeight]; } else { _flare = _showFlareType createVehicleLocal [getPos _vehTarget select 0, getPos _vehTarget select 1, _showFlareHeight]; }; }; } forEach _vehsNearFound; systemChat format ["JVP: <<<<<"]; // Show the sign that long above the vehicle sleep _showTime; // Delete the Sign again for "_j" from 1 to _i do { deleteVehicle call compile format ["arrow%1", _j]; // Turn off the light. deletevehicle call compile format ["light%1", _j]; }; // if vehicle has not been found in range search in wider range and set marker on map (if config option allows that) }; ///// Marker stuff for vehicles not found in the near range // exit if marker config set to 'false' if !( _showVehMapMarker ) exitWith { }; // exit if no map or gps in the players inventory _inventoryItems = [player] call BIS_fnc_invString; if ( !("ItemGPS" in _inventoryItems) && !("ItemMap" in _inventoryItems) ) exitWith {systemChat "JVP: You need a Map or GPS to see the markers! Exit.";}; systemChat format ["JVP: Searching for Vehicles in wider range..."]; //--------------------------------------------------------------------------------------------------------- // Do the bigger search (whole map) _vehFoundInRange = false; _vehsFarFound = []; _vehsAround = nearestObjects [getPos player, ["Plane","LandVehicle","Helicopter","Ship"], _scanRadius2]; { _ownerID = _x getVariable ["CharacterID", "0"]; if ( _keyOwner == _ownerID ) then { _vehFoundInRange = true; _vehsFarFound = _vehsFarFound + [_x]; }; } forEach _vehsAround; // delete vehicles from array where we've already showed the arrow sign _vehsFarFound = _vehsFarFound - _vehsNearFound; //--------------------------------------------------------------------------------------------------------- if (_vehFoundInRange) then { _markerNames = []; _i = 0; { _i = _i + 1; _vehTarget = _x; _classname = typeOf _vehTarget; _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName"); _vehDistance = floor (player distance _vehTarget); systemChat format ["JVP: %1 belongs to %2 found in range. Show on map...",_keyName, _vehDisplayName]; _location = position _vehTarget; // Get the vehicle display name from config _vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehTarget) >> "displayName"); // Create the map marker: http://forums.bistudio.com/showthread.php?135013-Marker-that-created-with-createMarkerLocal-can-seen-by-everyone // random number for map marker name needs to be unique: _rNum = floor random 10; _name = format ["Search: %1" + " [%2]", _vehDisplayName, _rNum]; // store markername in array _markerNames = _markerNames + [_name]; // local or globally visible if ( _showMarkerOthers ) then { _mark = createMarker [_name, _location]; _name setMarkerShape _showMarkerShape; _name setMarkerType _showMarkerType; _name setMarkerColor _showMarkerColor; _name setMarkerSize _showMarkerSize; _name setMarkerAlpha 1; _name setMarkerText format [_showMarkerSearchText + " " + "%1", _vehDisplayName]; //Marker stays this time on map } else { _mark = createMarkerLocal [_name, _location]; _name setMarkerShapeLocal _showMarkerShape; _name setMarkerTypeLocal _showMarkerType; _name setMarkerColorLocal _showMarkerColor; _name setMarkerSizeLocal _showMarkerSize; _name setMarkerAlphaLocal 1; _name setMarkerTextLocal format [_showMarkerSearchText + " " + "%1" + " " + "[%2 m]", _vehDisplayName, _vehDistance]; }; } forEach _vehsFarFound; systemChat format ["JVP: <<<<<"]; sleep _showMarkerTime; // Delete map marker again { deleteMarker _x; } forEach _markerNames; } else { systemChat format ["JVP: %1 does not belong to any vehicle in big search range.", _keyName]; systemChat format ["JVP: <<<<<"]; };
Create a file vehicle_pointer_mk.sqf with the content above and place it somewhere in your mission. In ui_selectSlot.sqf you set the path to this script.
ui_selectSlot.sqf (custom):
///// jahan - begin vehicle pointer // key colors _colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]; if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _item)) in _colors) then { // characterID of the key (car character number) _keyOwner = getNumber(configFile >> "CfgWeapons" >> _item >> "keyid"); // key name (like: e3f2) _keyName = getText(configFile >> "CfgWeapons" >> _item >> "displayName"); //Menu entry Key vehicle pointer _control = _parent displayCtrl (1600 + _numActions); _control ctrlShow true; _height = _height + (0.025 * safezoneH); // this needs to point the place where the script is in your mission (vehicle_pointer.sqf) _script = "custom\jtools\vehicle_pointer.sqf"; _exescript = format["_id = ['%2','%3'] execVM '%1';closeDialog 0;",_script,_keyOwner,_keyName]; uiNamespace setVariable ['uiControl', _control]; // sets the text in the right button menu _control ctrlSetText "Vehicle Pointer"; _control ctrlSetTextColor [0.3,0.4,1,1]; _control ctrlSetTooltip "Pinpoint vehicle. Mark on map if not in range."; _control ctrlSetTooltipColorBox [0.3,0.4,1,1]; _control ctrlSetTooltipColorShade [0, 0, 0, 1]; _control ctrlSetTooltipColorText [0.3,0.4,1,1]; _control ctrlSetEventHandler ["ButtonClick",_exescript]; _numActions = _numActions + 1; // if there are other item action after that (other mods) add 1 to _numactions }; ///// jahan - end vehicle pointer
This needs to be added into ui_selectSlot.sqf (you need to make that custom). The path pointing to the script needs to be adjusted!!
If you do not already have any other right click option scripts (or Macas right clickt options method) it would be pasted below:
_array = getArray (_config >> "output"); _outputClass = _array select 0; _outputType = _array select 1; _name = getText (configFile >> _outputType >> _outputClass >> "displayName"); _compile = format["_id = ['%2',%3] %1;",_script,_item,_array]; }; _menu ctrlSetText format[_type,_name]; _menu ctrlSetEventHandler ["ButtonClick",_compile]; };
and above this:
_pos set [3,_height]; //hint format["Obj: %1 \nHeight: %2\nPos: %3",_item,_height,_grpPos]; _group ctrlShow true; ctrlSetFocus _group;
If you have other right click content already in ui_selectSlot.sqf then copy it below Maca's right click option (if available) and above other one(s) like Remote Vehicle Door Opener.
Let me know for any battleye restrictions to add this here. I got no kicks while testing, so you may have different files.
And any feedback is also always welcome.
There is an bug with createVehicleLocal for some objects which might spam your RPT log:
-
Is it only for that player?
This is your line:
["PASS",[false,false,false,false,false,false,true,12000,[],[0.0190862,0],0,[393.83,192.362]],[35,14,0,0],["RH_m1stsp","aidlpercmstpsraswrfldnon_aiming01",42 ["76561198055526775","76561198055526775","76561198055526775","76561198055526,[30,[18665.1,3108.98,0.00144525]],3162,"118"]
And this is one of mine:
["PASS",[false,false,false,false,false,false,true,12000,[],[0,0],0,[107.84,39.8537]],[0,0,0,0],["MeleeHatchet_DZE","aidlpercmstpsraswrfldnon_idlesteady02",42,["148"]],[135,[8264.76,17716.2,0.000836486]],1488,"162"]The end looks very different. It starts for you where all the playerUIDs are located. What are they for? Some kind of door management mod or something like that?
Maybe we use something different here (way devd wrote these files). But there is your issue. It's wrong in the file. Question is what writes it like that.
-
Maybe it makes sence if a new position (a bit further away) is needed, that the player gets an appropriate message.
-
Issue is solved. I had a fix (lol) in compiles.sqf. After commenting this out again I commented 1 line out too much.
-
Hi all,
I recognized today that I cannot chop any wood. Means, I use MeleeHatchet_DZE (but also tried ItemHatchet_DZE) and try to chop a tree. I see that I actually hit the tree, but there is no wood on the ground and the tree never falls over. The hatchet has full ammo and when I hit it's counting down.
Does anybody know where chopping can be found in the files what it could be related to. So that I know where to start to search?
Regards, jahan.
-
For me it works like Richie points out here (Batch file). Paths need to be adjusted.
Edit: Hm, you need the arma2oa_be.exe and if you use a server password also add this. E.g.
start "" "%arma2oapath%\ArmA2OA_BE.exe" 0 0 -skipintro -mod=%MODS% -noSplash -noFilePatching -world=empty -password=xxxxx -connect=%IP% -port=%PORT% "-mod=%arma2path%;expansion;"
Then it directly goes into the Lobby and you can join the game from there. The '0 0' is important for the _BE exe. Otherwise nothing happens.
-
Haliakala:
I guess this is a good starting point to gather all neccessary information together to solve the basic issues mentioned all over the forum.
Then not everyone else who is new is running in these issues again and will need to read all the (21-xx) pages again to search for all of this. People would be very pleased. And maybe the mod author would be happy to add a link to such a collective post to the starting page.
Just an idea ;)))
-
To make these settings easier I use the old selfBB script.
-
102: I see that now for the first time. After a quick view it seems that this function is never called somewhere.
I guess the character data is read in 101 together with the player data.
That is the reason why Gender Selection /Play as Zombie did not work I guess. Took me a long time to figure out a way how that works but I do not understand everything.
Did not get an answer from Soul so far. And I do not install a windows server to get the child requests from the log ;)
-
@withyourbarehands: Never used config based traders but have a look at this:
-
For people using the Linux server port of Epoch a dll cannot be used.
There needs then be an option available to switch it off.
-
These crashes are called from init.sqf as epoch events (timed events).
EpochEvents = [["any","any","any","any",0,"crash_spawner"],
["any","any","any","any",20,"animated_crash_spawner"],
["any","any","any","any",40,"supply_drop"]];There is an own main topic for Epoch Events in the forum where you can see what the numbers in [...] mean to schedule events.
You could call it more often here. The script normally is placed in dayz_server/modules (e.g. dayz_server/modules/crash_spawner.sqf).
I don't know what you use here but maybe there is a check in such a crash script which checks if there is already one active which you then would need to change a bit.
-
Hi,
look at this: https://github.com/vbawol/DayZ-Epoch/issues/1393
Normally these errors happen in custom scripts...so these are easy to fix. In this case as vbawol pointed out it could also happen if nil values will be send to a function (here fn_findSafePos).
This is not so easy to find if there are many calls to that function ;)
If you have a program that helps you seaching for strings in 'all files' in a folder you may search for findSafePos all over your mission files and check the places where this occurs for variables used in the call which are uninitialized (nil). I guess it's a call in the mission but could also be within the server files if you added code there which uses this function.
-
No, you comment out this: player playActionNow "Medic"; (bandage script here)
And you set this:
r_doLoop = false;
_finished = true;
And I do not see why this should not work. It just does not go unto the while loop anymore as far as I see this on my phone.
-
I guess because there is a check later for this move. If player move is medic or something...in pseudo code. To check the time the animation is running. I don't have the code on my mind...but maybe you can simply set this time very short. Maybe 0 is possible. Depends on the code.
Ah. The code is in the spoiler. What if you set r_doloop to false above the loop? And finished to true.
-
Hi,
you need to add this at the end of your scripts.txt battleye file:
!="_bike setVariable[\"Ownername\", _playeruid, true];"
So that it lokks like this:
5 "setDammage" !="_bike setVariable[\"Ownername\", _playeruid, true];"
I could now reproduce it with your scripts file.
-
You copy the real server and create a new database and point the test server to the new database.
If it's running on the same machine you need to change the port the server is running on (also steam ports in server.cfg).
-
Ah yes. I guess you need to add the bike classname into allowedvehicles_dze . I need to add this when i am back from work.
@SadBoy1981: I do not get the battleye script restriction. Can you go to your script.log in your Battleye directory on the server and post me the logged line to see for what it happened (after getting kicked...you will see your name there and the reason why you got kicked)).
And also the line which it belongs to in script.txt? Restriction #52 means line 52 is responsible for the kick (this starts with a 5). So you count from 0 on (first line is 0) and leave out any commented lines ( // ).
We can then add a excemption for the line which kicks you. As I do not get the kick, I don't know exactly what it is.
-
You need to read the post ;) there you can see that vars need to have been initialized...so need a value assigned...before first use. Or you check for !isnil and only execute the statement if not for the places you are getting errors in the rpt
-
After switching from Chernarus to Napf I've created a simple script on player demand for our server. Maybe someone finds it useful, so I release it here.
It allows a player to pack / unpack a bike on demand to be able to make larger distances a bit quicker. No items are needed for crafting or deploying the bike. It's just there to make things a bit easier.
The bike is bound to the PlayerUID, so only the player who unpacked the bike can pack it again.
http://youtu.be/lG4j80qUDlc
The video shows how it works (early stage...looks a bit different now). Link to the script is in the video description (installation instructions are placed inside the script...so where they are needed).
You get killed on the bike if you do not add the _classname to variables.sqf or elsewhere to the array:
DZE_safeVehicle = ["ParachuteWest","ParachuteC"];
So: DZE_safeVehicle = ["ParachuteWest","ParachuteC","MMT_USMC" ];
For battleye script restriction kicks:
Add this:
!="_bike setVariable[\"Ownername\", _playeruid, true];"
at the end of the setDammage line, like:
5 "setDammage" !="_bike setVariable[\"Ownername\", _playeruid, true];"
.
.
Changelog v0.2 (10.12.2014):
- Some performance improvements (e.g. short hang at first use)
- Player now hops directly onto the bike as driver after unpacking
Link to Script v0.2:
-
I did it so. You need these 2 if conditions to check for the ItemBloodBag item.
private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType","_key_colors","_ownerKeyId","_itemsPlayer","_hasKey","_objects","_ownerID","_i"]; disableSerialization; _control = _this select 0; _button = _this select 1; _parent = findDisplay 106; //if ((time - dayzClickTime) < 1) exitWith {}; // jahan - self transfusion mit check variable ausschalten /////if (!DZE_SelfTransfuse && ((gearSlotData _control) == "ItemBloodBag")) exitWith {}; if (_button == 1) then { //dayzClickTime = time; _group = _parent displayCtrl 6902; _pos = ctrlPosition _group; _pos set [0,((_this select 2) + 0.48)]; _pos set [1,((_this select 3) + 0.07)]; _item = gearSlotData _control; _conf = configFile >> "cfgMagazines" >> _item; if (!isClass _conf) then { _conf = configFile >> "cfgWeapons" >> _item; }; _name = getText(_conf >> "displayName"); _cfgActions = _conf >> "ItemActions"; ///// jahan - if selfbloodpack, sonst geht das menu nicht if !((gearSlotData _control) == "ItemBloodBag") then { _numActions = (count _cfgActions); } else { _numActions = 0; }; _height = 0; ///// jahan - selfbloodpack if !((gearSlotData _control) == "ItemBloodBag") then { //Populate Menu for "_i" from 0 to (_numActions - 1) do { _menu = _parent displayCtrl (1600 + _i); _menu ctrlShow true; _config = (_cfgActions select _i); _type = getText (_config >> "text"); _script = getText (_config >> "script"); _outputOriented = getNumber (_config >> "outputOriented") == 1; _height = _height + (0.025 * safezoneH); _compile = format["_id = '%2' %1;",_script,_item]; uiNamespace setVariable ['uiControl', _control]; if (_outputOriented) then { /* This flag means that the action is output oriented the output class will then be transferred to the script && the type used for the name */ _array = getArray (_config >> "output"); _outputClass = _array select 0; _outputType = _array select 1; _name = getText (configFile >> _outputType >> _outputClass >> "displayName"); _compile = format["_id = ['%2',%3] %1;",_script,_item,_array]; }; _menu ctrlSetText format[_type,_name]; _menu ctrlSetEventHandler ["ButtonClick",_compile]; }; };
-
-
Is this enough? I mean the data could be read/written in 2 tables. Or is a child always one statement to 1 table? I've asked soul via pm for the child requests and statements and will let you know if i get an answer here. So far no answer.
Requesting Authentication... retrying to authenticate
in Scripting
Posted
You can setup this table in mysql that it auto-increments the Character ID. So if a new line is added to the table the 'next' ID is taken automatically.
Character_DATA table, structure (in phpMyadmin or other tool). Find the line for Character_DATA and set the autoincrement option to true.
Maybe that's what you want.