Jump to content

0verHeaT

Member
  • Posts

    101
  • Joined

  • Last visited

Posts posted by 0verHeaT

  1. Yea this just refers on how to get the action.

    You can try this out. This will let you access the garage if you are within your plot area and be the owner or friend of the plot.

    However, if there is not any plot pole in range, you will not get any option. 

     

    private ["_nearestPoles","_pole","_garagefriends","_garageallowed","_friends"];
    _nearestPoles = nearestObjects [(vehicle player),["Plastic_Pole_EP1_DZ"],(DZE_PlotPole select 0)];
    if (count _nearestPoles > 0) then
    {
    	_pole = _nearestPoles select 0;
    	_friends = _pole getVariable ["plotfriends",[]];
    	_owner = _pole getVariable ["ownerPUID","0"];
    	_garagefriends = [];
    	{
    		_garagefriends set [_forEachIndex,(_x select 0)];
    	} forEach _friends;
    	_garageallowed = _garagefriends + [_owner];
    	
    	if ((_typeOfCursorTarget in DZE_Garage) && (speed player <= 1) && _canDo) then 
    	{
    		if (s_player_garage < 0) then 
    		{
    			if ((getPlayerUID player) in _garageallowed) then 
    			{
    				s_player_garage =  player addAction ["<t color='#FFAA00'>Garage Menu</t>","Garage\player_virtualgarage.sqf",_cursorTarget,2,false];
    			} 
    			else 
    			{
    				s_player_garage = player addAction ["<t color='#FF0000'>Garage Locked</t>","",_cursorTarget,2,true,true,"",""];    
    			};
    		};
    	} 
    	else 
    	{
    		player removeAction s_player_garage;
    		s_player_garage = -1;        
    	};
    }
    else
    {
    	player removeAction s_player_garage;
    	s_player_garage = -1;   
    }; 

  2. JIP clients will need a few seconds until they receive the publicVariables.

    I recommend to set a 'waitUntil' timer to check whether the variable is already defined or not.

    while {true} do {
    	waitUntil {(!isNil "my_var1") && (!isNil "my_var2") && (!isNil "my_var3")};
            systemChat format["%1 || %2 || %3", my_var1, my_var3, my_var3];
    	uiSleep 10;
    };
    
  3.  

    just for you know 0verHeaT your player_murderMenu.sqf in https://github.com/0verHeaT/CustomKillMsg/tree/master/mission

     

    is giving this error >>

     

    Error in expression <>With a %1<br/>,_name];
    if (_image != "nil") then {
    _record_stxt = _record_s>
      Error position: <nil") then {
    _record_stxt = _record_s>
      Error Missing ]
    File mpmissions\__CUR_MP.Chernarus\custom\player_murderMenu.sqf, line 50
    

    ---------

     

    i'm using DangerRuss files now.

     

     

    I noticed a small syntax error. Has been updated.

  4. someone know what is going on there?

    21:15:07 "PKILL: Andrey killed himself"
    21:15:07 Error in expression < = [
    _victimName,
    _killerName,
    _weapon,
    _pic,
    _distance,
    ServerCurrentTime
    ];
    Pl>
    21:15:07   Error position: <_pic,
    _distance,
    ServerCurrentTime
    ];
    Pl>
    21:15:07   Error Undefined variable in expression: _pic
    21:15:07 File z\addons\dayz_server\compile\server_playerDied.sqf, line 77
    

    Server_playerdied.sqf

    http://pastebin.com/wynvHmK9

     

    fnc_plyrHit.sqf

    http://pastebin.com/Af7krzh6

     

    kill_msg.sqf

    http://pastebin.com/1QiN0ti5

     

    and a question, i did killboard fix, and you said we can see this in trader city??

    where in trader city, i have never saw this.

     

    This apears (in your case) if someone killed himself.

    You could move this line in your server_playerDied.sqf

    _pic = _victim getVariable["AttackedByWeaponImg", "nil"];
    

    right under 

    _distance = _victim getVariable["AttackedFromDistance", "nil"];
    

    to fix this.

     

    Alternatively, you can use the updated version on my github.

    The fix is already included there.

  5. someone can give me a hand, i have done all right too no rpt errors, and is not working for me (waiting forever for updating texture and never does.)

     

     2:11:11 "VEHICLE PAINT: Player Herculys (11111111111111111) has painted a SUV Blue!"

     

    i tried to pain a blue suv with green and red colours, and nothing happens.

     

    Im not sure if it is possible to retexture a SUV Blue.

    Try to test it with a 'Mi17_Civilian_DZ'!

  6. Hey man these didnt work for me. Did I miss something?

    server_playerDied.sqf

    private ["_characterID","_minutes","_newObject","_playerID","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_death_record"];
    //[unit, weapon, muzzle, mode, ammo, magazine, projectile]
    _characterID = 	_this select 0;
    _minutes =		_this select 1;
    _newObject = 	_this select 2;
    _playerID = 	_this select 3;
    _infected =		_this select 4;
    if (((count _this) >= 6) && {(typeName (_this select 5)) == "STRING"} && {(_this select 5) != ""}) then {
    	_victimName =	_this select 5;
    } else {
    	_victimName =  if (alive _newObject) then {name _newObject;} else {"";};
    };
    _victim = _newObject;
    _newObject setVariable ["bodyName", _victimName, true];
    
    sleep 3;
    
    _killer = _victim getVariable["AttackedBy", "nil"];
    _killerName = _victim getVariable["AttackedByName", "nil"];
    
    // when a zombie kills a player _killer, _killerName && _weapon will be "nil"
    // we can use this to determine a zombie kill && send a customized message for that. right now no killmsg means it was a zombie.
    if ((typeName _killer) != "STRING") then
    {
    	_weapon = _victim getVariable["AttackedByWeapon", "nil"];
    	_distance = _victim getVariable["AttackedFromDistance", "nil"];
    
    	if ((owner _victim) == (owner _killer)) then 
    	{
    		_message = format["%1 killed himself",_victimName];
    		_loc_message = format["PKILL: %1 killed himself", _victimName];
    	}
    	else
    	{
    		_message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
    		_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
    	
    	
    		_pic = _victim getVariable["AttackedByWeaponImg", "nil"];
    		
                    if ((gettext (configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'displayName')) != "Throw") then {
    			if (!isNil "_pic") then {
    				_kill_txt = format ["<t align='left' size='0.7'>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
    				_kill_txt = _kill_txt + format ["<img size='0.9' align='left' image='%2'/>",_killerName,_pic,_victimName,(ceil _distance)];
    				_kill_txt = _kill_txt + format ["<t align='left' size='0.7'> %3 </t>",_killerName,_pic,_victimName,(ceil _distance)];
    				_kill_txt = _kill_txt + format ["<t align='left' size='0.7'>[%4m]</t>",_killerName,_pic,_victimName,(ceil _distance)];
    
    				_msg = format ["<Playerkill>: %1 was killed by %2 with a %3 from %4 meters",_victimName,_killerName,_weapon,(ceil distance)]; // <--- Edit HERE Your MSG
    				customkillMessage = [_kill_txt];
    				publicVariable "customkillMessage";
    			};
    		}; 
    	
    	
    	};
    
    	diag_log _loc_message;
    
    	if(DZE_DeathMsgGlobal) then {
    		[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
    	};
    	/* needs customRemoteMessage
    	if(DZE_DeathMsgGlobal) then {
    		customRemoteMessage = ['globalChat', _message, _killer];
    		publicVariable "customRemoteMessage";
    	};
    	*/
    	if(DZE_DeathMsgSide) then {
    		[nil, nil, rspawn, [_killer, _message], { (_this select 0) sideChat (_this select 1) }] call RE;
    	};
    	if(DZE_DeathMsgTitleText) then {
    		[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
    	};
    
    	// build array to store death messages to allow viewing at message board in trader citys.
    	_death_record = [
    	_victimName,
    	_killerName,
    	_weapon,
    	_pic,
    	_distance,
    	ServerCurrentTime
    ];
    PlayerDeaths set [count PlayerDeaths,_death_record];
    PV_DeathBoard = PlayerDeaths;
    publicVariable "PV_DeathBoard"; 
    
    	// Cleanup
    	_victim setVariable["AttackedBy", "nil", true];
    	_victim setVariable["AttackedByName", "nil", true];
    	_victim setVariable["AttackedByWeapon", "nil", true];
    	_victim setVariable["AttackedFromDistance", "nil", true];
    };
    
    // Might not be the best way...
    /*
    if (isnil "dayz_disco") then {
    	dayz_disco = [];
    };
    */
    
    // dayz_disco = dayz_disco - [_playerID];
    _newObject setVariable["processedDeath",diag_tickTime];
    
    if (typeName _minutes == "STRING") then
    {
    	_minutes = parseNumber _minutes;
    };
    
    diag_log ("PDEATH: Player Died " + _playerID);
    
    if (_characterID != "0") then
    {
    	_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
    	#ifdef DZE_SERVER_DEBUG_HIVE
    	diag_log ("HIVE: WRITE: "+ str(_key));
    	#endif
    	_key call server_hiveWrite;
    }
    else
    {
    	deleteVehicle _newObject;
    };
    

     

    kill_msg.sqf

    /*** Written by 0verHeaT ***/
    fnc_kill_message = {
    	private ["_finaltxt","_systemmsg"];
    	_finaltxt = _this select 0;
    	_systemmsg = _this select 1;
    	systemChat _systemmsg;
    	[_finaltxt,[safezoneX + 0.01 * safezoneW,2.0],[safezoneY + 0.01 * safezoneH,0.3],30,0.5] spawn BIS_fnc_dynamicText;
    };
    "customkillMessage" addPublicVariableEventHandler {(_this select 1) call fnc_kill_message;}; 
    
    

    customkillMessage = [_kill_txt,_msg];
    
  7.  

    @overheat, using the updated killboard on your github gives me this error in the client rpt

    Error in expression <DZE_plr_DeathBResult) > 0) then {
    
    call EpochDeathBoardLoad;
    } else {
    cutText [(>
      Error position: <EpochDeathBoardLoad;
    } else {
    cutText [(>
      Error Undefined variable in expression: epochdeathboardload
    File z\addons\dayz_code\actions\list_playerDeaths.sqf, line 10
    Error in expression <DZE_plr_DeathBResult) > 0) then {
    
    call EpochDeathBoardLoad;
    } else {
    cutText [(>
      Error position: <EpochDeathBoardLoad;
    } else {
    cutText [(>
      Error Undefined variable in expression: epochdeathboardload
    

     

    Did you added this line to your custom compiles?

    call compile preprocessFileLineNumbers ""+YOURPATH+"\player_murderMenu.sqf";
    

    Because it says that 'EpochDeathBoardLoad' is not defined.

  8.  

    Anyone ever find a fix for that nil weapon issue? I read through the entire thread and didn't really see anything about a working fix...

     

    I just kinda made my own fix for weapons... but was seeing if there was a better way to do it...

    _message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
    _loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
    //_pic = _victim getVariable["AttackedByWeaponImg", "nil"];
    _picture = getText (configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture'); // get weapon picture of killer
    // not tested from here...
    if (vehicle _killer != _killer) then {
    _picture = getText (configFile >> 'cfgVehicles' >> (vehicle _killer) >> 'picture');
    };
    //.... to here
            if ((gettext (configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'displayName')) != "Throw") then {
    if (!isNil "_picture") then {
    _kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_picture,_victimName,(ceil _distance)];
    _kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_picture,_victimName,(ceil _distance)];
    _kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_picture,_victimName,(ceil _distance)];
    _kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_picture,_victimName,(ceil _distance)];
     
    customkillMessage = [_kill_txt];
    publicVariable "customkillMessage";
    };
    };

     

    Make sure to use the updated version on my Github!

  9. If you want a systemChat message additionally

    server_playerDied.sqf

    _pic = _victim getVariable["AttackedByWeaponImg", "nil"];
    		
    if ((gettext (configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'displayName')) != "Throw") then {
    	if (_pic != "nil") then {
    		_kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
    		_kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName,(ceil _distance)];
    		_kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_pic,_victimName,(ceil _distance)];
    		_kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_pic,_victimName,(ceil _distance)];
    
    		_msg = format ["<Playerkill>: %1 was killed by %2 with a %3 from %4 meters",_victimName,_killerName,_weapon,(ceil distance)]; // <--- Edit HERE Your MSG
    		customkillMessage = [_kill_txt,_msg];
    		publicVariable "customkillMessage";
    	};
    }; 

    kill_msg.sqf

    fnc_kill_message = {
    	private ["_finaltxt","_systemmsg"];
    	_finaltxt = _this select 0;
    	_systemmsg = _this select 1;
    	systemChat _systemmsg;
    	[_finaltxt,[safezoneX + 0.01 * safezoneW,2.0],[safezoneY + 0.01 * safezoneH,0.3],30,0.5] spawn BIS_fnc_dynamicText;
    };
    "customkillMessage" addPublicVariableEventHandler {(_this select 1) call fnc_kill_message;}; 

  10. If the message does not show up, I would rather consider the fnc_plyrhit.sqf.

    This is actually the reason why some kills are not displayed/logged because the player hit isn't detected right.

    I don't know yet if this missing hit detection is caused by the EventHandler itself or if it's just lagg.

    I already tried to use the EventHandler 'MPKilled', but this did not lead to a practical result either..

    (cf. https://community.bistudio.com/wiki/ArmA_2:_Event_Handlers)

  11. Yes, replace your whole player_murdermenu.sqf with the code I posted under 'player_murdermenu.sqf'.

     

    Remember to add/replace this to your server_playerDied.sqf

    _death_record = [
    	_victimName,
    	_killerName,
    	_weapon,
    	_pic,
    	_distance,
    	ServerCurrentTime
    ];
    PlayerDeaths set [count PlayerDeaths,_death_record];
    PV_DeathBoard = PlayerDeaths;
    publicVariable "PV_DeathBoard"; 
    
  12. How i said, it seems like he get the variable but also do not get the variable, if i make it like you said it also wont work. (added a diag_log line inside the condition)

    What exacly does not work, your diag_log line or do you get an .rpt error?

    Cause there is definitly nothing wrong with this

    _safes = nearestObjects [player,["VaultStorageLocked"],12000];
    _safearray = [];
    {
    	if ((_x getVariable ["CharacterID","0"]) == "0") then {
    		diag_log str(_x); // Dont know what you want to log..
    		_safearray set [count _safearray,_x];
    	};
    } forEach _safes; 

  13. Yeah but its a bit overkill, a easy and much less network taffic usage would be to just detect if the red chains gets shown, but nobody can tell which display it used ..... even not in the Bi forums ->> http://forums.bistudio.com/showthread.php?187729-Show-active-displays-(looking-for-red-chain-idd)&p=2859804#post2859804

     

    That true, we have more network traffic due to the PVs, but if you compare it to infistar its nothing ;)

     

    Your is also interesting, to disconnect the player when the red chain is occuring.

    But sometimes you get these chains whithout losing connection on a server.

    Wouldn't that be a problem?

×
×
  • Create New...