initial commit
This commit is contained in:
29
Altis_Life.Altis/core/admin/fn_adminCompensate.sqf
Normal file
29
Altis_Life.Altis/core/admin/fn_adminCompensate.sqf
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminCompensate.sqf
|
||||
Author: ColinM9991
|
||||
|
||||
Description:
|
||||
Figure it out.
|
||||
*/
|
||||
private ["_value","_action"];
|
||||
if (FETCH_CONST(life_adminlevel) < 2) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
|
||||
_value = parseNumber(ctrlText 9922);
|
||||
if (_value < 0) exitWith {};
|
||||
if (_value > 999999) exitWith {hint localize "STR_ANOTF_Fail"};
|
||||
|
||||
_action = [
|
||||
format [localize "STR_ANOTF_CompWarn",[_value] call life_fnc_numberText],
|
||||
localize "STR_Admin_Compensate",
|
||||
localize "STR_Global_Yes",
|
||||
localize "STR_Global_No"
|
||||
] call BIS_fnc_guiMessage;
|
||||
|
||||
if (_action) then {
|
||||
CASH = CASH + _value;
|
||||
hint format [localize "STR_ANOTF_Success",[_value] call life_fnc_numberText];
|
||||
closeDialog 0;
|
||||
} else {
|
||||
hint localize "STR_NOTF_ActionCancel";
|
||||
closeDialog 0;
|
||||
};
|
||||
13
Altis_Life.Altis/core/admin/fn_adminDebugCon.sqf
Normal file
13
Altis_Life.Altis/core/admin/fn_adminDebugCon.sqf
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminDebugCon.sqf
|
||||
Author: ColinM9991
|
||||
|
||||
Description:
|
||||
Opens the Debug Console.
|
||||
*/
|
||||
if (FETCH_CONST(life_adminlevel) < 5) exitWith {closeDialog 0; hint localize "STR_NOTF_adminDebugCon";};
|
||||
life_admin_debug = true;
|
||||
|
||||
createDialog "RscDisplayDebugPublic";
|
||||
[0,format [localize "STR_NOTF_adminHasOpenedDebug",profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
|
||||
16
Altis_Life.Altis/core/admin/fn_adminFreeze.sqf
Normal file
16
Altis_Life.Altis/core/admin/fn_adminFreeze.sqf
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminFreeze.sqf
|
||||
Author: ColinM9991
|
||||
|
||||
Description: Freezes selected player
|
||||
*/
|
||||
if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
|
||||
|
||||
private _unit = lbData[2902,lbCurSel (2902)];
|
||||
_unit = call compile format ["%1", _unit];
|
||||
if (isNil "_unit") exitWith {};
|
||||
if (isNull _unit) exitWith {};
|
||||
if (_unit == player) exitWith {hint localize "STR_ANOTF_Error";};
|
||||
|
||||
[player] remoteExec ["life_fnc_freezePlayer",_unit];
|
||||
15
Altis_Life.Altis/core/admin/fn_adminGetID.sqf
Normal file
15
Altis_Life.Altis/core/admin/fn_adminGetID.sqf
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
File: fn_adminGetID.sqf
|
||||
Author: Bryan "Tonic" Boardwine
|
||||
|
||||
Description:
|
||||
Fetches the selected ID of the player.
|
||||
Used by in-game admins to issue bans/kicks.
|
||||
https://community.bistudio.com/wiki/Multiplayer_Server_Commands
|
||||
*/
|
||||
private _unit = lbData[2902,lbCurSel (2902)];
|
||||
_unit = call compile format ["%1", _unit];
|
||||
if (isNil "_unit") exitWith {};
|
||||
if (isNull _unit) exitWith {};
|
||||
|
||||
[_unit,player] remoteExecCall ["TON_fnc_getID",2];
|
||||
21
Altis_Life.Altis/core/admin/fn_adminGodMode.sqf
Normal file
21
Altis_Life.Altis/core/admin/fn_adminGodMode.sqf
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminGodMode.sqf
|
||||
Author: Tobias 'Xetoxyc' Sittenauer
|
||||
|
||||
Description: Enables God mode for Admin
|
||||
*/
|
||||
|
||||
if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
if (life_god) then {
|
||||
life_god = false;
|
||||
titleText [localize "STR_ANOTF_godModeOff","PLAIN"]; titleFadeOut 2;
|
||||
player allowDamage true;
|
||||
} else {
|
||||
life_god = true;
|
||||
titleText [localize "STR_ANOTF_godModeOn","PLAIN"]; titleFadeOut 2;
|
||||
player allowDamage false;
|
||||
};
|
||||
14
Altis_Life.Altis/core/admin/fn_adminID.sqf
Normal file
14
Altis_Life.Altis/core/admin/fn_adminID.sqf
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
File: fn_adminID.sqf
|
||||
Author: Bryan "Tonic" Boardwine
|
||||
|
||||
Description:
|
||||
Output information received to admin menu.
|
||||
*/
|
||||
private ["_display","_ret","_text"];
|
||||
disableSerialization;
|
||||
_ret = _this select 0;
|
||||
_display = findDisplay 2900;
|
||||
_text = _display displayCtrl 2903;
|
||||
|
||||
_text ctrlSetStructuredText parseText format ["ID: %1",_ret];
|
||||
46
Altis_Life.Altis/core/admin/fn_adminInfo.sqf
Normal file
46
Altis_Life.Altis/core/admin/fn_adminInfo.sqf
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminInfo.sqf
|
||||
Author: Bryan "Tonic" Boardwine
|
||||
|
||||
Description:
|
||||
Output information received to admin menu.
|
||||
*/
|
||||
private ["_ret","_unit","_prim","_sec","_vest","_uni","_bp","_attach","_steamName","_secondary"];
|
||||
_ret = _this;
|
||||
disableSerialization;
|
||||
|
||||
_unit = _ret select 3;
|
||||
_prim = if (!(primaryWeapon _unit isEqualTo "")) then { FETCH_CONFIG2(getText,"CfgWeapons",primaryWeapon _unit,"displayName")} else {"None"};
|
||||
_sec = if (!(handgunWeapon _unit isEqualTo "")) then { FETCH_CONFIG2(getText,"CfgWeapons",handgunWeapon _unit,"displayName")} else {"None"};
|
||||
_vest = if (!(vest _unit isEqualTo "")) then { FETCH_CONFIG2(getText,"CfgWeapons",vest _unit,"displayName")} else {"None"};
|
||||
_uni = if (!(uniform _unit isEqualTo "")) then { FETCH_CONFIG2(getText,"CfgWeapons",uniform _unit,"displayName")} else {"None"};
|
||||
_bp = if (!(backpack _unit isEqualTo "")) then {FETCH_CONFIG2(getText,"CfgVehicles",backpack _unit,"displayName")} else {"None"};
|
||||
|
||||
_attach = [];
|
||||
_secondary = [];
|
||||
if (!(primaryWeapon _unit isEqualTo "")) then {
|
||||
{
|
||||
if (!(_x isEqualTo "")) then {
|
||||
_attach pushBack (FETCH_CONFIG2(getText,"CfgWeapons",_x,"displayName"));
|
||||
};
|
||||
} forEach (primaryWeaponItems _unit);
|
||||
};
|
||||
|
||||
if (!(handgunItems _unit isEqualTo "")) then {
|
||||
{
|
||||
if (!(_x isEqualTo "")) then {
|
||||
_secondary pushBack (FETCH_CONFIG2(getText,"CfgWeapons",_x,"displayName"));
|
||||
};
|
||||
} forEach (handgunItems _unit);
|
||||
};
|
||||
|
||||
_steamName = _ret select 4;
|
||||
if (!((_ret select 4) isEqualType "")) then {
|
||||
_steamName = "Not a Steam User!";
|
||||
};
|
||||
|
||||
if (count _attach isEqualTo 0) then {_attach = "None"};
|
||||
if (count _secondary isEqualTo 0) then {_secondary = "None"};
|
||||
CONTROL(2900,2903) ctrlSetStructuredText parseText format ["<t size='.7'>Name: %1<br/>Steam Name: %10<br/>Player UID: %11<br/>Player Side: %12<br/>Bank: %2<br/>Money: %3<br/>Uniform: %4<br/>Vest: %5<br/>Backpack: %6<br/>Primary: %7<br/>Handgun: %8<br/><t align='center'>Primary Attachments</t><br/>%9<br/><t align='center'>Secondary Attachments</t><br/>%13<br/></t>",
|
||||
_unit getVariable ["realname",name _unit],[(_ret select 0)] call life_fnc_numberText,[(_ret select 1)] call life_fnc_numberText, _uni,_vest,_bp,_prim,_sec,_attach,_steamName,(_ret select 5),(_ret select 6),_secondary];
|
||||
10
Altis_Life.Altis/core/admin/fn_adminMarkers.sqf
Normal file
10
Altis_Life.Altis/core/admin/fn_adminMarkers.sqf
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminMarkers.sqf
|
||||
Author: NiiRoZz
|
||||
Description:
|
||||
Display markers for all players
|
||||
*/
|
||||
if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
|
||||
|
||||
[] spawn TON_fnc_MapMarkersAdmin;
|
||||
43
Altis_Life.Altis/core/admin/fn_adminMenu.sqf
Normal file
43
Altis_Life.Altis/core/admin/fn_adminMenu.sqf
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminMenu.sqf
|
||||
Author: Bryan "Tonic" Boardwine
|
||||
|
||||
Description:
|
||||
Opens the admin menu and hides buttons based on life_adminlevel.
|
||||
*/
|
||||
private ["_display","_list","_side","_godmode","_markers"];
|
||||
if (FETCH_CONST(life_adminlevel) < 1) exitWith {closeDialog 0;};
|
||||
|
||||
disableSerialization;
|
||||
|
||||
waitUntil {!isNull (findDisplay 2900)};
|
||||
_list = CONTROL(2900,2902);
|
||||
if (FETCH_CONST(life_adminlevel) < 1) exitWith {closeDialog 0;};
|
||||
|
||||
switch (FETCH_CONST(life_adminlevel)) do
|
||||
{
|
||||
case 1: {ctrlShow [2904,false];ctrlShow [2905,false];ctrlShow [2906,false];ctrlShow [2907,false];ctrlShow [2908,false];ctrlShow [2909,false];ctrlShow [2910,false];ctrlShow [2911,false];};
|
||||
case 2: {ctrlShow [2905,false];ctrlShow [2906,false];ctrlShow [2907,false];ctrlShow [2908,false];ctrlShow [2909,false];ctrlShow [2910,false];ctrlShow [2911,false];};
|
||||
case 3: {ctrlShow [2907,false];ctrlShow [2908,false];ctrlShow [2909,false];ctrlShow [2910,false];ctrlShow [2911,false];};
|
||||
case 4: {ctrlShow [2911,false];};
|
||||
};
|
||||
|
||||
//Purge List
|
||||
lbClear _list;
|
||||
|
||||
{
|
||||
_side = switch (side _x) do {case west: {"Cop"}; case civilian: {"Civ"}; case independent: {"Medic"}; default {"Unknown"};};
|
||||
_list lbAdd format ["%1 - %2", _x getVariable ["realname",name _x],_side];
|
||||
_list lbSetdata [(lbSize _list)-1,str(_x)];
|
||||
} forEach playableUnits;
|
||||
if (FETCH_CONST(life_adminlevel) < 1) exitWith {closeDialog 0;};
|
||||
|
||||
if (life_god) then {
|
||||
_godmode = CONTROL(2900,2908);
|
||||
_godmode ctrlSetTextColor [0, 255, 0, 1]; // green
|
||||
};
|
||||
if (life_markers) then {
|
||||
_markers = CONTROL(2900,2910);
|
||||
_markers ctrlSetTextColor [0, 255, 0, 1]; // green
|
||||
};
|
||||
19
Altis_Life.Altis/core/admin/fn_adminQuery.sqf
Normal file
19
Altis_Life.Altis/core/admin/fn_adminQuery.sqf
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminQuery.sqf
|
||||
Author: Bryan "Tonic" Boardwine
|
||||
|
||||
Description:
|
||||
Starts the query on a player.
|
||||
*/
|
||||
private ["_text","_info","_prim","_sec","_vest","_uni","_bp","_attach","_tmp"];
|
||||
disableSerialization;
|
||||
if (!isNil "admin_query_ip") exitWith {hint localize "STR_ANOTF_Query_2"};
|
||||
_text = CONTROL(2900,2903);
|
||||
_info = lbData[2902,lbCurSel (2902)];
|
||||
_info = call compile format ["%1", _info];
|
||||
|
||||
if (isNil "_info") exitWith {_text ctrlSetText localize "STR_ANOTF_QueryFail";};
|
||||
if (isNull _info) exitWith {_text ctrlSetText localize "STR_ANOTF_QueryFail";};
|
||||
[player] remoteExec ["TON_fnc_player_query",_info];
|
||||
_text ctrlSetText localize "STR_ANOTF_Query";
|
||||
21
Altis_Life.Altis/core/admin/fn_adminSpectate.sqf
Normal file
21
Altis_Life.Altis/core/admin/fn_adminSpectate.sqf
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminSpectate.sqf
|
||||
Author: ColinM9991
|
||||
|
||||
Description:
|
||||
Spectate the chosen player.
|
||||
*/
|
||||
if (FETCH_CONST(life_adminlevel) < 3) exitWith {closeDialog 0;};
|
||||
|
||||
private _unit = lbData[2902,lbCurSel (2902)];
|
||||
_unit = call compile format ["%1", _unit];
|
||||
if (isNil "_unit") exitWith {};
|
||||
if (isNull _unit) exitWith {};
|
||||
if (_unit == player) exitWith {hint localize "STR_ANOTF_Error";};
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
_unit switchCamera "INTERNAL";
|
||||
hint format [localize "STR_NOTF_nowSpectating",_unit getVariable ["realname",name _unit]];
|
||||
AM_Exit = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 68) then {(findDisplay 46) displayRemoveEventHandler ['KeyDown',AM_Exit];player switchCamera 'INTERNAL';hint 'You have stopped spectating';};false"];
|
||||
14
Altis_Life.Altis/core/admin/fn_adminTeleport.sqf
Normal file
14
Altis_Life.Altis/core/admin/fn_adminTeleport.sqf
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminTeleport.sqf
|
||||
Author: ColinM9991
|
||||
Credits: To original script author(s)
|
||||
Description:
|
||||
Teleport to chosen position.
|
||||
*/
|
||||
if (FETCH_CONST(life_adminlevel) < 3) exitWith {closeDialog 0;};
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
openMap [true, false];
|
||||
onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call life_fnc_teleport";
|
||||
18
Altis_Life.Altis/core/admin/fn_adminTpHere.sqf
Normal file
18
Altis_Life.Altis/core/admin/fn_adminTpHere.sqf
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "..\..\script_macros.hpp"
|
||||
/*
|
||||
File: fn_adminTpHere.sqf
|
||||
Author: ColinM9991
|
||||
|
||||
Description:
|
||||
Teleport selected player to you.
|
||||
*/
|
||||
if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0;};
|
||||
|
||||
private _target = lbData[2902,lbCurSel (2902)];
|
||||
_target = call compile format ["%1", _target];
|
||||
if (isNil "_target" || isNull _target) exitWith {};
|
||||
if (_target == player) exitWith {hint localize "STR_ANOTF_Error";};
|
||||
|
||||
if (!(vehicle _target isEqualTo _target)) exitWith {hint localize "STR_Admin_CannotTpHere"};
|
||||
_target setPos (getPos player);
|
||||
hint format [localize "STR_NOTF_haveTPedToYou",_target getVariable ["realname",name _target]];
|
||||
Reference in New Issue
Block a user