client/addons/admin/functions/fnc_sendMessage.sqf
Jacob Schmidt 55f60dc71f feat: Revamp admin panel, store, and arsenal systems
This commit introduces significant changes to the admin panel, store, and arsenal systems, focusing on improved functionality, UI enhancements, and code optimization.

**Admin Panel:**
- Migrated to a web-based UI for improved user experience and maintainability.
- Implemented dynamic player listing with filtering and search capabilities.
- Added functionality for managing player paygrades, sending messages, and transferring funds.
- Integrated server-side events for handling admin actions.

**Store:**
- Added `handleDelivery` event handler.
- Streamlined product selection and purchase processes.
- Improved handling of organization funds and player balances.
- Refactored code for better readability and maintainability.

**Arsenal:**
- Enhanced initialization process with improved data validation.
- Optimized item unlocking logic.

These changes aim to provide a more robust, user-friendly, and efficient experience for both administrators and players.
2025-05-03 19:33:10 -05:00

37 lines
1.0 KiB
Plaintext

#include "..\script_component.hpp"
/*
* Function: forge_client_admin_fnc_sendMessage
* Author: IDSolutions
*
* [Description]
* Sends a message to a selected player through the admin interface.
* This function retrieves the selected player's UID and message content
* from the admin dialog, then sends it to the server-side admin store.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Examples:
* [] call forge_client_admin_fnc_sendMessage;
*
* Public: No - Called from admin dialog controls
*/
private _dialog = findDisplay 202303;
private _list = _dialog displayCtrl 2023001;
private _control = _dialog displayCtrl 2023006;
private _index = lbCurSel _list;
private _uid = _list lbData _index;
private _message = ctrlText _control;
if ((isNil "_uid") || {_uid isEqualTo ""}) exitWith { hintSilent "You did not select a player!"; };
["forge_server_admin_handleEvents", ["sendMessage", [_uid, _message]]] call CFUNC(serverEvent);
hintSilent format ["Message sent to UID %1: %2", _uid, _message];
["dummy"] call FUNC(adminRefresh);