Jump to content

Steel_Dragon

Member
  • Content Count

    85
  • Joined

  • Last visited

  • Medals

Everything posted by Steel_Dragon

  1. Steel_Dragon

    Admin Impound Vehicle via button

    in the admin_menu.hpp added this to the button to try and avoid the playerSide isEqualTo west check in the actionkeyhandler.sqf - it just closes the dialog - class impoundVehicle : Life_RscButtonMenu { idc = 2918; text = "Impound"; onButtonClick = "[] call life_fnc_copInteractionMenu; closeDialog 0;"; x = 0.54125 * safezoneW + safezoneX; y = 0.715 * safezoneH + safezoneY w = 0.0680 * safezoneW; h = 0.035 * safezoneH; };
  2. Steel_Dragon

    Admin Impound Vehicle via button

    Trying to think outside the box - in the actionkeyhandler.sqf where the cops get the cop menu on win key i added this (admin check) for the admins - //If target is a player then check if we can use the cop menu. if (isPlayer _curObject && _curObject isKindOf "CAManBase") then { if ((_curObject getVariable ["restrained",false]) && !dialog && playerSide isEqualTo west || (FETCH_CONST(life_adminlevel) > 1)) then { [_curObject] call life_fnc_copInteractionMenu; }; if ((!(_curObject getVariable ["restrained",false])) && !dialog && playerSide isEqualTo civilian) then { [_curObject] call life_fnc_copInteractionMenu; }; If i can give the admins the cop interaction menu - the admins have access to - Impound, restrain and a few other features.
  3. Steel_Dragon

    Admin Impound Vehicle via button

    Hi thanks for the reply - This is what i have tried calling from a button - deletevehicle cursortarget (This deletes the vehicle - but i would like it to impound instead) - i have tried to call the fn_impound from the button (but im guessing that there are police checks involved) - I have tried - this [Impound vehicle, deleteVehicle car1]; none of these really work i would like to make some thing from this script below but i keep breaking it - #include "..\..\script_macros.hpp" /* File: fn_impoundAction.sqf Author: Bryan "Tonic" Boardwine Description: Impounds the vehicle */ private ["_vehicle","_type","_time","_value","_vehicleData","_upp","_ui","_progress","_pgText","_cP","_filters","_impoundValue","_price","_impoundMultiplier"]; _vehicle = param [0,objNull,[objNull]]; _filters = ["Car","Air","Ship"]; if (!((KINDOF_ARRAY(_vehicle,_filters)))) exitWith {}; if (player distance cursorObject > 10) exitWith {}; if (_vehicle getVariable "NPC") exitWith {hint localize "STR_NPC_Protected"}; _vehicleData = _vehicle getVariable ["vehicle_info_owners",[]]; if (_vehicleData isEqualTo 0) exitWith {deleteVehicle _vehicle}; //Bad vehicle. _vehicleName = FETCH_CONFIG2(getText,"CfgVehicles",(typeOf _vehicle),"displayName"); _price = M_CONFIG(getNumber,"LifeCfgVehicles",(typeOf _vehicle),"price"); [0,"STR_NOTF_BeingImpounded",true,[((_vehicleData select 0) select 1),_vehicleName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; life_action_inUse = true; _upp = localize "STR_NOTF_Impounding"; //Setup our progress bar. disableSerialization; "progressBar" cutRsc ["life_progress","PLAIN"]; _ui = uiNamespace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format ["%2 (1%1)...","%",_upp]; _progress progressSetPosition 0.01; _cP = 0.01; for "_i" from 0 to 1 step 0 do { uiSleep 0.09; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if (_cP >= 1) exitWith {}; if (player distance _vehicle > 10) exitWith {}; if (!alive player) exitWith {}; }; "progressBar" cutText ["","PLAIN"]; if (player distance _vehicle > 10) exitWith {hint localize "STR_NOTF_ImpoundingCancelled"; life_action_inUse = false;}; if (!alive player) exitWith {life_action_inUse = false;}; if (count crew _vehicle isEqualTo 0) then { if (!(KINDOF_ARRAY(_vehicle,_filters))) exitWith {life_action_inUse = false;}; _type = FETCH_CONFIG2(getText,"CfgVehicles",(typeOf _vehicle),"displayName"); life_impound_inuse = true; if (life_HC_isActive) then { [_vehicle,true,player] remoteExec ["HC_fnc_vehicleStore",HC_Life]; } else { [_vehicle,true,player] remoteExec ["TON_fnc_vehicleStore",RSERV]; }; waitUntil {!life_impound_inuse}; if (playerSide isEqualTo west) then { _impoundMultiplier = LIFE_SETTINGS(getNumber,"vehicle_cop_impound_multiplier"); _value = _price * _impoundMultiplier; [0,"STR_NOTF_HasImpounded",true,[profileName,((_vehicleData select 0) select 1),_vehicleName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; if (_vehicle in life_vehicles) then { hint format [localize "STR_NOTF_OwnImpounded",[_value] call life_fnc_numberText,_type]; BANK = BANK - _value; } else { hint format [localize "STR_NOTF_Impounded",_type,[_value] call life_fnc_numberText]; BANK = BANK + _value; }; if (BANK < 0) then {BANK = 0;}; [1] call SOCK_fnc_updatePartial; }; } else { hint localize "STR_NOTF_ImpoundingCancelled"; }; life_action_inUse = false; Button - class impoundVehicle : Life_RscButtonMenu { idc = 2918; text = "Impound"; onButtonClick = "[] call life_fnc_adminImpoundAction"; x = 0.54125 * safezoneW + safezoneX; y = 0.715 * safezoneH + safezoneY w = 0.0680 * safezoneW; h = 0.035 * safezoneH; }; Thanks
  4. Hi, I am trying to add 5 public Medic slots on top of the already listed Whitelisted slots. I have this code in the initMedic.sqf : #include "..\script_macros.hpp" /* File: fn_initMedic.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the medic.. */ waitUntil {!(isNull (findDisplay 46))}; if (!(str(player) in ["medic_1", "medic_2", "medic_3", "medic_4", "medic_5"])) then { if ((FETCH_CONST(life_medicLevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; }; player setVariable ["rank",(FETCH_CONST(life_mediclevel)),true]; [] call life_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. After doing extensive research i have been looking in my mission.sqm file (as directed to from my research) and after scrolling through the 100k so lines have not found where to make the adjustments - add the public medic slots. Am i looking in the wrong file or did i just not see it? Thank you. ** I have solved it - I went back to the Editor and on spawn island i added another 5 Medic Players... Hooked them up to the inital player (the medic_1) (Hold Ctrl select the new player and drag a blue line to player 1) Then i changed players 1 - 5 from whitelisted to public slots (double click on each and changed the text value)... Cheers
  5. Steel_Dragon

    GF Cargo Airdrops Script

    Hi first of all, awesome work. I am Running Altis Life RPG v5.0.0 and it is working like a charm. //I would like to ask if there is a way to get the Spawned AI to attack any players they encounter / Players that want to get the airdrop. So it is //like they are defending the airdrop. //I have tried changing the AI sides and it does not seem to work. //_Enemy_Side = west; - I am going to make the area KOS now - so i do not need this above... Also when it spawns a green storage crate (not the white) it does not allow the player to access it. It says You cannot access this until the owning player opens it. (Fixed i just // commented out the green one) Is there a way to remove the marker and crate after a period of time or if it has been cleared out? Thank you in advance and for sharing this script.
×