Adding a block for voice over side?

First code blocks go in

compiles.sqf

Add the second code block to a seperate file eg:

player_onSide = compile preprocessFileLineNumbers "fixes\player_onSide.sqf";
Thanks, works great. Is there anyway you can preview these built in sounds? I tried "Mol_shutup" but it was not good.
 
Could x00 anti-hack be blocking this somehow? Have tried a few different versions including your seaweeduks one and nothing. Chucked first block at the bottom of compiles and made the player_onSide.sqf with his block
 
Could x00 anti-hack be blocking this somehow? Have tried a few different versions including your seaweeduks one and nothing. Chucked first block at the bottom of compiles and made the player_onSide.sqf with his block


I'm using blurs antihack it works fine without modification, there are no additional player actions
 
I have this at the bottom of my compiles.sqf
Code:
player_onSide =            compile preprocessFileLineNumbers "fixes\player_onSide.sqf";
 
if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {
    player spawn player_onSide;
};

And this is the player_onSide.sqf
Code:
private["_display","_channelDisplay","_text","_channel"];
        disableSerialization;
        _channelDisplay = findDisplay 63;
        if( !isNull _channelDisplay) then {
                _text = _channelDisplay displayCtrl 101;
                _channel = ctrlText _text;
                if( _channel == localize "STR_SIDE_CHANNEL" ) then {
[60,15] call fnc_usec_pitchWhine; //60 - Itensity (whine sound)  15 - Seconds  it lasts
[] spawn
{
playSound "explosionlarge_1"; //Built in sounds @ http://pastebin.com/Lcx6W0Nn
playSound "explosionlarge_1"; // Playing the sound multiple times at once increases the volume of the sound.
playSound "explosionlarge_1";
playSound "explosionlarge_1";
disableUserInput true;
sleep 1;
disableUserInput false;
};
cutText ['NO VOICE IN SIDECHAT!','PLAIN DOWN',25];
 
//dayz_lastCheckBit = time;
[player,15,true,(getPosATL player)] spawn player_alertZombies;
                };
        };
 
I have this at the bottom of my compiles.sqf
Code:
player_onSide =            compile preprocessFileLineNumbers "fixes\player_onSide.sqf";
 
if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {
    player spawn player_onSide;
};

And this is the player_onSide.sqf
Code:
private["_display","_channelDisplay","_text","_channel"];
        disableSerialization;
        _channelDisplay = findDisplay 63;
        if( !isNull _channelDisplay) then {
                _text = _channelDisplay displayCtrl 101;
                _channel = ctrlText _text;
                if( _channel == localize "STR_SIDE_CHANNEL" ) then {
[60,15] call fnc_usec_pitchWhine; //60 - Itensity (whine sound)  15 - Seconds  it lasts
[] spawn
{
playSound "explosionlarge_1"; //Built in sounds @ http://pastebin.com/Lcx6W0Nn
playSound "explosionlarge_1"; // Playing the sound multiple times at once increases the volume of the sound.
playSound "explosionlarge_1";
playSound "explosionlarge_1";
disableUserInput true;
sleep 1;
disableUserInput false;
};
cutText ['NO VOICE IN SIDECHAT!','PLAIN DOWN',25];
 
dayz_lastCheckBit = time;
[player,15,true,(getPosATL player)] spawn player_alertZombies;
                };
        };


Don't just paste it at the bottom the first line I put with all the other definitions towards the top,

The next part replaces the existing codeblock that looks like this:

Code:
if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {
dayz_lastCheckBit = time;
[player,5,false,(getPosATL player)] spawn player_alertZombies;
};

Line 293 for me.
 
Don't replace the original voice detection code. You will only remove the zombie calling feature when you talk. But also, the original code has delayed checks so a person can avoid being detected using the original checks.
 
Don't replace the original voice detection code. You will only remove the zombie calling feature when you talk. But also, the original code has delayed checks so a person can avoid being detected using the original checks.


I just added those two lines into player_onSide.sqf
 
i didnt even had player_onSide.sqf anywhere not in server pbo nor code pbo
guess that's not very normal...
 
thanks seaweeduk but that whas a non issue as i already had it working before making that post ;)
 
Ok so do I have this right

replace this
Code:
if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,50,true,(getPosATL player)] spawn player_alertZombies;
        };
with this
Code:
if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {
    player spawn player_onSide;
};
in the compiles.sqf

and then make a new file called player_onSide.sqf
with this in
Code:
private["_display","_channelDisplay","_text","_channel"];
        disableSerialization;
        _channelDisplay = findDisplay 63;
        if( !isNull _channelDisplay) then {
                _text = _channelDisplay displayCtrl 101;
                _channel = ctrlText _text;
                if( _channel == localize "STR_SIDE_CHANNEL" ) then {
[60,15] call fnc_usec_pitchWhine; //60 - Itensity (whine sound)  15 - Seconds  it lasts
[] spawn
{
playSound "explosionlarge_1"; //Built in sounds @ http://pastebin.com/Lcx6W0Nn
playSound "explosionlarge_1"; // Playing the sound multiple times at once increases the volume of the sound.
playSound "explosionlarge_1";
playSound "explosionlarge_1";
disableUserInput true;
sleep 1;
disableUserInput false;
};
cutText ['NO VOICE IN SIDECHAT!','PLAIN DOWN',25];
 
dayz_lastCheckBit = time;
[player,15,true,(getPosATL player)] spawn player_alertZombies;
                };
        };
and then put that in the mission.pbo?

but where about's does
Code:
player_onSide =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_onSide.sqf";
go
should it not be
Code:
player_onSide =            compile preprocessFileLineNumbers "player_onSide.sqf";

if it's going in the mission?
 
The antihack from x00's version blocks the scripts from working for normal players but they work for admins. I posted over that thread asking for help so I might as well post here. Do you have a work around for the antihack or what to whitelist? It's funny because my admins now can't talk in side channel while players can lol.
 
thank you for that, but it doesnt help against double tap.
iam running the version you released some days for 2 days now.
my experience is that these fags trying to annoy the other players are feeling challenged by the script and spam even more.
i have the 'bug' that the names are not displayed when someone is talking in sidechat.
ive tried to define "vonID=1" in my server profile but the names are not showing up.
 
Back
Top