Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0

Помогите, ребят, я уже себе все мозги вынес. Нашел фишку, в инфистаре, когда прописываешь в чат dance, scream и тд, пропадает чат и выполняется действие. Нашел эти строки, пытался добавить свое, но тщетно. После добавления dance и прочие действия вообще перестали выполняться. Подскажите как быть, мне нужно чтоб когда игрок прописывает в чат "+", то его телепортировало в определенные координаты

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Тоже хотел бы узнать

Share this post


Link to post
Share on other sites










  • 0

какая версия infistar?

А причем здесь это. Вопрос идет как установить команду на ТП по кнопке "+"

			{
				_chat = _display displayCtrl 101;
				_txt = ctrlText _chat;
				if (_txt != '') then
				{
					_txtArray = toArray _txt;
					if ((_txtArray select 0) in [44,36,37,38,92,124,194,176,45,95,60,62]) then {_chat ctrlSetText '';};
					if (_txt in ['/scream','scream']) then
					{
						(_display) closeDisplay 0;
						_sound = ['z_scream_3','z_scream_4'] call BIS_fnc_selectRandom;
						[nil,player,rSAY,[_sound,250]] call RE;
						[player,500,true,(getPosATL player)] spawn player_alertZombies;
					};
					if (count (nearestObjects [player, ['Plastic_Pole_EP1_DZ'], 45]) == 0) then
					{
						if (_txt in ['stop','/stop']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rswitchMove,''] call RE;
							player playActionNow 'stop';
						};
						if (_txt in ['pushup','/pushup']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'AmovPercMstpSnonWnonDnon_exercisePushup'] call RE;
						};
						if (_txt in ['handstand','/handstand']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'AmovPercMstpSnonWnonDnon_idle70chozeniPoRukou'] call RE;
						};
						if (_txt in ['boxing','/boxing']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'AmovPercMstpSnonWnonDnon_idle68boxing'] call RE;
						};
						if (_txt in ['marts','/marts','karate','/karate','fighter','/fighter']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'AmovPercMstpSnonWnonDnon_exerciseKata'] call RE;
						};
						if (_txt in ['boogie','/boogie']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'ActsPercMstpSnonWnonDnon_DancingDuoIvan'] call RE;
						};                             
						if (_txt in ['dance','/dance']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'ActsPercMstpSnonWnonDnon_DancingStefan'] call RE;
						};
						if (_txt in ['clubbing','/clubbing']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'ActsPercMstpSnonWnonDnon_DancingDuoStefan'] call RE;
						};
						if (_txt in ['excercise','/excercise']) then
						{
							(_display) closeDisplay 0;
							[objNull, player, rplayMove,'AmovPercMstpSnonWnonDnon_idle69drepy'] call RE;
						};
					};
					if (_txt in ['/killme','killme','/unstuck','unstuck']) then
					{
						(_display) closeDisplay 0;
						[] spawn (compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_death.sqf');
						player setHit['Body',1];
					};
					if (_txt in ['!help','/help','help']) then
					{
						(_display) closeDisplay 0;
						systemChat 'infiSTAR.de ChatCommands:';
						systemChat '/stop, stop, /pushup, pushup, /handstand, handstand, /boxing, boxing,';
						systemChat '/marts, marts, /karate, karate, /fighter, fighter, /boogie, boogie,';
						systemChat '/dance, dance, /clubbing, clubbing, /excercise, excercise,';
						systemChat '/killme, killme, /unstuck, unstuck';
					};
					if !(_puid in ("+(str _allAdmins)+")) then
					{
						_txt2 = format['.ban %1',_name];
						if (_txt == _txt2) then
						{
							_log = format['ЗАПРЕЩЕННЫЙ ТЕКСТ (Использование Команд через Чат!): %1',_txt];
							"+_randvar10+" = [_name,_puid,toArray (_log), toArray ('ВЫДАН БАН')];
							publicVariableServer '"+_randvar10+"';
						};
					};
				};
			};

Share this post


Link to post
Share on other sites
  • 0

Вообщем потестив эту функу, понял, что если через нее будет тпхаться игрок, то его будет кикать как читака, причем за казую-то странную претензию, не относящейся к телепорту. как сделал я:

 

 

                        if (_txt in ['ivent']) then
                        {
                            (_display) closeDisplay 0;
                          player setpos [x,y,z,(вписываете коорды, дебаг монитор в помощь)]
                        };
 

можете попробовать, поотключать что-нибудь в античите, но думаю, что не стоит

Share this post


Link to post
Share on other sites
  • 0

Еще есть один вопрос, в дополнение к этому же. Я не сильно силен в программировании, так вот:

Я сделал в infi кнопку Включить ивент (К примеру) 

 

adminadd = adminadd + ["Activate Event",admin_event,"1","0","0","0",[]];

 

Дальше это

 

admin_event =
    {
        _log = '';
        if (isNil "anppn") then {anppn = true;} else {anppn = !anppn};
        if (anppn) then
        {
            event01 = 0;
            
            _log = 'event - ON';
        }
        else
        {
           event01 = 1
            
            _log = 'event - OFF';
        };
        hint _log;
        cutText [_log, 'PLAIN'];
        _sl = format['%1 - %2',name player,_log];
        PVAH_WriteLogReq = [player,_sl];
        publicVariableServer 'PVAH_WriteLogReq';
    };
 

 

Как мне сделать условие в функции, чтоб задействовать переменную event01 

Вроде бы if (event01 = 0) then

так ведь? Ну или подскажите как правильно

Edited by SpiritWolf (see edit history)

Share this post


Link to post
Share on other sites
  • 0

А как сделать чтобы телепортироваться можно было всего 1 раз? Я вот сделал так:

 

if (_txt in ['solnichniy','/solnichniy']) then
{
_waitTime = 60;
if (time > _startTime + _waitTime) then
{
player setpos [13347, 6339, 0];
_chat ctrlSetText 'Вы в Солнечом';
_startTime = time;
}
else
{
_chat ctrlSetText format['Вы должны подождать %1 секунд',ceil((_startTime + _waitTime) - time)];
};
};
if (_txt in ['elektro','/elektro']) then
{
_waitTime = 60;
if (time > _startTime + _waitTime) then
{
player setpos [10357.5, 2222, 0];
_chat ctrlSetText 'Вы в Электро';
_startTime = time;
}
else
{
_chat ctrlSetText format['Вы должны подождать %1 секунд',ceil((_startTime + _waitTime) - time)];
};
};
if (_txt in ['cherno','/cherno']) then
{
_waitTime = 60;
if (time > _startTime + _waitTime) then
{
player setpos [6325, 2303, 0];
_chat ctrlSetText 'Вы в Черно';
_startTime = time;
}
else
{
_chat ctrlSetText format['Вы должны подождать %1 секунд',ceil((_startTime + _waitTime) - time)];
};
};

 

 

Как сделать чтобы игроки не скакали между точками, а могли один раз тпешнутся куда надо.

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

  • Similar Content

    • By SpiritWolf
      Подскажите, как сделать условие, которое проверяет ID игрока из указанного массива.
      К примеру, есть 2 массива, и нужно проверить, если из первого массива, значит делать то, если из другого делать другое.
    • By SpiritWolf
      Подскажите, как отловить область.
      Привожу пример:
      У меня есть 3 области, игрок заходит, к примеру, во вторую и совершает какое-либо действие, нужно отловить в какой из трёх областей он это сделал.
      createLocation и nearestLocation сомнительные..
  • Our picks

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