Sign in to follow this  
InsertCoins

penalty for suiciding

5 posts in this topic

Hi,

Not sure if this is the right place for this, if not please move it to the right place @mods xoxoxox

For our server we are looking to implement a respect penalty on suicide, to keep people from suiciding for a better spawnpoint over and over.

How would we go about implementing this? I'd like to do it myself to learn so any input is more than welcome :)

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

You can make whatever you want with customcode, you need to overwrite ExileClient_gui_escape_suicide.sqf

Spoiler

private["_result","_display"];
disableSerialization;
_result = ["Do you really want to end your life?", "Confirm", "Yes", "Nah"] call BIS_fnc_guiMessage;
waitUntil { !isNil "_result" };
if (_result) then
{
    _display = findDisplay 49;
    if !(isNull _display) then
    {
        _display closeDisplay 2; 
    };
    player allowDamage true;
    player setDamage 1;
};
true

There you can add your penalty stuff for suiciding B|

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.