#include "..\script_component.hpp" /* * Author: J. Schmidt * Creates a new organization for a player. * Initializes the organization with the specified name, owner, and optional starting funds and reputation. * * Arguments: * 0: Owner UID - Player UID who will own the organization * 1: Organization Name - Name of the organization * 2: Initial Funds (Optional, default: 0) - Starting funds for the organization * 3: Initial Reputation (Optional, default: 0) - Starting reputation for the organization * * Return Value: * Organization Data - The newly created organization data, or nil if creation failed * * Example: * [getPlayerUID player, "Alpha Squad", 5000, 100] call forge_client_org_fnc_create * [getPlayerUID player, "Bravo Team"] call forge_client_org_fnc_create // With default funds and reputation * * Public: Yes */ params [ ["_ownerUID", "", [""]], ["_name", "", [""]], ["_initialFunds", 0, [0]], ["_initialReputation", 0, [0]] ]; // Validate input parameters if (_ownerUID == "" || _name == "") exitWith { ["Invalid parameters for organization creation", "error", 5, "right"] call forge_client_misc_fnc_notify; nil }; // Get the organization store interface private _store = call FUNC(verifyOrgStore); // Create the organization with the provided parameters private _orgData = _store call ["createOrg", [_ownerUID, _name, _initialFunds, _initialReputation]]; // Provide feedback based on success or failure if (isNil "_orgData") then { [format ["Failed to create organization '%1'", _name], "error", 5, "right"] call forge_client_misc_fnc_notify; } else { [format ["Organization '%1' created successfully", _name], "success", 5, "right"] call forge_client_misc_fnc_notify; }; // Return the organization data for further operations _orgData