Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Golgofinyanin

Ограничение voice в side chat

 

Попробовал несколько скриптов, не один не работает. может у кого есть решение.

 

Пробывал

 [] execVM "nosidechat.sqf"; в init

[] spawn {
	disableSerialization;
	DS_really_loud_sounds = {[60,15] call fnc_usec_pitchWhine;for "_i" from 1 to 15 do {playSound format ["%1",_this select 0];};};
	DS_double_cut = {1 cutText [format ["%1",_this select 0],"PLAIN DOWN"];2 cutText [format ["%1",_this select 0],"PLAIN"];};
	DS_slap_them = {_randomnr = [2,-1] call BIS_fnc_selectRandom;(vehicle player) SetVelocity [_randomnr * random (4) * cos getdir (vehicle player), _randomnr * random (4) * cos getdir (vehicle player), random (4)];};
	while {true} do {
		waitUntil {sleep 1;((!isNull findDisplay 63) && (!isNull findDisplay 55))};
		if (ctrlText ((findDisplay 55) displayCtrl 101) == "\ca\ui\textures\mikrak.paa") then {
			if (ctrlText ((findDisplay 63) displayCtrl 101) == localize "STR_SIDE_CHANNEL") then {
				[] spawn {
					if (isNil "reset_timer") then {
						reset_timer = true;
						sleep 90;
						disconnect_me = nil;
						warn_one = nil;
						warn_two = nil;
						warn_three = nil;
						warn_last = nil;
						reset_timer = nil;
					};
				};
				if (isNil "disconnect_me") then {disconnect_me = 0;} else {disconnect_me = disconnect_me + 1;};
				if (disconnect_me == 0) then {
					if (isNil "warn_one") then {
						warn_one = true;
						systemChat ("Please do not use voice on sidechat, this is your first warning.");
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["NO VOICE ON SIDE"] spawn DS_double_cut;
					};
				};
				if (disconnect_me == 1) then {
					if (isNil "warn_two") then {
						warn_two = true;
						systemChat ("Please do not use voice on sidechat, this is your second warning..");
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["NO VOICE ON SIDE"] spawn DS_double_cut;
					};
				};
				if (disconnect_me == 2) then {
					if (isNil "warn_three") then {
						warn_three = true;
						systemChat ("PLEASE DO NOT USE VOICE ON SIDECHAT!! This is your LAST warning!");
						systemChat ("You will be frozen and then disconnected!");
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["NO VOICE ON SIDE! This is your LAST warning!"] spawn DS_double_cut;
					};
				};
				if (disconnect_me >= 3) then {
					if (isNil "warn_last") then {
						warn_last = true;
						playMusic ["PitchWhine",0];
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["We warned you..."] spawn DS_double_cut;
						1 fademusic 10;
						1 fadesound 10;
						disableUserInput true;
						startLoadingScreen ["You are being disconnected", "DayZ_loadingScreen"];
						progressLoadingScreen 0.2;sleep 2;["All_Haha"] spawn DS_really_loud_sounds;
						progressLoadingScreen 0.4;sleep 2.25;
						progressLoadingScreen 0.6;sleep 2;["All_Haha"] spawn DS_really_loud_sounds;
						progressLoadingScreen 0.8;sleep 2.25;
						progressLoadingScreen 1.0;sleep 2;["All_Haha"] spawn DS_really_loud_sounds;
						endLoadingScreen;sleep 0.5;
						disableUserInput false;
						endMission "LOSER";
					};
				};
			};
		};
		sleep 1;
	};
};

И еще этот

в compiles.sqf

player_onSide =            compile preprocessFileLineNumbers "fixes\player_onSide.sqf";
 
if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {
    player spawn player_onSide;
};

 

player_onSide.sqf

 

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 {
                        player setDamage 1;
                };
        };

 

 

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts




  • 0

Ограничения нет. По крайней мере в данных скриптах(есть ли оно вообще - не знаю) -

Можно только убить игрока, если он жмет разговор.

 

Проверь что получает переменная _channel - выведи в лог.

if( _channel == localize "STR_SIDE_CHANNEL" ) then {

Share this post


Link to post
Share on other sites
  • 0

Ограничения нет. По крайней мере в данных скриптах(есть ли оно вообще - не знаю) -

Можно только убить игрока, если он жмет разговор.

 

Проверь что получает переменная _channel - выведи в лог.

if( _channel == localize "STR_SIDE_CHANNEL" ) then {

 

А как ее вывести в лог? я в этом не очень разбираюсь?

Share this post


Link to post
Share on other sites
  • 0

Отбой. нашел в чем трабл. 

 

player_onSide = compile preprocessFileLineNumbers "fixes\player_onSide.sqf";

if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {
player spawn player_onSide;
}; 

 

запихал в player_onSide.sqf

 

А "STR_SIDE_CHANNEL" надо заменить "str_channel_side"

 

СПС  NoNameUltima за попытку помочь. 

Share this post


Link to post
Share on other sites
  • 0
 

Остался только один момент. Как сломать ноги?  с болью и кровью все норм выходит , а ноги что то не ломаются.

Share this post


Link to post
Share on other sites
  • 0

Отбой. нашел в чем трабл. 

 

player_onSide = compile preprocessFileLineNumbers "fixes\player_onSide.sqf";

 

if ((_dikCode in actionKeys "PushToTalk") || (_dikCode in actionKeys "VoiceOverNet")) then {

player spawn player_onSide;

}; 

 

запихал в player_onSide.sqf

 

А "STR_SIDE_CHANNEL" надо заменить "str_channel_side"

 

СПС  NoNameUltima за попытку помочь. 

 

На epoch 1.0.4.2 это работает? Перепробовал всё так и не добился работы :pinch:

Share this post


Link to post
Share on other sites
  • 0
 

Да работает. Вот готовый скрипт.  [] execVM "nosidechat.sqf"; в init

 

 

[] spawn {
	disableSerialization;
	DS_really_loud_sounds = {[60,15] call fnc_usec_pitchWhine;for "_i" from 1 to 15 do {playSound format ["%1",_this select 0];};};
	DS_double_cut = {1 cutText [format ["%1",_this select 0],"PLAIN DOWN"];2 cutText [format ["%1",_this select 0],"PLAIN"];};
	DS_slap_them = {_randomnr = [2,-1] call BIS_fnc_selectRandom;(vehicle player) SetVelocity [_randomnr * random (4) * cos getdir (vehicle player), _randomnr * random (4) * cos getdir (vehicle player), random (4)];};
	while {true} do {
		waitUntil {sleep 1;((!isNull findDisplay 63) && (!isNull findDisplay 55))};
		
			if (ctrlText ((findDisplay 63) displayCtrl 101) == localize "str_channel_side") then {
				[] spawn {
					if (isNil "reset_timer") then {
						reset_timer = true;
						sleep 90;
						disconnect_me = nil;
						warn_one = nil;
						warn_two = nil;
						warn_three = nil;
						warn_last = nil;
						reset_timer = nil;
					};
				};
				if (isNil "disconnect_me") then {disconnect_me = 0;} else {disconnect_me = disconnect_me + 1;};
				if (disconnect_me == 0) then {
					if (isNil "warn_one") then {
						warn_one = true;
						systemChat ("Please do not use voice on sidechat, this is your first warning.");
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["NO VOICE ON SIDE"] spawn DS_double_cut;
					};
				};
				if (disconnect_me == 1) then {
					if (isNil "warn_two") then {
						warn_two = true;
						systemChat ("Please do not use voice on sidechat, this is your second warning..");
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["NO VOICE ON SIDE"] spawn DS_double_cut;
					};
				};
				if (disconnect_me == 2) then {
					if (isNil "warn_three") then {
						warn_three = true;
						systemChat ("PLEASE DO NOT USE VOICE ON SIDECHAT!! This is your LAST warning!");
						systemChat ("You will be frozen and then disconnected!");
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["NO VOICE ON SIDE! This is your LAST warning!"] spawn DS_double_cut;
					};
				};
				if (disconnect_me >= 3) then {
					if (isNil "warn_last") then {
						warn_last = true;
						playMusic ["PitchWhine",0];
						[] spawn DS_slap_them;
						["beat04"] spawn DS_really_loud_sounds;
						["We warned you..."] spawn DS_double_cut;
						1 fademusic 10;
						1 fadesound 10;
						disableUserInput true;
						startLoadingScreen ["You are being disconnected", "DayZ_loadingScreen"];
						progressLoadingScreen 0.2;sleep 2;["All_Haha"] spawn DS_really_loud_sounds;
						progressLoadingScreen 0.4;sleep 2.25;
						progressLoadingScreen 0.6;sleep 2;["All_Haha"] spawn DS_really_loud_sounds;
						progressLoadingScreen 0.8;sleep 2.25;
						progressLoadingScreen 1.0;sleep 2;["All_Haha"] spawn DS_really_loud_sounds;
						endLoadingScreen;sleep 0.5;
						disableUserInput false;
						endMission "LOSER";
					};
				};
			};
		
		sleep 1;
	};
};

Share this post


Link to post
Share on other sites
  • 0

это всё туда кидать в init ?

в корень папки MPmission,только для начала Создай sqf. с названием - ( nosidechat.sqf ),а затем впиши в init [] execVM "nosidechat.sqf";

Share this post


Link to post
Share on other sites
  • 0

 

это всё туда кидать в init ?

в корень папки MPmission,только для начала Создай sqf. с названием - ( nosidechat.sqf ),а затем впиши в init [] execVM "nosidechat.sqf";

благадарствую

Share this post


Link to post
Share on other sites
  • 0

Сорри за оффтоп, но в чем смысл разукрашивать все сообщения цветами радуги? Вреда в этом больше, чем пользы, ибо информация хуже воспринимается.

Share this post


Link to post
Share on other sites
  • 0

Сорри за оффтоп, но в чем смысл разукрашивать все сообщения цветами радуги? Вреда в этом больше, чем пользы, ибо информация хуже воспринимается.

Ты походу уже не знаешь как поумничать !!!???

Найди себе Лучше девушку,а если есть её поучай....

Share this post


Link to post
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...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.