Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * ExileClient_gui_escape_suicide
- *
- * Exile Mod
- * www.exilemod.com
- * © 2015 Exile Mod Team
- *
- * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
- * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
- */
- private["_maxSuicides","_suicideDelay","_currentSuicide","_product","_result","_display"];
- _maxSuicides=getNumber(missionConfigFile >> "CfgDonkeyPunchCustoms" >> "MaxSuicides");
- _suicideDelay=getNumber(missionConfigFile >> "CfgDonkeyPunchCustoms" >> "SuicideDelay");
- _currentSuicide=missionNameSpace getVariable[format["ExileClientSuicided%1",getplayerUID player],0];
- _amountSuicides=missionNameSpace getVariable[format["ExileClientMaxSuicides%1",getplayerUID player],0];
- if(_amountSuicides < _maxSuicides)then
- {
- if ((diag_tickTime - _currentSuicide) > _suicideDelay)then
- {
- 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;
- };
- missionNameSpace setVariable[format["ExileClientSuicided%1",getplayerUID player],diag_tickTime];
- _product = _amountSuicides + 1;
- missionNameSpace setVariable[format["ExileClientMaxSuicides%1",getplayerUID player],_product];
- player allowDamage true;
- player setDamage 1;
- };
- }
- else
- {
- disableSerialization;
- //_result = ["Why do you want to SUICIDE so quickly?", "Confirm", "I'm A Douche", "JusCuz"] call BIS_fnc_guiMessage;
- _display = findDisplay 49;
- _display closeDisplay 2;
- hint "DonkeyPunch Suicide Delay Enabled :P";
- ["Whoops",["DonkeyPuncheD Suicide Delay"]] call ExileClient_gui_notification_event_addNotification;
- };
- }
- else
- {
- disableSerialization;
- //_result = ["Do you honestly think you have another suicide left?", "Confirm", "I DO, I DO", "Nah"] call BIS_fnc_guiMessage;
- _display = findDisplay 49;
- _display closeDisplay 2;
- hint "DonkeyPunch Suicide Maximum Reached :P";
- ["Whoops",["Suicide Max Reached DonkeyPuncheD"]] call ExileClient_gui_notification_event_addNotification;
- };
- true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement