mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 06:34:09 +00:00
rules
This commit is contained in:
parent
a9b4f8e83b
commit
e6efc04756
8494 changed files with 495610 additions and 0 deletions
|
|
@ -0,0 +1,104 @@
|
|||
# This file is automatically generated. Please don't edit it manually.
|
||||
# To submit a bug report on the content, see
|
||||
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
|
||||
|
||||
name: GamePassService
|
||||
type: class
|
||||
memory_category: Instances
|
||||
summary: |
|
||||
A service associated with the legacy game pass system. Use
|
||||
`Class.MarketplaceService` for all new work.
|
||||
description: |
|
||||
The GamePassService is a service that supports legacy game passes using _Asset
|
||||
IDs_. `Class.MarketplaceService` should be used for all new game passes.
|
||||
|
||||
For more information about game passes, please see
|
||||
[Game Passes](../../../production/monetization/passes.md).
|
||||
code_samples: []
|
||||
inherits:
|
||||
- Instance
|
||||
descendants: []
|
||||
tags:
|
||||
- NotCreatable
|
||||
- Service
|
||||
deprecation_message: ''
|
||||
properties: []
|
||||
methods:
|
||||
- name: GamePassService:PlayerHasPass
|
||||
summary: |
|
||||
Returns `true` if the `Class.Player` has the specified **legacy** game
|
||||
pass. Does not work with new game passes.
|
||||
description: |
|
||||
This function will not work with new game passes; use
|
||||
`Class.MarketplaceService:UserOwnsGamePassAsync()` instead.
|
||||
|
||||
This function returns `true` if the `Class.Player` has the specified
|
||||
legacy game pass. The result of this function may be cached, meaning it
|
||||
should not be relied on to give an up to date result.
|
||||
|
||||
See [Passes](../../../production/monetization/passes.md) for further
|
||||
information.
|
||||
|
||||
#### Legacy Game Passes
|
||||
|
||||
Historically, game passes on Roblox had an **asset ID** associated with
|
||||
them. Although such game passes still have an asset ID, they now also have
|
||||
a **pass ID**. All new game passes created **only** have a pass ID.
|
||||
|
||||
Whether you are using an **Asset ID** or a **pass ID** determines which
|
||||
API members you can use.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Asset ID (Legacy)</td>
|
||||
<td>Pass ID (Current)</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Verify Ownership</td>
|
||||
<td><code>Class.GamePassService:PlayerHasPass()</code></td>
|
||||
<td><code>Class.MarketplaceService:UserOwnsGamePassAsync()</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prompt a purchase</td>
|
||||
<td><code>Class.MarketplaceService:PromptPurchase()</code></td>
|
||||
<td><code>Class.MarketplaceService:PromptGamePassPurchase()</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prompted purchase finished</td>
|
||||
<td><code>Class.MarketplaceService.PromptPurchaseFinished</code></td>
|
||||
<td><code>Class.MarketplaceService.PromptGamePassPurchaseFinished</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
code_samples:
|
||||
- GamePassService-PlayerHasPass1
|
||||
parameters:
|
||||
- name: player
|
||||
type: Player
|
||||
default:
|
||||
summary: |
|
||||
The `Class.Player` for which to check ownership.
|
||||
- name: gamePassId
|
||||
type: int64
|
||||
default:
|
||||
summary: |
|
||||
The _Asset ID_ of the game pass. This is **not** the _Game Pass ID_
|
||||
(see above).
|
||||
returns:
|
||||
- type: boolean
|
||||
summary: |
|
||||
Whether the `Class.Player` owns the game pass.
|
||||
tags:
|
||||
- Yields
|
||||
- Deprecated
|
||||
deprecation_message: ''
|
||||
security: None
|
||||
thread_safety: Unsafe
|
||||
capabilities:
|
||||
- Monetization
|
||||
events: []
|
||||
callbacks: []
|
||||
Loading…
Add table
Add a link
Reference in a new issue