Jump to content

RebornTemper

Members
  • Content Count

    3
  • Joined

  • Last visited

  • Days Won

    1

RebornTemper last won the day on November 16 2018

RebornTemper had the most liked content!

Community Reputation

3 Neutral

About RebornTemper

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, This is a script so cops can’t restrain someone while in front of them, they have to be behind them and a notification system. -------------------------------------------------------- Restrain System 1. Go to file fn_restrainAction.sqf and inside ------------------------------------------------------------------------------------- add this _degrees = getDir player; _degreesu = getDir _unit; _totald = _degrees - _degreesu; if(_totald >= -90 && _totald < 1 || _totald <= 90 && _totald > -1 || _totald >= 270 || _totald <= -270) then { Above this _unit setVariable ["playerSurrender",false,true]; ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2. Add this } else { ["You must be behind your target to restrain them.",false,"slow"] call life_fnc_notificationSystem; }; Below this [0,"STR_NOTF_Restrained",true,[_unit getVariable ["realname", name _unit], profileName]] ------------------------------------------------------------------------------------------------------------------------------------------------------- Notification System 1. go to core\functions and make a file called fn_notificationSystem.sqf and inside add this params[ "_text", ["_error",false,[false]], ["_speed","",[""]] ]; if (!hasInterface) exitWith {}; disableSerialization; _display = finddisplay 46; playSound "HintExpand"; private _headerColor = if (_error) then { [0.75,0,0,1]; } else { [0,0.5,0.82,1]; }; if (_text isEqualType "") then { _text = parseText _text; }; private _Header = _display ctrlCreate ["RscText", -1]; _Header ctrlSetPosition [0.795 * safezoneW + safezoneX, 0.164 * safezoneH + safezoneY, 0.2 * safezoneW, 0.007 * safezoneH]; _Header ctrlSetBackgroundColor _headerColor; _Header ctrlSetFade 1; _Header ctrlCommit 0; _Header ctrlSetFade 0; _Header ctrlCommit 0.4; private _TextField = _display ctrlCreate ["RscStructuredText", -1]; _TextField ctrlSetStructuredText _text; _TextField ctrlSetPosition [0.795 * safezoneW + safezoneX, 0.171 * safezoneH + safezoneY,0.2 * safezoneW, 0.5]; _TextField ctrlCommit 0; _TextField ctrlSetPosition [0.795 * safezoneW + safezoneX, 0.171 * safezoneH + safezoneY,0.2 * safezoneW, ((ctrlTextHeight _TextField)+ (0.005 * safezoneH))]; _TextField ctrlSetBackgroundColor [0,0,0,0.75]; _TextField ctrlSetFade 1; _TextField ctrlCommit 0; _TextField ctrlSetFade 0; _TextField ctrlCommit 0.4; [_TextField,_Header,_speed] spawn { disableSerialization; if (_this select 2 isEqualTo "fast") then { uiSleep 8; } else { uiSleep 15; }; private _TextField = _this select 0; private _Header = _this select 1; _TextField ctrlSetFade 1; _TextField ctrlCommit 0.3; _Header ctrlSetFade 1; _Header ctrlCommit 0.3; uiSleep 0.3; ctrlDelete _Header; ctrlDelete _TextField; }; private _posText = (ctrlPosition (_TextField)) select 1; private _posHeader = (ctrlPosition (_Header)) select 1; private _textHigh = (ctrlPosition (_TextField)) select 3; if(isNil{life_open_notifications}) then {life_open_notifications = [];}; if (count life_open_notifications > 0) then { private _activeNotifications = 0; { private _ctrlHeader = _x select 0; private _ctrlText = _x select 1; if (!isNull _ctrlHeader && !isNull _ctrlText) then { _ctrlHeader ctrlSetPosition [0.795 * safezoneW + safezoneX, (_posHeader + _textHigh + 1.5*(0.011 * safezoneH))]; _ctrlText ctrlSetPosition [0.795 * safezoneW + safezoneX, (_posText + _textHigh + 1.5*(0.011 * safezoneH))]; _ctrlHeader ctrlCommit 0.25; _ctrlText ctrlCommit 0.25; _posText = (_posText + _textHigh + 1.5*(0.011 * safezoneH)); _posHeader = (_posHeader + _textHigh + 1.5*(0.011 * safezoneH)); _textHigh = (ctrlPosition (_ctrlText)) select 3; if (_activeNotifications > 3) then { _ctrlText ctrlSetFade 1; _ctrlHeader ctrlSetFade 1; _ctrlText ctrlCommit 0.2; _ctrlHeader ctrlCommit 0.2; }; _activeNotifications = _activeNotifications + 1; }; } forEach life_open_notifications; }; life_open_notifications = ([[_Header,_TextField]] + life_open_notifications) select {!isNull (_x select 0) && !isNull (_x select 1)}; ----------------------------------------------------------------------------------------------------------------------------------------------------- 2. go to Functions.hpp and add this below file="core\functions"; class notificationSystem {}; ----------------------------------------------------------------------- 3. go to configuration.sqf and below Backend Variables add life_open_notifications = []; -------------------------------------------------------------------------------------------------- 4. Go to description.ext add this below class CfgSounds class HintExpand { name = "HintExpand"; sound[] = {"\sounds\notification.ogg", 1, 1}; titles[] = {}; } notification.ogg
  2. RebornTemper

    Advanced Handcuff's and key's

    FIX ----------------------------------------------------------------------- class handcuff { variable = "handcuff"; displayName = "STR_Item_lol"; weight = 1; buyPrice = 25; sellPrice = -1; illegal = false; edible = -1; icon = "icons\cuffs.paa"; }; class keys { variable = "keys"; displayName = "STR_Item_Keys"; weight = 1; buyPrice = 25; sellPrice = -1; illegal = false; edible = -1; icon = "icons\icon_keys.paa"; }; --------------------------------------------------------------------------- </Key> <Key ID="STR_Item_lol"> <Original>Handcuff's</Original> <Czech>Handcuff's</Czech> </Key> <Key ID="STR_Item_keys"> <Original>Handcuff Key's</Original> <Czech>Handcuff Key's</Czech> </Key>
×