CallEvent

From Onset Developer Wiki
Revision as of 09:33, 2 September 2020 by BlueMountains (talk | contribs)
CallEvent

Type: Function
Context: Server & Client
Introduced: v1.0

Description

The event to call by name. Will call events in all packages.

Syntax

CallEvent(EventName [, UserArgs...])

Parameters

  • EventName
    The event name.
  • UserArgs (optional)
    The passed user arguments to the function.

Return Value

  • This function has no specific return value.

Example

function SetPlayerLoggedIn(player)
	PlayerData[player].logged_in = true
	SetPlayerRandomColor(player)

	CallEvent("OnPlayerLoggedIn", player)
end

See also