Jump to content

[Release] Vehicle locator and key identifier


Logi

Recommended Posts

I know, thats not what i was talking about.

 

I was talking about the possibility to activate the markers on the first time i call the script and delete them by running the script again.

 

Toggle the markers on and off in game so users can see they're vehicles and remove the markers when they dont need them anymore, this would also update vehicle positions in case they moved.

 

Something like the marker script that marks the player position in macca's right click actions script. Its in the examples folder.

Link to comment
Share on other sites

I know, thats not what i was talking about.

I was talking about the possibility to activate the markers on the first time i call the script and delete them by running the script again.

Toggle the markers on and off in game so users can see they're vehicles and remove the markers when they dont need them anymore, this would also update vehicle positions in case they moved.

Something like the marker script that marks the player position in macca's right click actions script. Its in the examples folder.

 

Have you read the original post in this thread? That is exactly what this script already does, if I understand you correctly.

you just need to put the key in your backpack/safe/shed ect, so that it is not in your toolbelt. Then run the script again and the markers will vanish from the map.

You could add a simple timer to automatically remove the markers after say 1 minute but at the moment the users decide if they want to remove them by running the script again with no key in their toolbelt.

If you want to update the vehicle marker after a vehicle has moved, just run the script again.The old marker will be removed and a new marker will be placed at the new location.

Link to comment
Share on other sites

With latest infistar not working! Have any working issue to locator? 

Cheers

 

I don't use infistar. 

I did manage to provided a solution for the older version of infistar with some help from infistar users, but if the infistar code has changed, I will not be able to help you unless I know what has changed.

Have you actually followed the steps that I have previously provided for infistar users, in order to allow the local map markers and fix the vehicles array?

 

You will need to provide me with a bit more information if you want me to try and provide a solution. 

Exactly what part of the script is not working? Does the script identify the users vehicle key? Are the map markers being blocked?

Link to comment
Share on other sites

INFISTAR users

If you have Infistar installed, this script will work fine for the admin.

But if you want this script to work for all the regular players on your server, you must do the following:

 

Search your AH.sqf file and either remove these or change them from 'no' to 'yes'. createMarkerLocal='no'; setMarkerShapeLocal='no'; setMarkerTypeLocal='no'; setMarkerColorLocal='no'; setMarkerSizeLocal='no'; setMarkerTextLocal='no';

 

This line i didnt do because the AH File no longer has it.

 

Then search for this line: vehicles = [vehicle player]; Replace it with this: vehicles = vehicles;

 

For me this works like a charm

Link to comment
Share on other sites

I have the latest version of infistar and it works if i follow the steps Logi made for infistar users.

 

Thanks for confirming that this is working with the latest infistar. DemonGo must have not followed the installation instructions properly or something.

Did you try the multi-key version that I threw together?

Link to comment
Share on other sites

  • 4 weeks later...

At the moment the current release of the script only detects a single vehicle for each key. I have been meaning to update the script but I have been busy and forgot.

I have just done a quick mod that should work for people using the vehicle key changer script.

This is not an update to the script, it is just an alternative for now.

 

This will not let players search with multiple keys in their toolbelt like the original script, it will only search with a single key. But it should find all vehicles associated with that key.

You can just replace the locate_vehicle.sqf with the one from this file. But it has only been tested for a couple of minutes on my test server.

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

 

This is a good step in the right direction, 

 

Do you think its possible to check all the keys? I havent had time to undertstand the code fully yet. 

 

Good work so far :)

Link to comment
Share on other sites

  • 1 month later...

Logi, would you be interested in pushing some of you gui upgrades into the admin tool or dropping me the code? I am starting to write out the building one now for version 1.9.2 release and remembered you had one working. It would be much easier if you threw the code in than me going through and rewriting everything.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Nox, the code for the GUI that I created was on one of my test servers in a VM and I deleted it when I formatted my PC a couple of weeks ago.

I have not really been on Epoch for the last 4 or 5 weeks because I have been very busy with coursework over the Christmas period.

When I noticed your message, I had a bit of spare time so I was going to re-create the spawn building dialog menu for you, but I got a bit carried away.

 

I ended up creating a full admin menu with all of the different spawn menus built into it.

Then I had to modify the majority of the scripts to work with the dialog. I also had to completely re-write a couple of the scripts including all of the map marker scripts.

I added a few new scripts as well. I modified my vehicle locator script to work remotely by selecting a player from the player list and searching their toolbelt for any vehicle keys.

All of the tools work at the moment but I have only been developing it for 3 days so there is still a bit of work to do before it will be finished.

Currently the dialog controls are pre-defined in a hpp file and then populated and modified dynamically in the code. I want to remove the hpp file and create the entire menu in the script.

 

I don't know what you where planning on doing for a GUI but we could possibly collaborate if you like my GUI that I have built so far.

The tool is a bit different now though. A lot of scripts have been pre-mapped to buttons, such as the lock/unlock, point to repair, show code and delete item scripts are mapped to buttons.

The admin scroll menu is toggle-able from the dialog but I have not done many mods to the scroll menu or thought about what tools should be in it.

I have created a github repository and will upload the code when I am happy with it.

Here is a couple of screenshots. 

 

2015-01-30_00034_zps78rebb5b.jpg

 

 

2015-01-30_00045_zpslc8fkwf9.jpg

 

 

2015-01-30_00060_zpslynmlic6.jpg

 

 

2015-01-30_00037_zpsj3qbgc0j.jpg

 

 

2015-01-30_00029_zpscb62mdgf.jpg

 

 

2015-01-30_00030_zpsaaxyl6fq.jpg

Link to comment
Share on other sites

Have you got any screenshots of your GUI so far? How are you planning on categorising the different buildings?

I thought the tool was released under GPL. Obviously if you don't like my GUI and don't want to collaborate, I will ask your permission before I upload anything.

Link to comment
Share on other sites

Have you got any screenshots of your GUI so far? How are you planning on categorising the different buildings?

I thought the tool was released under GPL. Obviously if you don't like my GUI and don't want to collaborate, I will ask your permission before I upload anything.

 

I like yours way more and would much rather have that added to the tool. 

 

I can probably get some screen shots soon. I haven't been messing with it recent due to being sick for two weeks. It is pretty much the vehicle gui with a few slight button changes, size change, and the not yet implemented categories. If possible I want to have ones like Residential, industrial, farm, and have those subdivide into houses, apartments, pipes, signs, piers. For now this all would depend on how the files lable each item and if I can extract that label. I found it much easier to pull from the tame files than to have each individual item added like it was. I only did that as a test system. Really yours is much better and cleaner.

I planned to create an overall gui for the entire tool as well for version 2.0 release (the building stuff was the last before version 1.9.3 was ready for release). Yours looks like it would work very well as the overall gui and the vehicle gui so I am considering maybe replacing most of the aspects of mine with a slimmed version of yours for the scroll menu, and then use the one shown above as the overall gui system for the entire tool. My idea is to have a scroll and gui, allowing for the user to choose which to use (either can be switched off in the files or in the scroll/gui at any time). The scroll will have a few guis for parts of it though, because a huge list in the scroll is just impractical, like for the vehicle and building spawns.

 

I just realized we are way off topic for this thread and we should probably move this to a message or the admin tool thread.

Link to comment
Share on other sites

  • 2 weeks later...

Hey there!

 

I'm trying to get this working for non-admins (for admins its working fine). Cant find  any "vehicles = ..." in the ah.sql and there are no setmarker... too.. Any ideas?

 

 

createMarkerLocal='no'; setMarkerShapeLocal='no'; setMarkerTypeLocal='no'; setMarkerColorLocal='no'; setMarkerSizeLocal='no'; setMarkerTextLocal='no';

Then search for this line: vehicles = [vehicle player]; Replace it with this: vehicles = vehicles;

Link to comment
Share on other sites

  • 3 weeks later...

If you want it to be for you or VIP's

if ((getPlayerUID player) in ["76561198159452610","76561198137898990","76561198001093549","76561198076139056","76561198093792698","76561198146424231","76561198092220317"]) then {
// Add extra context menus
_erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};
};
Link to comment
Share on other sites

  • 1 month later...

@Logi

 

nice work, i like this.

 

however as always i like to customize a bit, so in my personal version i changed it to only allow admins to show the markers on the map to avoid allowing local markers for players not to mention i added a check to see if there was markers on the map already and if there is they are removed and the script exits.

for normal players i just show GPS coords in the chat (also changed requirements/activation to a GPS instead), that way its not too OP and the players still have to actually go and look for it.

 

what i did is just add all the markers to a global array and then count the array to see if markers where added, and if more than 0 in the array we remove them, anyone that does not activate the markers will not be affected, but admins can turn the markers On/Off without relogging.

 

 

 

If you want it to be for you or VIP's

if ((getPlayerUID player) in ["76561198159452610","76561198137898990","76561198001093549","76561198076139056","76561198093792698","76561198146424231","76561198092220317"]) then {
// Add extra context menus
_erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};
};

 

this would disable all extra right click actions for everyone else but the ones on that list.

 

to only allow admins/vip's to use the script put something like this in the beginning:

if !(getPlayerUID player in ["0123456789","0123456789"])exitWith{
	systemChat "Only allowed for VIP's / Admins!";
};
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 2 weeks later...

Please help to AH (AntiHack) fix, i don't have this line vehicles = [vehicle player]

Then search for this line: vehicles = [vehicle player]; Replace it with this: vehicles = vehicles;

 

Does your AH.sqf file contain this line:

if (isNil 'vehicles') then {vehicles = [];} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};

 

If so, change it to this and it should work:

if (isNil 'vehicles') then {vehicles = vehicles;} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};

Link to comment
Share on other sites

Does your AH.sqf file contain this line:

if (isNil 'vehicles') then {vehicles = [];} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};

 

If so, change it to this and it should work:

if (isNil 'vehicles') then {vehicles = vehicles;} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};

i change, but don't work admins normal work, players write found 1 key, don't marker

Link to comment
Share on other sites

  • 6 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...