|
|
(3 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | =Attributes=
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sgroupinfo |
− | | + | |
− | {{ScriptFunction|int|ID|{ get; }|The ID of the group.|5=<pre>
| + | |
− | ID = Space.Groups.GetGroupInfo(350).ID</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|int|OwnerID|{ get; }|The ID of the group's owner.|5=<pre>
| + | |
− | OwnerID = Space.Groups.GetGroupInfo(350).OwnerID</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|Name|{ get; }|The name of the group.|5=<pre>
| + | |
− | Name = Space.Groups.GetGroupInfo(350).Name</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|Description|{ get; }|The description of the group.|5=<pre>
| + | |
− | Description =Space.Groups.GetGroupInfo(350).Description</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|Access|{ get; }|The level of access the group has, e.g. public or private.|5=<pre>
| + | |
− | Access = Space.Groups.GetGroupInfo(350).Access</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|ImageUrl|{ get; }|The URL of the group's image.|5=<pre>
| + | |
− | ImageUrl = Space.Groups.GetGroupInfo(350).ImageUrl</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|int|MaxAvatars|{ get; }|The max number of members the group can have.|5=<pre>
| + | |
− | MaxAvatars = Space.Groups.GetGroupInfo(350).MaxAvatars</pre>|6=<pre></pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|Role|{ get; }|Player's role in this group.|5=<pre>
| + | |
− | Role = Space.Groups.GetGroupInfo(350).Role</pre>|6=<pre>--Clicking this object will show canvas1 if you are a VIP in the group
| + | |
− | --and will show canvas2 if you are a regular member
| + | |
− | --and will show canvas3 if you are the group owner
| + | |
− | | + | |
− | thisObject = Space.Host.ExecutingObject
| + | |
− | | + | |
− | canvas1 = Space.Host.GetReference("canvas1")--Add this object with canvas as reference in Scripting Runtime
| + | |
− | canvas2 = Space.Host.GetReference("canvas2")--Add this object with canvas as reference in Scripting Runtime
| + | |
− | canvas3 = Space.Host.GetReference("canvas3")--Add this object with canvas as reference in Scripting Runtime
| + | |
− | | + | |
− | OnClickFunction = function()
| + | |
− |
| + | |
− | local groupInfo = Space.Groups.GetGroupInfo(350)
| + | |
− | | + | |
− | if groupInfo.Role == "Owner" then
| + | |
− | canvas3.Active = true
| + | |
− | elseif groupInfo.Role == "VIP" then
| + | |
− | canvas1.Active = true
| + | |
− | elseif groupInfo.Role == "Normal" then
| + | |
− | canvas2.Active = true
| + | |
− | end
| + | |
− | | + | |
− | end</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|CreateDate|{ get; }|Creation date of the group.|5=<pre>
| + | |
− | CreateDate = Space.Groups.GetGroupInfo(350).CreateDate</pre>|6=<pre>--Clicking this object will show group 355's creation date on a UIText object
| + | |
− | | + | |
− | thisObject = Space.Host.ExecutingObject
| + | |
− | uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime
| + | |
− | | + | |
− | OnClickFunction = function()
| + | |
− |
| + | |
− | CreateDate = Space.Groups.GetGroupInfo(350).CreateDate
| + | |
− | | + | |
− | uiText.Text = CreateDate
| + | |
− | end
| + | |
− | | + | |
− | | + | |
− | thisObject.AddClickable()
| + | |
− | thisObject.Clickable.OnClick(OnClickFunction)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |