kuplion 1785 Report post Posted February 20, 2016 We have quite a bad issue of players farming spawn vehicles on our server, finding a car, driving it to Terminal to sell it, then just commit suicide back to a Spawn Zone to collect another vehicle to go and sell. I don't want to adjust the vehicle spawns as our legitimate players appreciate them, but we're struggling to find a solution outside of a cooldown timer on suicides or the removal of the option entirely. Would anyone be able to help with implementing either a cooldown or the removal of the suicide option? Share this post Link to post Share on other sites
InsertCoins 333 Report post Posted April 18, 2016 any outcome on this Kup? Share this post Link to post Share on other sites
kuplion 1785 Report post Posted April 18, 2016 @oSoDirty helped me with this and it seems to work well. And here are the working code snippets: ExileClient_gui_escape_suicide.sqf /** * ExileClient_gui_escape_suicide * * Exile Mod * exile.majormittens.co.uk * © 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/. */ _canSuicide = missionNamespace getVariable "suicideCountDown"; _difference = _canSuicide - time; if (time < _canSuicide) exitWith { _display = findDisplay 49; _display closeDisplay 2; _nahBruh = format ["Sorry %1, you must wait at least %2 seconds before you can commit suicide!", name player, floor _difference]; ["whoops", [_nahBruh]] call ExileClient_gui_notification_event_addNotification; }; 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 ExileClient_object_player_event_onKilled.sqf /** * ExileClient_object_player_event_onKilled * * Exile Mod * exile.majormittens.co.uk * © 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/. */ closeDialog 0; ExileClientLastDiedPlayerObject = player; ExileClientIsAutoRunning = false; if !((vehicle player) isEqualTo player) then { unassignVehicle player; player action ["GetOut", vehicle player]; player action ["Eject", vehicle player]; }; setGroupIconsVisible [false, false]; false call ExileClient_gui_hud_toggle; [] call ExileClient_object_player_event_unhook; if !(ExileClientLastDeathMarker isEqualTo "") then { deleteMarkerLocal ExileClientLastDeathMarker; }; ExileClientLastDeathMarker = createMarkerLocal [format ["Death%1", time], getPos player]; ExileClientLastDeathMarker setMarkerShapeLocal "ICON"; ExileClientLastDeathMarker setMarkerTypeLocal "KIA"; ExileClientLastDeathMarker setMarkerColorLocal "ColorRed"; ExileClientLastDeathMarker setMarkerAlphaLocal 0.5; if (ExileClientIsInBush) then { call ExileClient_object_bush_detach; }; if !(ExileClientBreakFreeActionHandle isEqualTo -1) then { player removeAction ExileClientBreakFreeActionHandle; ExileClientBreakFreeActionHandle = -1; }; ExileClientIsHandcuffed = false; ExileClientHostageTaker = objNull; _hold = 300; // Time in seconds for player to wait. Default 300 (5min) canSuicide = time + _hold; missionNamespace setVariable ["suicideCountDown", canSuicide]; [] call ExileClient_system_breathing_event_onPlayerDied; [] call ExileClient_system_snow_event_onPlayerDied; [] call ExileClient_system_radiation_event_onPlayerDied; 1 Share this post Link to post Share on other sites
Spackler 33 Report post Posted August 8, 2016 Does anyone have this working in 1.0? Share this post Link to post Share on other sites
kuplion 1785 Report post Posted August 8, 2016 3 hours ago, Spackler said: Does anyone have this working in 1.0? Considered using this instead? Share this post Link to post Share on other sites
sjJACKit 1 Report post Posted February 28, 2017 cannot see the alternative code that you suggested Share this post Link to post Share on other sites
Jerrico 6 Report post Posted August 4, 2018 (edited) On 2/28/2017 at 0:16 PM, sjJACKit said: cannot see the alternative code that you suggested Heya, modify ExileClient_gui_escape_suicide.sqf and replace this line: ["whoops", [_nahBruh]] call ExileClient_gui_notification_event_addNotification; with this line: ["InfoTitleAndText",_nahBruh]] call ExileClient_gui_toaster_addTemplateToast; This uses the toast notifications that were brought in a while back Cheers Edited August 4, 2018 by Jerrico Share this post Link to post Share on other sites
Slider 21 Report post Posted October 3, 2018 (edited) Does this still work? Edit.. I think I found why it wasn't working.. the bottom part of the text is missing a [ Should be ["InfoTitleAndText",[_nahBruh]] call ExileClient_gui_toaster_addTemplateToast; Edited October 3, 2018 by Slider Share this post Link to post Share on other sites