Jump to content

Gr8

Member
  • Posts

    1269
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Gr8

  1. What is this related to:

    PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,_infected, dayz_playerName];

    publicVariableServer "PVDZE_plr_Died";

    Is this for death messages or is it calling a function to set alive to 0 in the database?

     

    That sets the db alive to 0

  2. Eh, I hate death character tables.

     

    anyways, This is what i got. and i feel like i am missing something

     

    private ["_display","_body","_playerID","_array","_source","_method","_canHitFree","_isBandit","_punishment","_humanityHit","_myKills","_humanity","_kills","_killsV","_myGroup"];
    disableUserInput true;
    disableSerialization;
    if (deathHandled) exitWith {};
    deathHandled = true;
    
    
    _body = player;
    _playerID = getPlayerUID player;
    _debug = getMarkerPos "respawn_west";
    
    
    if ((alive player) && {isNil {dayz_playerName}}) then {
    dayz_playerName = name player;
    };
    
    
    if (alive _body) then {
    _body setDamage 1;
    };
    
    
    //Prevent client freezes
    _display = findDisplay 49;
    if(!isNull _display) then {_display closeDisplay 0;};
    if (dialog) then {closeDialog 0;};
    if (visibleMap) then {openMap false;};
    
    
    _infected = 0;
    if (r_player_infected && DZE_PlayerZed) then {
    _infected = 1;
    };
    
    
    _body removeAllEventHandlers "FiredNear";
    _body removeAllEventHandlers "HandleDamage";
    _body removeAllEventHandlers "Killed";
    _body removeAllEventHandlers "Fired";
    _body removeAllEventHandlers "GetOut";
    _body removeAllEventHandlers "GetIn";
    _body removeAllEventHandlers "Local";
    clearVehicleInit _body;
    
    
    sleep 0.05;
    
    
    PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,_infected, dayz_playerName];
    publicVariableServer "PVDZE_plr_Died";
    
    
    _id = [player,100,true,getPosATL player] call player_alertZombies;
    
    
    sleep 0.5;
    
    
    dayz_originalPlayer removeAllEventHandlers "FiredNear";
    dayz_originalPlayer removeAllEventHandlers "HandleDamage";
    dayz_originalPlayer removeAllEventHandlers "Killed";
    dayz_originalPlayer removeAllEventHandlers "Fired";
    dayz_originalPlayer removeAllEventHandlers "GetOut";
    dayz_originalPlayer removeAllEventHandlers "GetIn";
    dayz_originalPlayer removeAllEventHandlers "Local";
    dayz_originalPlayer removeAllEventHandlers "Respawn";
    dayz_originalPlayer setDamage 0;
    dayz_originalPlayer allowDamage false;
    dayz_originalPlayer enableSimulation true;
    addSwitchableUnit dayz_originalPlayer;
    setPlayable dayz_originalPlayer;
    selectPlayer dayz_originalPlayer;
    dayz_originalPlayer setDamage 0;
    dayz_originalPlayer allowDamage false;
    dayz_originalPlayer setPos _debug;
    
    player setVariable ["NORRN_unconscious", false, true];
    player setVariable ["unconsciousTime", 0, true];
    player setVariable ["USEC_isCardiac",false,true];
    player setVariable ["medForceUpdate",true,true];
    player setVariable ["startcombattimer", 0];
    r_player_unconscious = false;
    r_player_cardiac = false;
    
    
    _array = _this;
    if (count _array > 0) then {
    _source = _array select 0;
    _method = _array select 1;
    if (!isNull _source) then {
    if (_source != player) then {
    // Killed
    ctc_HumanityChange = [_body,_source];
    publicVariableServer "ctc_HumanityChange"; //Send needed values to server.
    ctc_HumanityChange = []; //Clean up global variable.
    } else {
    // Suicide
    };
    };
    _body setVariable ["deathType",_method,true];
    };
    
    
    disableUserInput false;
    
    
    // Wait 10 Seconds
    for "_x" from 1 to 10 do {
    if (_x >= 2) then {cutText [format ["RE-SPAWNING in %1s", 11-_x], "PLAIN DOWN"];};
    uiSleep 1;
    };
    
    
    // Execute Spawn Script
    execVM "GG\spawn\start.sqf";
  3. Open your Compiles.sqf

     

    Search for :

    if (dayz_clientPreload && dayz_authed) exitWith { diag_log "PLOGIN: Login loop completed!"; };

    Replace with :

    if (dayz_clientPreload && dayz_authed) exitWith {
                    endLoadingScreen;
                    diag_log "PLOGIN: Login loop completed!";
    };
  4. I suppose really it's just a case of undefining variables, clearing event handlers etc... and re-running the player_monitor.fsm.

     

    I didn't think about that. 

     

    How does this look ?

    dayz_originalPlayer removeAllEventHandlers "FiredNear";
    dayz_originalPlayer removeAllEventHandlers "HandleDamage";
    dayz_originalPlayer removeAllEventHandlers "Killed";
    dayz_originalPlayer removeAllEventHandlers "Fired";
    dayz_originalPlayer removeAllEventHandlers "GetOut";
    dayz_originalPlayer removeAllEventHandlers "GetIn";
    dayz_originalPlayer removeAllEventHandlers "Local";
    dayz_originalPlayer removeAllEventHandlers "Respawn";

    or am i missing something?

     

    So running player moniter will just go through the loading screen and do the authentication process again?, why would that be necessary ?

    We can just TP the player to the debug and execute the Spawn selector. what would be a better way ?

  5. I get what you mean, but to remove gear, update blood etc, you will need the player to not be in debug zone, because it could happen, he spawns in and his legs are still broke because you healed him while he was in debug but the server did not recognize that. You understand my point? It don't mean any harm..

     

    Ya, I know, Syncing is not an issue, because once you will select a spawn, and go outside the debug, it should save your current state.

  6. Hello there,

     

    I am working on a little thing that will allow players to respawn after death without going back to the loading screen. Just like A3 Epoch.

     

    But i need your help.

     

    Steps :

     

    1. Death
    2. Black Out
    3. New Character TP to debug
    4. Count Down to Respawn
    5. Respawn or execute spawn selector

     

    Features :

    • No new character data field
    • Reset Life stats
    • Bring Blood back to 1200 after respawn
    • No respawn by logging back from the lobby

     

    That's all i can think of as of now. I am no coder. But I know what it should be a function that we need to code in player_death.sqf

    Shoot me ideas and i will test em. Should be pretty simple, might have to change some stuff in server compiles

×
×
  • Create New...