Jump to content

49lone82

Member
  • Content Count

    21
  • Joined

  • Last visited

  • Medals

Posts posted by 49lone82


  1. Here is what my onKilled.sqf and onRespawn.sqf look like. what do I need to modify.

     

    onPlayerKilled.sqf

    _unit = _this select 0;
    [_unit, [_unit, "SavedInventory"]] call BIS_fnc_saveInventory;
    

    onPlayerRespawn.sqf

    _unit = _this select 0;
    [_unit, [_unit, "SavedInventory"]] call BIS_fnc_loadInventory;
    

    Untested...

     

    Here is what my onKilled.sqf and onRespawn.sqf look like. what do I need to modify.

     

    onKilled.sqf

    // ******************************************************************************************
    // * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
    // ******************************************************************************************
    //	@file Version: 1.0
    //	@file Name: onKilled.sqf
    //	@file Author: [404] Deadbeat, MercyfulFate, AgentRev
    //	@file Created: 20/11/2012 05:19
    
    _player = _this select 0;
    _presumedKiller = effectiveCommander (_this select 1);
    _killer = _player getVariable "FAR_killerPrimeSuspect";
    
    if (isNil "_killer") then { _killer = _player call FAR_findKiller };
    if (isNull _killer) then { _killer = _presumedKiller };
    if (_killer == _player) then { _killer = objNull };
    
    [_player, _killer, _presumedKiller] spawn
    {
    	if (isServer) then
    	{
    		_this call server_PlayerDied;
    	}
    	else
    	{
    		PlayerCDeath = _this;
    		publicVariableServer "PlayerCDeath";
    	};
    };
    
    if (_player == player) then
    {
    	closeDialog 2001; // Close Gunstore
    	closeDialog 2009; // Close Genstore
    	closeDialog 5285; // Close Vehstore
    	uiNamespace setVariable ["BIS_fnc_guiMessage_status", false]; // close message boxes
    
    	// Load scoreboard in render scope
    	["A3W_scoreboard", "onEachFrame",
    	{
    		call loadScoreboard;
    		["A3W_scoreboard", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
    	}] call BIS_fnc_addStackedEventHandler;
    
    	playerData_infoPairs = nil;
    	playerData_savePairs = nil;
    	//combatTimestamp = -1; // Reset abort timer
    };
    
    _player setVariable ["FAR_killerPrimeSuspect", nil];
    _player setVariable ["FAR_killerVehicle", nil];
    _player setVariable ["FAR_killerAmmo", nil];
    _player setVariable ["FAR_killerSuspects", nil];
    
    _player connectTerminalToUAV objNull; //disconnect
    _player spawn
    {
    	_player = _this;
    
    	_money = _player getVariable ["cmoney", 0];
    	_player setVariable ["cmoney", 0, true];
    
    	_items = [];
    	{
    		_id = _x select 0;
    		_qty = _x select 1;
    		_type = (_id call mf_inventory_get) select 4;
    
    		_items pushBack [_id, _qty, _type];
    		[_id, _qty] call mf_inventory_remove;
    	} forEach call mf_inventory_all;
    
    	// wait until corpse stops moving before dropping stuff
    	waitUntil {(getPos _player) select 2 < 1 && vectorMagnitude velocity _player < 1};
    
    	// Drop money
    	if (_money > 0) then
    	{
    		_m = createVehicle ["Land_Money_F", getPosATL _player, [], 0.5, "CAN_COLLIDE"];
    		_m setDir random 360;
    		_m setVariable ["cmoney", _money, true];
    		_m setVariable ["owner", "world", true];
    	};
    
    	// Drop items
    	_itemsDroppedOnDeath = [];
    
    	{
    		_id = _x select 0;
    		_qty = _x select 1;
    		_type = _x select 2;
    
    		for "_i" from 1 to _qty do
    		{
    			_obj = createVehicle [_type, getPosATL _player, [], 0.5, "CAN_COLLIDE"];
    			_obj setDir random 360;
    			_obj setVariable ["mf_item_id", _id, true];
    			_itemsDroppedOnDeath pushBack netId _obj;
    		};
    	} forEach _items;
    
    	itemsDroppedOnDeath = _itemsDroppedOnDeath;
    	publicVariableServer "itemsDroppedOnDeath";
    };
    
    _player spawn fn_removeAllManagedActions;
    removeAllActions _player;
    
    // Same-side kills
    if (_player == player && (playerSide == side group _killer) && (player != _killer) && (vehicle player != vehicle _killer)) then
    {
    	// Handle teamkills
    	if (playerSide in [BLUFOR,OPFOR]) then
    	{
    		if (_killer isKindOf "CAManBase") then
    		{
    			pvar_PlayerTeamKiller = _killer;
    		}
    		else
    		{
    			pvar_PlayerTeamKiller = objNull;
    		};
    	}
    	else // Compensate negative score for indie-indie kills
    	{
    		if (isPlayer _killer) then
    		{
    			pvar_removeNegativeScore = _killer;
    			publicVariableServer "pvar_removeNegativeScore";
    		};
    	};
    };
    
    

    onRespawn.sqf

    // ******************************************************************************************
    // * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
    // ******************************************************************************************
    //	@file Version: 1.0
    //	@file Name: onRespawn.sqf
    //	@file Author: [404] Deadbeat
    //	@file Created: 20/11/2012 05:19
    //	@file Args:
    
    private ["_player", "_corpse"];
    
    playerSetupComplete = false;
    
    9999 cutText ["", "BLACK", 0.01];
    9123 cutRsc ["RscEmpty", "PLAIN"];
    
    _player = _this select 0;
    _corpse = _this select 1;
    
    _corpse setVariable ["newRespawnedUnit", _player, true];
    _player setVariable ["playerSpawning", true, true];
    
    pvar_playerRespawn = _player;
    publicVariableServer "pvar_playerRespawn";
    
    _group = _player getVariable ["currentGroupRestore", grpNull];
    
    if (!isNull _group && {group _player != _group}) then
    {
    	[_player] join _group;
    
    	if (_player getVariable ["currentGroupIsLeader", false] && leader _group != _player) then
    	{
    		_group selectLeader _player;
    	};
    };
    
    _respawnMarker = switch (playerSide) do
    {
    	case BLUFOR:      { "respawn_west" };
    	case OPFOR:       { "respawn_east" };
    	case INDEPENDENT: { "respawn_guerrila" };
    	default           { "respawn_civilian" };
    };
    
    _respawnMarkers = [];
    {
    	if ([_respawnMarker, _x] call fn_startsWith) then
    	{
    		_respawnMarkers pushBack _x;
    	};
    } forEach allMapMarkers;
    
    _respawnPos = markerPos (_respawnMarkers call BIS_fnc_selectRandom);
    
    if !(_respawnPos isEqualTo [0,0,0]) then
    {
    	_player setPos _respawnPos;
    };
    
    _player call playerSetup;
    
    //[] execVM "client\clientEvents\onMouseWheel.sqf";
    
    call playerSpawn;
    
    if (isPlayer pvar_PlayerTeamKiller) then
    {
    	pDialogTeamkiller = pvar_PlayerTeamKiller;
    	pvar_PlayerTeamKiller = objNull;
    
    	[] execVM "client\functions\createTeamKillDialog.sqf";
    };
    
    

  2. Ð’Ñ‹ вообще за что такие деньги проÑите ? За пробаженную кривую игру ? Да вы поÑтавьте взвод Ñ 4-Ð¼Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð°Ð¼Ð¸ техники и пуÑÑ‚ÑŒ проедут 200 метров Ñ Ð¿Ð¾Ñадкой и выÑадкой, две машину не доедут, одна из них передавит вÑех бойцов, в итоге три вейпоинта они не пройдут. Ð Ñтационарные Ð¾Ñ€ÑƒÐ´Ð¸Ñ ? Техника их видит закиломметр, наверное пулемет на Ñтанке выдает работающий двигатель ? Или там иÑÐºÐ°Ð¶ÐµÐ½Ð¸Ñ Ð¼Ð°Ð³Ð½Ð¸Ñ‚Ð½Ð¾Ð³Ð¾ Ð¿Ð¾Ð»Ñ Ð·ÐµÐ¼Ð»Ð¸ ? ЗаÑунте в жопу Ñебе вертолеты, Ð·ÐµÐ²Ñ Ð¸ карты, Ñто гавно, вы не можете Ñделать игру а еÑли вÑе ваши забагованые фичи убрать, то ни оÑтанетÑÑ Ð¾Ñ‚ игры не фига очередной контр Ñтрайк. Уроды ÑовÑем там о европидараÑилиÑÑŒ

    :391::391::391::391:

×