SetPlayerDiscordJoinParams: Difference between revisions
Jump to navigation
Jump to search
AliAssassiN (talk | contribs) No edit summary |
AliAssassiN (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePlayer:''' The [[player]] whose discord join parameters will be set on. | *'''thePlayer:''' The [[player]] whose discord join parameters will be set on. | ||
*'''key:''' The key which will be called upon invited users (or users who joined the game by clicking "Join") onPlayerJoin event. (Limited to 64 characters) | *'''key:''' The key which will be called upon invited users (or users who joined the game by clicking "Join") onPlayerJoin event. (Limited to 64 characters, must not contain space character) | ||
*'''partyId:''' Changing the partyId is useful to make invites expire. (Limited to 64 characters) | *'''partyId:''' Changing the partyId is useful to make invites expire. (Limited to 64 characters, must not contain space character) | ||
*'''partyCurrentSize:''' The current number of used capacity for other users to join. (Can't be more than partyMaxSize) | *'''partyCurrentSize:''' The current number of used capacity for other users to join. (Can't be more than partyMaxSize) | ||
*'''partyMaxSize:''' The total capacity for users inside the party. | *'''partyMaxSize:''' The total capacity for users inside the party. |
Revision as of 07:36, 10 September 2019
This function allows you to set a user's Discord join/invite parameters. It's necessary to use this function to enable that option on Discord.
Use empty string for key parameter to disable join/invite feature.
Syntax
bool setPlayerDiscordJoinParams ( element thePlayer, string key, string partyId, int partyCurrentSize, int partyMaxSize )
OOP Syntax Help! I don't understand this!
- Method: player:setDiscordJoinParams(...)
Required Arguments
- thePlayer: The player whose discord join parameters will be set on.
- key: The key which will be called upon invited users (or users who joined the game by clicking "Join") onPlayerJoin event. (Limited to 64 characters, must not contain space character)
- partyId: Changing the partyId is useful to make invites expire. (Limited to 64 characters, must not contain space character)
- partyCurrentSize: The current number of used capacity for other users to join. (Can't be more than partyMaxSize)
- partyMaxSize: The total capacity for users inside the party.
Returns
Returns true if the value was set successfully, false otherwise.
Example
Click to collapse [-]
Serverfunction makeSomeParty ( playerSource, cmdName ) setPlayerDiscordJoinParams(playerSource, "abcdefghijklmnopqrstuvwxyz", "abc123456", 1, 5) end addCommandHandler ( "makeParty", makeSomeParty )
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState