Jump to content

Logi

Member
  • Posts

    69
  • Joined

  • Last visited

Posts posted by Logi

  1. It seems like you guys are close to sorting this issue.

    my code is:

    _vehicleMarker = createMarkerLocal [_Marker,[(_targetPosition select 0),(_targetPosition select 1)]];
    _vehicleMarker setMarkerShapeLocal "ICON";
    _vehicleMarker setMarkerTypeLocal "DOT";
    _vehicleMarker setMarkerColorLocal "ColorOrange";
    _vehicleMarker setMarkerSizeLocal [1.0, 1.0];
    _vehicleMarker setMarkerTextLocal format ["Here is your: %1",_vehicleName];

    So Better dead, you would need: setMarkerShapeLocal='yes'

    But that would not solve the database issue.

     

    It looks like Infistar is preventing it from finding the vehicle CharacterID for some reason, even though the script is identifying the correct CharacterID.

     

  2.  

    Also, I found a way to make it works with Infistar.

     

    You have to find these lines bloc in your AH.sqf :

     

    } forEach ['lbsetpicture','createDiaryRecord','createTask','createSimpleTask',
    'buttonSetAction','processDiaryLink','createDiaryLink','lbSetData','createTeam','profileNamespace',
    'exec','addGroupIcon','setGroupIconParams','markerText','setMarkerAlpha','setMarkerBrush','setMarkerColor',
    'setMarkerDir','setMarkerPos','setMarkerShape','setMarkerSize','setMarkerText','setMarkerType','addWeaponCargo',
    'addMagazineCargo','setVehicleAmmo','setVehicleAmmoDef','setWeaponReloadingTime','setVehicleInit','processInitCommands',
    'addMPEventHandler','createVehicleLocal','setWaypointStatements','addWaypoint','toLower','toUpper','loadFile','rcallVarcode',
    'saveStatus','loadStatus','saveVar','drawIcon','setMarkerDirLocal','setMarkerAlphaLocal','setMarkerPosLocal','setMarkerTextLocal','setMarkerTypeLocal',
    'setMarkerColorLocal','setMarkerBrushLocal','setMarkerSizeLocal','setMarkerShapeLocal','createMarkerLocal'];
     

    Then delete these lines :

     

    'createMarkerLocal'

    'setMarkerShapeLocal'
    'setMarkerTypeLocal'
    'setMarkerColorLocal'
    'setMarkerSizeLocal'
    'setMarkerTextLocal'

     

     

    Have you tested this for no admin users?

     

    So Infistar does prevent local map markers from being created. What about retrieving the vehicles co-ordinates?

    It will be great if you can sort this for the Infistar users, because without knowing what his code does, I cannot really help with the issue.

  3. You can search the database manually but it is a pain.

    I have created a script that can tell you if the vehicle still exists in the database while you are still in-game, it is much quicker and easier than manually searching.

    It also tells you what vehicle the key belongs to, if the vehicle does still exists in the database.

    You can get it here: (There is a version without map markers)

     

    If you really want to do it manually to understand how it works, you should use the key's class name instead of its display name. For example:

    The key's display name may be "Black Key (7a96)", but its class name is "ItemKeyBlack1168". You can get the class name of the key from the players inventory (Or wherever the key is stored) in the database. 

     

    You can take the number from the end of the class name and do a simple conversion - (number + key colour = vehicle CharacterID)

     

    Key colour:

    Green = + 0
    Red = + 2500
    Blue = + 5000
    Yellow = + 7500
    Black = + 10000
     
    So for "ItemKeyBlack1168", the vehicle CharacterID in the database would be 11168, because black = + 10000.
    If you had "ItemKeyRed1670" the vehicle CharacterID would be 4170, because red = +2500. Therefore 1670 + 2500 = 4170.

    If you had "ItemKeyYellow1272" the vehicle CharacterID would be 8772, because yellow = +7500. Therefore 1272 + 7500 = 8772.

     

    And so on.

     

    Once you know the vehicle's CharacterID, you can check if it still exists in the database.

     

  4. Could use puplicvariable eventhandler and run this server side? Maybe not the ideal way but should work.

     

    That may work for the people using Infistar, but there must be a more practical way to get around this.

    I hate Infistar and I have never even used it.

     

    Hello there,

     

    How can I delete the marker's vehicle ?

     

    Do you mean that you want to delete the vehicle marker from the map?

    Then please refer to the Edit section in the original post for further details:

     

    In order to remove the map markers, place the key/keys in your bag and run the script again.

  5. I will be glad to try and help the Infistar users, but I don't know what his code actually does, I have never seen it.

    From what you guys are saying, It seems to me like it prevents non admin from retrieving data from the vehicles.

    In which case, you could not retrieve the co-ordinates of a vehicle whether map markers are used or not.

     

    I am sure it must be possible to make exceptions for certain things. 

  6. Well I do not know exactly what server menu you are using, but it works for the server menu that I am using and its basically the same code that is used for the Epoch Admin Tool.

    This is what my server menu looks like if I reserve the locate vehicle script for admin and moderator use only.

     

    Obviously replace the zero's with your admin and moderator ID's.

     
    AdminList = [
    "000000000000000000", // Admin 1
    "000000000000000000"  // Admin 2
    ];
     
    ModList = [
    "000000000000000000",  // Moderator 1
    "000000000000000000"   // Moderator 2
    ]; 
     
    if((getPlayerUID player) in AdminList ||(getPlayerUID player) in ModList) then {
    // Admin and moderator action menu
    ActionsMenu =
    [
    ["",true],
    ["Locate Vehicles", [], "", -5, [["expression", format[_EXECscript6,"locate_vehicle.sqf"]]], "1", "1"],
    ["Self Bloodbag", [], "", -5, [["expression", format[_EXECscript3,"player_selfbloodbag.sqf"]]], "1", "1"],
    ["Suicide", [], "", -5, [["expression", format[_EXECscript4,"suicide.sqf"]]], "1", "1"],
    ["", [], "", -5, [["expression", ""]], "1", "0"],
    ["Exit", [20], "", -5, [["expression", ""]], "1", "1"] 
    ];
    } else {
    // Normal player action menu
    ActionsMenu =
    [
    ["",true],
    ["Self Bloodbag", [], "", -5, [["expression", format[_EXECscript3,"player_selfbloodbag.sqf"]]], "1", "1"],
    ["Suicide", [], "", -5, [["expression", format[_EXECscript4,"suicide.sqf"]]], "1", "1"],
    ["", [], "", -5, [["expression", ""]], "1", "0"],
    ["Exit", [20], "", -5, [["expression", ""]], "1", "1"] 
    ];
     
    };
    
  7. Well that stinks. How could I make it so the menu option only shows up for admins? This is what I have in my server menu file:

    player removeAction s_player_servermenu;s_player_servermenu1 = player addAction [("<t color=""#FFFFFF"">" + ("- Server Rules") +"</t>"),"custom\servermenu\spawn_rules.sqf","",-1,false,false,"", ""];
    s_player_servermenu2 = player addAction [("<t color=""#FFFFFF"">" + ("- Server Info") +"</t>"),"custom\servermenu\spawn_info.sqf","",-1,false,false,"", ""];
    s_player_servermenu3 = player addAction [("<t color=""#FFFFFF"">" + ("- Player Tips") +"</t>"),"custom\servermenu\spawn_tips.sqf","",-1,false,false,"", ""];
    s_player_servermenu4 = player addAction [("<t color=""#FFFFFF"">" + ("- Locate Vehicle") +"</t>"),"custom\servermenu\locate_vehicle.sqf","",-1,false,false,"", ""];
    s_player_servermenuCancel = player addAction ["close","custom\servermenu\server_menuClose.sqf","",-1,false,false,"", ""];

    Is there a way to make the "s_player_servermenu4" line only show for admins? If not, is there a way to add this to Infistar's menu?

     

    You could probably just create an admin list and then check if the user is an admin. eg:

    AdminList = [
    "00000000000000000", // Admin 1 ID here
    "00000000000000000"  // Admin 2 ID here
    ];
     
    if((getPlayerUID player) in AdminList then {
    player removeAction s_player_servermenu;s_player_servermenu1 = player addAction [("<t color=""#FFFFFF"">" + ("- Server Rules") +"</t>"),"custom\servermenu\spawn_rules.sqf","",-1,false,false,"", ""];
    s_player_servermenu2 = player addAction [("<t color=""#FFFFFF"">" + ("- Server Info") +"</t>"),"custom\servermenu\spawn_info.sqf","",-1,false,false,"", ""];
    s_player_servermenu3 = player addAction [("<t color=""#FFFFFF"">" + ("- Player Tips") +"</t>"),"custom\servermenu\spawn_tips.sqf","",-1,false,false,"", ""];
    s_player_servermenu4 = player addAction [("<t color=""#FFFFFF"">" + ("- Locate Vehicle") +"</t>"),"custom\servermenu\locate_vehicle.sqf","",-1,false,false,"", ""];
    s_player_servermenuCancel = player addAction ["close","custom\servermenu\server_menuClose.sqf","",-1,false,false,"", ""];
    } else {
    player removeAction s_player_servermenu;s_player_servermenu1 = player addAction [("<t color=""#FFFFFF"">" + ("- Server Rules") +"</t>"),"custom\servermenu\spawn_rules.sqf","",-1,false,false,"", ""];
    s_player_servermenu2 = player addAction [("<t color=""#FFFFFF"">" + ("- Server Info") +"</t>"),"custom\servermenu\spawn_info.sqf","",-1,false,false,"", ""];
    s_player_servermenu3 = player addAction [("<t color=""#FFFFFF"">" + ("- Player Tips") +"</t>"),"custom\servermenu\spawn_tips.sqf","",-1,false,false,"", ""];
    s_player_servermenuCancel = player addAction ["close","custom\servermenu\server_menuClose.sqf","",-1,false,false,"", ""];
    };
    
  8. I have never used inifstar so I do not know what his code does or how it affects things.

    If someone can give me a bit of information on how infistar affects vehicles, I may be able to help you guys that are having problems.

     

    When you say could it be turned off, what do you mean? You could reserve the tool for admin users only if that is what you wanted.

    If you want to remove the markers from the map, just place the keys in your bag and run the script again.

    Each time the script is run, it first removes any previous vehicle markers. So if you move a vehicle, then get out, you must run the script again for the map marker to update.

     
  9. Hey guys thanks for all the feedback and suggestions.

     

    Obviously there are pros and cons to a script like this, which is why I released a version with no map markers.

    Yes players can locate your vehicles if they steal your keys, but its a survival game, you should not be carrying all your keys with you, just 1 or 2 max.

    What often happens is someone gets killed, their keys are stolen, but the bandit cannot locate the vehicle, so they dispose of the key. Then the original owner is stuck with a locked vehicle and no key.

    But if you do not like the map markers, use the key identifier script instead.

     

    I have not tested this script whilst using a master key/ key chain script, but I will test it out and see if I can get it working properly.

    An I have never used Infistar so I cannot give any help on that. I am sure someone with experience using infistar will know how to prevent it from kicking players ect.

     

     

     

     

     

     

  10. I have not tried this myself but according to BI ( https://community.bistudio.com/wiki/setObjectTexture ), for setting textures you would use:
     
    object setObjectTexture [selectionNumber,texture]
     
    The example given is:
    _objectname setObjectTexture [0, "\pboname\texture.paa"]; 
    _objectname setObjectTexture [1, "\pboname\texture2.paa"];
     
    So I assume you would probably have something like:
     
    if (_class == "SUV_Blue") then
    {
     _object setVehicleInit "this setObjectTexture [0, ""textures\suv_blue_texture1.paa""]";
     _object setVehicleInit "this setObjectTexture [1, ""textures\suv_blue_texture2.paa""]" 
    };
     
    I could be wrong though.
  11. This is a script which enables users to identify which vehicles their keys belong to. It also enables users to locate their vehicles on the map through the use of local map markers.

     

    The reason why I created this script was because I kept receiving requests from my server users to locate their lost vehicles because they could not remember where they parked them.

    Also it can be very annoying having many vehicle keys and not remembering which vehicle they belong to.

    I searched to see if a script already existed, but I could not find a script that done what I wanted.

    I did stumble across Csus's Simple Vehicle Finder tool, which enables admin to teleport to vehicles, so I decided to modify his code to suit my needs.

    Therefore I must thank Csus for saving me a little time and effort. An I must credit him for his contribution.

     

    This is not a live tracking system, the map markers do not automatically update when a vehicle moves, the script must be run again after a vehicle has moved in order for the map marker to update.
    If a vehicle is being driven, the map marker will not be able to update. The map marker will only be able to update when the player gets out of the vehicle and the location is updated in the database.
    In order to remove the map markers, place the key/keys in your bag and run the script again.
     
    This script can be used without the local map markers, if you just want your users to be able to identify their vehicle keys without the map markers being created.

     

     

    Download: https://drive.google.com/folderview?id=0B95EyIoSuUF0bTQ5Zm9qZzVsclU&usp=sharing

    Installation instructions are in the README.txt file.
     
     
  12. If you are running 1.0.5.1 then you do not need selfBB, I see so many people still using a script for this.

     

    Just set the value in your init file.

     

    DZE_SelfTransfuse = true;
    DZE_selfTransfuse_Values = [4000,10,120]; // [blood Value, Infection Chance, Time Between Uses]
     
  13. I got tired of having to either scan the map with vehicle markers on or prowling the DB for a certain vehicle after someone complained they lost their vehicle so I made this.

    I use infiSTAR, which has a feature where you can press ALT+F11 to launch a file called "admin_start.sqf" from your Arma2OA folder. I don't know if other antihack tools have a similar feature, so I'll say it's only of use to people with infiSTAR.

     

    All you gotta do is stick their vehicle key in your toolbelt and chuck whatever keys you have already in your backpack then press ALT+F11 and it will instantly TP you to the vehicle.

     

    I dunno how to use github or something similar so I'm sorry for the big chunk here.

    Just save this in your "SteamApps\common\Arma 2 Operation Arrowhead" folder as "admin_start.sqf".

     

    private ["_inv","_keys","_searchString","_keyCount","_ID","_targetPos","_found","_targetID","_targetColor","_finalID","_targetPosition","_toPosition","_targetVehicle","_pPos","_pDir","_moveMethod","_allowMoveInDriver"];
    _inv = [player] call BIS_fnc_invString;
    _found = 0;
    _allowMoveInDriver = false;
    _moveMethod = "MeToCar"; // "CarToMe"
    {
        for "_i" from 1 to 2500 do {
            _searchString = format ["ItemKey%1%2",_x,str(_i)];
            if ((_searchString in _inv) && (_found != 1)) then {
                _targetColor = _x;
                _ID = str(_i);
                _found = 1;
            };
        };
    } forEach ["Black","Yellow","Blue","Green","Red"];
    
    if (_found == 0) exitWith { systemChat "No key found!";};
    
    _ID = parseNumber _ID;
    if (_targetColor == "Green") then { _finalID = _ID; };
    if (_targetColor == "Red") then { _finalID = _ID + 2500; };
    if (_targetColor == "Blue") then { _finalID = _ID + 5000; };
    if (_targetColor == "Yellow") then { _finalID = _ID + 7500; };
    if (_targetColor == "Black") then { _finalID = _ID + 10000; };
    _found = 0;
    
    {
        private ["_tID"];
        _tID = parseNumber (_x getVariable ["CharacterID","0"]);
        if ((_tID == _finalID) && (_found != 1)) then {
            _targetPosition = getPosATL _x;
            _targetVehicle = _x;
            _found = 1;
        };
    } forEach vehicles;
    
    if (_found == 0) exitWith { systemChat "The vehicle doesn't exist or you have too many keys!";};
    
    if (_moveMethod == "MeToCar") then {
        _toPosition = [(_targetPosition select 0) + 3,(_targetPosition select 1) + 3,0];
        player setPos _toPosition;
        player setDir 230;
    };
    if (_moveMethod == "CarToMe") then {
        _pPos = getPosATL player;
        _pDir = getDir player;
        _targetVehicle setPos _pPos;
        _targetVehicle setDir _pDir;
    };
    if (_allowMoveInDriver) then {    
        _targetVehicle setVehicleLock "UNLOCKED";
        player moveInDriver _targetVehicle;
    };
    systemChat format ["Found: %1",typeOf _targetVehicle];
    systemChat format ["ID: %1",_finalID];
    

     

     

    Hey Csus, nice script.

    I only started playing Epoch a couple of weeks ago and I decided to set up a dedicated server for me and my friends to play on.

    A few players started coming onto our server and it wasn't long before the admin started receiving requests to find users lost vehicles.

    That is what has lead me to this thread. I was looking to see if there was a vehicle locator script already available.

     

    Your script works very well as an admin tool, but I want my users to be able to locate their own vehicles, so I have created a modified version of your script.

    Instead of teleporting the vehicle to the player or teleporting the player to the vehicle, this script creates local map markers.

    The script also works when multiple keys are in the players inventory.

     

    http://youtu.be/0BwxnXttTr0

     

     

    Would you mind if I release this script?

    I will give you credit for the original code.

×
×
  • Create New...