# SProfile

**الأعضاء** 3

|       |                                             |                                                                                             |
| ----- | ------------------------------------------- | ------------------------------------------------------------------------------------------- |
| دالة  | [Authorize](#authorize)                     | Requests access to profile functions, must be called prior to attempting to access profile. |
| دالة  | [LoadProfile](#loadprofile)                 | Load the profile of player                                                                  |
| خاصية | [ActivePlayerProfile](#activeplayerprofile) | –                                                                                           |

## الدوال

### 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'.

المعاملات

| الاسم        | النوع   | القيمة الافتراضية |
| ------------ | ------- | ----------------- |
| onAuthorized | Closure | null              |
| onRejected   | Closure | null              |
| onAuthorized | Action  | null              |
| onRejected   | Action  | null              |

القيم المرجعة

`void`

مثال

**Lua**

```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

المعاملات

| المعامل    | النوع             | الوصف                                                                                                                                |
| ---------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| onFinished | Callback Function | onFinished([SUserProfile](/docs/ar/scripting/client-scripting-api-reference/types/suserprofile.md)) is called once profile is loaded |

القيم المرجعة

`void`

مثال

**Lua**

```lua
function onFinished(SUserProfile)
--
end
Space.Profile.LoadProfile(onFinished)


```

## الخصائص

### ActivePlayerProfile

[SUserProfile](/docs/ar/scripting/client-scripting-api-reference/types/suserprofile.md) ActivePlayerProfile {get; }

مثال

Lua

```text
Space.Profile.ActivePlayerProfile

```
