πŸ“žCalls

CreateCall

Initiates a phone call from the client side, showing the calling screen and triggering the default call functionality. This export replicates the normal call action from the UI.

---@param targetNumber string The phone number to call
---@param options table|nil Optional: { anonymous?: boolean }
---@return boolean True if call was initiated successfully, false otherwise
local success = exports.yseries:CreateCall("0882222")

if success then
    print("Call initiated successfully")
else
    print("Failed to initiate call")
end

Validation Checks:

  • Validates target number is provided and not empty

  • Checks if trying to call yourself (returns false)

  • Checks if already in a call (returns false)

  • Checks if airplane mode is enabled (returns false)

  • Checks if service/signal is available (returns false)

Example Usage:

Note: This export will show the calling screen UI and trigger the full call flow, including validation, recent call logging, and call state management. It replicates the behavior of calling from the phone's contacts, recents, or keypad.

Note: Use CreateCall if you want to always show the calling screen UI. Use CallContact for programmatic calls without UI interaction.


IsInCall

Checks if the local player is currently in a phone call and returns the call ID if they are.

Example Usage:


CancelCall

Cancels the current active call.

Note: This will end the call for all participants and trigger cleanup events.


GetTargetPlayerCallStatus

Checks the call status of a target player by their phone number.

Returns:


GetCallConfig

Retrieves the call configuration settings.

Last updated