Breakroom is now Sinewave Campus. Book a meeting

SProfile

ClientPlayer
On this classAuthorize
  1. Functions
  2. Authorize
  3. LoadProfile
  4. Properties
  5. ActivePlayerProfile
Members 3
FunctionAuthorizeRequests access to profile functions, must be called prior to attempting to access profile.
FunctionLoadProfileLoad the profile of player
PropertyActivePlayerProfile–

Functions​

Authorize​

void Authorize(Closure onAuthorized = null, Closure onRejected = null)
void Authorize(Action onAuthorized = null, Action onRejected = null)

Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.

Parameters

NameTypeDefault
onAuthorizedClosurenull
onRejectedClosurenull
onAuthorizedActionnull
onRejectedActionnull

Returns

void

Example

Lua
Space.Profile.Authorize()
--or
Space.Profile.Authorize(AnOnAuthorizeFunction)
--or
Space.Profile.Authorize(AnOnAuthorizeFunction, AnOnRejectedFuncton)

LoadProfile​

void LoadProfile(Closure onFinished)

Load the profile of player

Parameters

ParameterTypeDescription
onFinishedCallback FunctiononFinished(SUserProfile) is called once profile is loaded

Returns

void

Example

Lua
function onFinished(SUserProfile)
--
end
Space.Profile.LoadProfile(onFinished)

Properties​

ActivePlayerProfileRead only​

SUserProfile ActivePlayerProfile {get; }

Example

Lua
Space.Profile.ActivePlayerProfile