38 lines
1.0 KiB
Plaintext
38 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!"; };
|
|
|
|
[_uid, _message] remoteExec ["forge_server_admin_fnc_sendMessage", 2];
|
|
|
|
hintSilent format ["Message sent to UID %1: %2", _uid, _message];
|
|
|
|
["dummy"] call FUNC(adminRefresh);
|