Jump to content
juandayz

[Whistle Players,Zeds,AI]

Recommended Posts

Installed and go in safezone everyone is doing this lol sounds like im at a canary farm. Players are liking this.

Now if we could be able to tie up a player with the new item rope and whistle for zombies to come feast  that would be epic.

Share this post


Link to post
Share on other sites
6 hours ago, Hooty said:

Installed and go in safezone everyone is doing this lol sounds like im at a canary farm. Players are liking this.

Now if we could be able to tie up a player with the new item rope and whistle for zombies to come feast  that would be epic.

@Hooty  mmm yup your right,, i gonna restrict the whistle in safezones.-   tnks for the sugestion @salival

Share this post


Link to post
Share on other sites

@Hooty  not tested but for no whistle in safezones maybe change this in your selfactions

private ["_countplayers","_safezones","_safezonesRad","_inSafezone","_player"];
_safezones = [[6325,7807,0],[4063,11664,0],[11447,11364,0],[1606,7803,0],[12944,12766,0],[4361.4937,2259.9526,0], [12060,12640,0]];	
_safezonesRad = 150;
_inSafezone = false;
_player = player;

if (_player distance _x < _safezonesRad) then {
_inSafezone = true;

};
} forEach _safezones;

_countplayers = count (player nearEntities ["CAManBase", 10]) 
if (!_inSafezone && (_countplayers > 1)) then {
if (s_player_whistle < 0) then {
            s_player_whistle = player addaction[("<t color=""#F7D708"">" + ("whistle") +"</t>"),"custom\whistle.sqf"];
        };
    } else {
        player removeAction s_player_whistle;
        s_player_whistle = -1;
    };

 

Share this post


Link to post
Share on other sites
1 minute ago, oldmatechoc said:

would this work? most people would already have DZE_SafeZonePosArray in their init.sqf

if (!DZE_SafeZonePosArray && (_countplayers > 1)) then {

yup in this moment i was adding it in the whistle.sqf.. my bad

Share this post


Link to post
Share on other sites

ok,,, this can dsnt work cuz in this moment i have two childs saying "juan juan pi pi" and they sing songs of pikachu ¬¬ so its hard use the brain.

whistle.sqf

Spoiler
private ["_countplayers","_safezones","_safezonesRad","_inSafezone","_player","_sounddist"];
_safezones = [[6325,7807,0],[4063,11664,0],[11447,11364,0],[1606,7803,0],[12944,12766,0],[4361.4937,2259.9526,0], [12060,12640,0]];	
_safezonesRad = 150;
_inSafezone = false;
_player = player;
_countplayers = count (player nearEntities ["CAManBase", 10]);

if (_player distance _x < _safezonesRad) then {
_inSafezone = true;
};
} forEach _safezones;


if (_inSafezone) then {
        player removeAction s_player_whistle;
        s_player_whistle = -1;
    }else{
_sounddist = 20;
_nul = [objNull, player, rSAY, "whistle", _sounddist] call RE;
player removeAction s_player_whistle;
s_player_whistle = -1
[_player,10,true,(getPosATL _player)] spawn player_alertZombies;		
};

***note: maybe its better use while {_insafezone} do {

or more clean as @oldmatechoc said.. in fn_selfactions.sqf

private ["_countplayers"];
//_countplayers = count nearestObjects [player, ["CAManBase"], 10];
_countplayers = count (player nearEntities ["CAManBase", 10]);
if (!DZE_SafeZonePosArray && (_countplayers > 1)) then {
if (s_player_whistle < 0) then {
            s_player_whistle = player addaction[("<t color=""#F7D708"">" + ("whistle") +"</t>"),"custom\whistle.sqf"];
        };
    } else {
        player removeAction s_player_whistle;
        s_player_whistle = -1;
    };

 

Share this post


Link to post
Share on other sites

@Hooty

Quote

Now if we could be able to tie up a player with the new item rope and whistle for zombies to come feast  that would be epic.

this is a being to start to test

tu1.sqf (mpmissions\your instance\tieup\)

Spoiler
private["_hasitem","_body"];
_body =    _this select 3;
_hasitem = "equip_rope" in magazines player;

 
if (!_hasitem) exitWith {
        systemChat("needs a rope");
    };
 

 
    if (_hasitem) then {
        dayz_tieup = [_body,3.5];
        publicVariable "dayz_tieup";
        player playActionNow "PutDown";
        sleep 1;
    };
 

 

tu2.sqf (mpmissions\your instance\tieup\)

Spoiler
private["_body","_positionp","_stick"];
_body = _this select 0;

 
diag_log("tie up attempt on:" + str(_body) + " and I am: " + str(player) );
 
if (_body == player) then {
    diag_log("tied up!");
	_positionp = [player] call FNC_GetPos;
	_stick = createVehicle ["FlagCarrierINS",_positionp, [], 0, "CAN_COLLIDE"];
    [player] attachTo [_stick, [0, 2, 0]];
    cutText ["You've been tied up! This is not good!", "PLAIN DOWN"];
	[player,10,true,(getPosATL player)] spawn player_alertZombies
	sleep 10;
	detach [player];
deleteVehicle _stick;
}; 

 

in a custom selfactions.sqf

place

//tie up

 
    if (_isMan and _isAlive and !_isZombie) then {
        if (s_player_tu < 0) then {
            s_player_tu = player addAction [("<t color=""#FF9800"">" + ("Tie Up!") + "</t>"), "tieup\tu1.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_tu;
        s_player_tu = -1;
    };

below of

Spoiler
	if (dayz_tameDogs) then {
		//Dog
		_hasRawMeat = {_x in Dayz_meatraw} count _magazinesPlayer > 0;
		if (_isDog && {_hasRawMeat} && {_isAlive} && {_ownerID == "0"} && {player getVariable ["dogID",0] == 0}) then {
			if (s_player_tamedog < 0) then {
				s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\dog\tame_dog.sqf", _cursorTarget, 1, false, true];
			};
		} else {
			player removeAction s_player_tamedog;
			s_player_tamedog = -1;
		};
		if (_isDog && {_ownerID == _id} && {_isAlive}) then {
			if (s_player_feeddog < 0 && _hasRawMeat) then {
				s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true];
			};
			if (s_player_waterdog < 0 && _hasbottleitem) then {
				s_player_waterdog = player addAction [localize "str_actions_waterdog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,1], 0, false, true];
			};
			if (s_player_staydog < 0) then {
				if (_dogHandle getFSMVariable "_actionLieDown") then { _text = "str_actions_liedog"; } else { _text = "str_actions_sitdog"; };
				s_player_staydog = player addAction [localize _text,"\z\addons\dayz_code\actions\dog\stay.sqf", _dogHandle, 5, false, true];
			};
			if (s_player_trackdog < 0) then {
				s_player_trackdog = player addAction [localize "str_actions_trackdog","\z\addons\dayz_code\actions\dog\track.sqf", _dogHandle, 4, false, true];
			};
			if (s_player_barkdog < 0) then {
				s_player_barkdog = player addAction [localize "str_actions_barkdog","\z\addons\dayz_code\actions\dog\speak.sqf", _cursorTarget, 3, false, true];
			};
			if (s_player_warndog < 0) then {
				_warn = _dogHandle getFSMVariable "_watchDog";
				if (_warn) then { _text = localize "str_epoch_player_247"; _warn = false; } else { _text = localize "str_epoch_player_248"; _warn = true; };
				s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true];		
			};
			if (s_player_followdog < 0) then {
				s_player_followdog = player addAction [localize "str_actions_followdog","\z\addons\dayz_code\actions\dog\follow.sqf",[_dogHandle,true], 6, false, true];
			};
		} else {
			player removeAction s_player_feeddog;
			s_player_feeddog = -1;
			player removeAction s_player_waterdog;
			s_player_waterdog = -1;
			player removeAction s_player_staydog;
			s_player_staydog = -1;
			player removeAction s_player_trackdog;
			s_player_trackdog = -1;
			player removeAction s_player_barkdog;
			s_player_barkdog = -1;
			player removeAction s_player_warndog;
			s_player_warndog = -1;
			player removeAction s_player_followdog;
			s_player_followdog = -1;
		};
	};

 

now find:

} else {
	//Engineering

below add

player removeAction s_player_tu;
        s_player_tu = -1;

in compiles.sqf (custom)

Spoiler


find
//player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";


below add
player_tu =           compile preprocessFileLineNumbers "tieup\tu2.sqf";

 

in variables.sqf

Spoiler

find
canPickup = false;
above add

dayz_tieup = [];

in a custom publicEH.sqf

Spoiler

fnd
    "PVDZ_obj_Fire"                addPublicVariableEventHandler {(_this select 1) spawn BIS_Effects_Burn};
    below
"dayz_tieup"         addPublicVariableEventHandler {nul=(_this select 1) call player_tu};   

 

Share this post


Link to post
Share on other sites
14 minutes ago, WagnerMello said:

What does this script do?

just whistle another players,zeds, and Ai..,, and the last i posted is for try to attach a player with ropes and whistle for the zeds , to come to eat him.  but its not tested

Share this post


Link to post
Share on other sites

I believe the correct variable to use would be !isInTraderCity - DZE_SafeZonePosArray is an array of coordinates. To use that variable, you would need to check each players position in relation to the coords of each safe zone defined in it.

Share this post


Link to post
Share on other sites
17 hours ago, juandayz said:

Apenas apito outros jogadores, zeds, e Ai .. ,, eo último i postado é para tentar anexar um jogador com cordas e apito para os zeds, para vir para comê-lo. Mas não é testado

Cool puts a video later for me to see

Share this post


Link to post
Share on other sites
2 hours ago, SideShowFreak said:

if you can tie them up how do they get out?  i think i might still have the old investigation files if you need them to use/update. 

 

https://www.dropbox.com/sh/nh5dqlr2145d0ui/AAASCO994wweebY6kSvCdzcLa?dl=0

You could probably do something like a script that another player has to scroll on them to untie or just make them relog. If you wan't to make the script to untie, just set a variable on the player in the tie up script, and check for that variable on the target player in selfactions to show the option.

Share this post


Link to post
Share on other sites
1 hour ago, BigEgg said:

You could probably do something like a script that another player has to scroll on them to untie or just make them relog. If you wan't to make the script to untie, just set a variable on the player in the tie up script, and check for that variable on the target player in selfactions to show the option.

yup this is exactly that i think, like the old knock out system

Share this post


Link to post
Share on other sites
4 hours ago, SideShowFreak said:

if you can tie them up how do they get out?  i think i might still have the old investigation files if you need them to use/update. 

 

https://www.dropbox.com/sh/nh5dqlr2145d0ui/AAASCO994wweebY6kSvCdzcLa?dl=0

the get  out of tie up is automatically

 [player] attachTo [_stick, [0, 2, 0]];
    cutText ["You've been tied up! This is not good!", "PLAIN DOWN"];
	[player,10,true,(getPosATL player)] spawn player_alertZombies
	sleep 10;
	detach [player];
deleteVehicle _stick;

anyway all of this is just a suggestion... and really tnks you and all people who put an idea for made it.. will be awesome made a new post to try to made it all togheters

:smile:

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Bloodthirsty
      Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with

    • By juandayz
      I JUST LEAVE THIS ONE CUZ I KNOW YOU GUYS GONNA NEED IT..
       
      The very old safezone script by infistar... i was using it in 1.0.5.1  and made some changes to use in 1.6.
      Instructions:
          1. Copy paste the code of below into a file called 16_safezone.sqf - save the file.
          2. Paste this 16_safezone.sqf into mpmissioms\instance_11.chernarus\custom\
          3. Open your init.sqf
          4. At the very bottom of the file add this line:  [] execVM "custom\16_safezone.sqf";
          5. Save the init.sqf and restart your server.
          6-WARNING!!! if ure using some kind of mod that allow vehicles with GodMode out of safezones..  then you will need in 16_safezone.sqf change the path for veh_handleDam.sqf by the path that youre using your custom veh_handleDam.sqf
      this line:  fnc_veh_handleDam = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\veh_handleDam.sqf';
          16_safezone.sqf
       
      OPTIONAL:
      @BetterDeadThanZed here you got.
      REMOVE LOOT FROM TRADER CITIES AND PLOT POLES. (should removes zeds from trader places and poles too)
       
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...