SProfile
ClientPlayer
On this classAuthorize
- Functions
- Authorize
- Load
Profile - Properties
- Active
Player Profile
Members 3
| Function | Authorize | Requests access to profile functions, must be called prior to attempting to access profile. |
| Function | LoadProfile | Load the profile of player |
| Property | ActivePlayerProfile | – |
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
| Name | Type | Default |
|---|---|---|
| onAuthorized | Closure | null |
| onRejected | Closure | null |
| onAuthorized | Action | null |
| onRejected | Action | null |
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
| Parameter | Type | Description |
|---|---|---|
| onFinished | Callback Function | onFinished(SUserProfile) is called once profile is loaded |
Returns
void
Example
Lua
function onFinished(SUserProfile)
--
end
Space.Profile.LoadProfile(onFinished)
Properties
ActivePlayerProfileRead only
Example
Lua
Space.Profile.ActivePlayerProfile



