Jump to content

[Release] Radio Communication Script v1.3.1


Recommended Posts

I created a script to mark friendly players positions on the Map/GPS and 3D.
 

Description

 
You need to have a radio in your toolbelt and tag an other player as friendly to let him see you on the map/gps. This simulates position updates by radio contact. Also the names of the players shown on the map, are shown in a seperate GUI in the left part of the screen. I have a better description here.
 
radio_v1.3.jpg
 
If the players have both respectivly tag themselves as friendly, they can both see each other. Every player can deactivate this feature by removing the radio from their toolbelt. On death players normally loose their friendships and they don't send out their position anymore until adding other players as friendly again.

 

radio2_v1.3.jpg
 

3 Main features are currently available by this script:

  • 2D player positions on map/GPS
  • Names of players currently in radio contact with
  • 3D player positions

 

Technical Details

 

New players which just fulfilled the 2 requirements (radio + friendly) are added as markers every 2 seconds (adjustable by "RC_addInterval"). Also at this intervall their markers are removed, if the conditions are not met anymore. Also the markers blink once at this time what makes them easier to spot on the map. The marker positions are updated every 0.5 seconds (adjustable by "RC_updateInterval").

 

Several other variables can be configured in the config.sqf to adjust the visual properties to your liking or disable features. Also the script directory path can be adjusted in the init.sqf. This should make moving the script much easier in your mission file. Don't forget to also change the path to the desc_in.h in your description.ext.
 
The radio item is 'ItemRadio'. This item does not spawn normally in DayZ Epoch. You have to add it somehow into your server. E.g.: Use the MissionLootTable feature explained adjust the item spawn configuration. Or add as gear to your AI missions or to the loot crates of the missions. Or change the starting gear to contain one.
 
Since this script uses friendship variables, which are DayZ Epoch only, this script only supports that mod. But it is easy to remove that requirement.
 

Installation

 

I will not discuss here how to get the mission file or how to handel PBO-files. If you have access to such files, you should know by now.
 
The project can be also found on github.
Perform the following steps:

  • Extract the attached ZIP-file (RCv1.3.1.zip), there should now be a directory "RC".
  • Copy that into the mission directory.
  • Add the following line at the end of your "init.sqf" in the mission file
    execVM "RC\init.sqf";
    
  • Change the configuration of the script in "RC\config.sqf".
  • If GUI is enabled (enabled by default), add
    #include "RC\desc_inc.h"
    
    in your description.ext, in the RscTitles class
    class RscTitles
    {
         //here
    };
    
    so that it looks like in the "description.ext" file in the ZIP. There may already be definitions in there, then add the line at the beginning or the end of the class RscTitles, but between the brackets. If you cand find this class, you may create it.
  • Check the AntiHack part of this thread and apply if necessary.
  • Finished.

AntiHack

 

Battleye

This script works with the default DayZ Epoch 1.0.4.2 Battleye directory.

 

infiSTAR
    This script does not work correctly with infiSTAR antihack. The map/GPS markers will only work for admins, if configured correctly.

 

Map/GPS markers for admins

You have to enable the local marker functions in your "AHconfig.sqf". Beware, this allows cheaters/hackers to use several different functions as well. This means they will  be able to create markers as they like to visualize other players/vehicles/bases on the map, spawn items and more. It means you are deactivating a securitx feature of infiSTAR. Apply at own risk.

    To enable the local marker functions search for the following line/variable in the "server_functions/init/AHconfig.sqf":

/*  Break Functions ?     */  BHF =  true;

    And set it to:

/*  Break Functions ?     */  BHF =  false;

If you can't find this variable, you need to update your infiSTAR to the latest version (supported since 16/04/2014/AH0328C).

 

Others

A list of used functions can be found in the github project. This could help you adding exceptions to your cheat protection software.

 

Testing

 

I have my own dedicated server with this script active (and others) and you are welcome to have fun there. The server is called "International Steel Company" and runs on the IP 178.63.4.168:2302. I also have a blog for the server, where I keep writing about updates and have more information about the server and its freatures.

 

Debug Version
If you encounter problems with the script and it isn't working correctly, you can install the debug version (RCv1.2Debug.zip) which executes some tests and reports the results into the Arma 2 OA error file. This file can be very important in finding the problem, why it doesn't work properly. I am talking about the arma2OA.rpt file. If you don't know where it is located read here. You can reduce the file to some important lines. These are located between

"Checking RC Script ..."

and

"... finished checking RC Script."

Example:

"DAYZ: CLIENT IS RUNNING DAYZ_CODE "1.0.4.2""
"RC Debug initialized."
"RC Script is Running."
"Waiting ..."
Fresnel k must be >0, given n=0.8,k=0
"PLAYER RESULT: true"
"Checking RC Script ..."
"  RC Debug:dbg_hadEverFriend assert failed. Expected true, but was false"
"  RC Debug:dbg_fncCallIsFriend assert failed. Expected true, but was false"
"  RC Debug:dbg_fncCallAddUnitMarker assert failed. Expected true, but was false"
"  RC Debug:dbg_fncCallAddUnitCommunication assert failed. Expected true, but was false"
"... finished checking RC Script."
"PLOGIN: Login loop completed!"

The informations from the tests don't really help you in finding the problem, but can help me, if you send me the results.

 

Thanks for reading

 

I hope you enjoy that feature.

 

Changelog

v1.3.1, May 3

  • added realtime updating for 3D names
  • added range limit for 3D names
  • implemented missing 3d options

v1.3, April 30

  • added 3D player positions
  • fixed GUI interferences with DayZ
  • added script path variable to init.sqf

April 22

  • added 1.2 Debug Version for problem checking

v1.2, April 21

  • fixed direction of players in vehicles
  • added marker for players in vehicles (square around player)
  • added options for the vehicle marker
  • added GUI with player names currnetly visible by radio
  • fixed markers of dead players, they are not shown anymore

April 16

  • infiSTAR configuration help was added to this thread.

v1.1, April 12

  • added more config options (color, icon type, transparency)
  • showing of player name next to marker icon

v1.0, April 11

  • inital realese

 


RCv1.3.1.zip

RCv1.3.zip
RCv1.2.zip
RCv1.1.zip



RCv1.2Debug.zip
Link to comment
Share on other sites

I will test it on a fresh 1.0.4.2 server. My server is a little too modified, but but there were no problem until now.

 

Update: Not problems with "dayz_code\system\antihack.sqf". And no problems with BattleEye. I don't use any of the filtered functions by BE. Tested on a vanilla epoch 1.0.4.2 server.

Link to comment
Share on other sites

I coded, almost exactly, the same system on my test server.  However, when I incorporated it into my white listed server we had several people get temp banned through Infistar's antihack.  I am assuming you are using group icons to achieve the markers on the map and GPS.  How did you get around this?

Link to comment
Share on other sites

You can easily make exceptions in the antihack and have it active otherwise by setting variables to the players when they are doing a specific action.

For example when a player activates the GPS to see his friends...set a variable to him

player setVariable ["activateGPShack",1,true];
and when he switches it off...remove it
player setVariable ["activateGPShack",0,true];

Then in the antihack do this:

_bypassAHfunction = player getVariable['activateGPShack',0];

and then when you want to 'skip' something in the AH

if (_bypassAHfunction != 1) then { .... execute this unless the user is using his GPS thingy to see friends };

Sure a hacker can set himself the same variable to bypass this...and make the AH think he is using the GPS function....but at least you are not totally removing the AH code that catches ESP hackers....you'll still catch some 'noob' hackers that run stuff by default :P

Link to comment
Share on other sites

Thanks for the help Sandbird.

 

I have a dedicated server and am not bound to Infistar or any other server hoster. And thus have no experience with their server features or antihacks.

 

Can I include

player setVariable ["activateGPShack",1,true];

in my script for the local player while the script is running as workaround to the infistar antihack?

 

I coded, almost exactly, the same system on my test server.  However, when I incorporated it into my white listed server we had several people get temp banned through Infistar's antihack.  I am assuming you are using group icons to achieve the markers on the map and GPS.  How did you get around this?

I use local markers. And I just don't use Infistar.

Link to comment
Share on other sites

does not seem to work for me maybe since I cant get my gps to look like yours

stupid question... how do you pull up gps like that and not show full map but only minimap on gps ??

 

 

I changed nothing in "RC\config.sqf".

ctrl-m shows GPS

Link to comment
Share on other sites

Thanks for the help Sandbird.

 

I have a dedicated server and am not bound to Infistar or any other server hoster. And thus have no experience with their server features or antihacks.

 

Can I include

player setVariable ["activateGPShack",1,true];

in my script for the local player while the script is running as workaround to the infistar antihack?

 

I use local markers. And I just don't use Infistar.

 

uhmmm infistar is an antihack script you add to your server :P not a hoster hehe

if you dont have that script for protection then THIS gps script should work fine.

Link to comment
Share on other sites

Great scripts !

 

For those of you like me who want to see the names of their team mates on the map add the following lines to function RC_addMarker in file functions.sqf:

 

_unitName = name _unit;
_index setMarkerTextLocal _unitName;

_marker = createMarkerLocal [_index, _pos];
    _index setMarkerTypeLocal "mil_start";
    _index setMarkerBrushLocal "Solid";
    _unitName = name _unit;
    _index setMarkerTextLocal _unitName;
    _index setMarkerDirLocal getDir _unit;
    _index setMarkerSizeLocal [RC_markerSize,RC_markerSize];
    _index setMarkerPosLocal _pos;
Link to comment
Share on other sites

 

Great scripts !

 

For those of you like me who want to see the names of their team mates on the map add the following lines to function RC_addMarker in file functions.sqf:

 

_unitName = name _unit;

_index setMarkerTextLocal _unitName;

_marker = createMarkerLocal [_index, _pos];
    _index setMarkerTypeLocal "mil_start";
    _index setMarkerBrushLocal "Solid";
    _unitName = name _unit;
    _index setMarkerTextLocal _unitName;
    _index setMarkerDirLocal getDir _unit;
    _index setMarkerSizeLocal [RC_markerSize,RC_markerSize];
    _index setMarkerPosLocal _pos;

I will add an option to enable this in the configuration, if you are ok with it.

Link to comment
Share on other sites

just keep in mind that a radio in your inventory gives way to a lot of #user:group_communication false positive bans in infistar.

I already added, that this does not work with infistar. I can't resolve that problem in my script. It is up to the infistar guys or the server admins. I could assist in adding extra code, but I don't know how, since it is server side.

Link to comment
Share on other sites

All my scripts work perfect with infistar......

 

Reading through your comments on here you say .. "I already added, that this does not work with infistar. I can't resolve that problem in my script. It is up to the infistar guys or the server admins. I could assist in adding extra code, but I don't know how, since it is server side."

 

All the scripts I have had from this site are tested and working with all anti-hacks.. so I don't understand the point you trying to make?

 

I am not confident enough to mess around with the anti - hack script and all I am asking for is help from more advanced scriptwriter than me who use this script with infistar anti hack and have found a fix for it?

Link to comment
Share on other sites

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
×
×
  • Create New...