DIsable disconnected players dead bodies looting

  1. 7 years ago

    Hi

    I want to know if it possible to disable looting corpse of players that disconnected so other players dont end with their gear

  2. Edited 7 years ago by flibble666

    he found this on BI forums reported as working by muitlpe sources untedted by my self just copy pasted hope it works.

    example:

        //initServer.sqf
        addMissionEventHandler ['HandleDisconnect',{deleteVehicle (_this select 0);}];

    If you want a delayed delete, something like this will work:

        //initServer.sqf
        addMissionEventHandler ['HandleDisconnect',{
        [(_this select 0)] spawn {
    	sleep 10;
    	deleteVehicle (_this select 0);
        };
        }];

    * Run on server only as per linked instructions
    Further reading for those interested:
    http://feedback.arma3.com/view.php?id=17532

    *source fn_Quiksilver @ BI forums https://goo.gl/HMNxiK

  3. If players use Player Exit then the bodies will be deleted.

  4. Edited 7 years ago by James Higs

    @SpyderBlack723 If players use Player Exit then the bodies will be deleted.

    Yes i know that the bodies disapear but only after sometime, what i want is immediate removal so nobody can loot it, not even the player that disconnected itself so he cannot overloot himself with is own body.

    @flibble666 he found this on BI forums reported as working by muitlpe sources untedted by my self just copy pasted hope it works.

    example:
    //initServer.sqf addMissionEventHandler ['HandleDisconnect',{deleteVehicle (_this select 0);}];

    The line ''//initServer.sqf
    addMissionEventHandler ['HandleDisconnect',{deleteVehicle (_this select 0);}];'' does work to delete instantly the bodies but i lose all my gear when i reconnect.

    Im not much of a coder so dont know what to do, did search here and there but to no aval

  5. Edited 7 years ago by flibble666

    @James Higs find the mission folder this is normaly in documents/arma3/mpmissions or documents/arma3 other profiles/your arma 3 username/mpmissions then right click >new>text document and place one of the two codes below in the txt file save it then rename the New Text Document.txt to initServer.sqf make user you remove/rename the .txt to .sqf not .sqf.txt

        //initServer.sqf
        addMissionEventHandler ['HandleDisconnect',{deleteVehicle (_this select 0);}];

    If you want a delayed delete, use this code below

        //initServer.sqf
        addMissionEventHandler ['HandleDisconnect',{
        [(_this select 0)] spawn {
    	sleep 10;
    	deleteVehicle (_this select 0);
        };
        }];

    *as stated above this has not been tested by myself but has by users on orignal thread linked in other comment.

 

or Sign Up to reply!