CreatePlayerMount: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Expand upcoming 0.1.6: mount Lua API, ownership, synchronization, limits and verification status; not a release
 
Release G1R:MP 0.1.6 BUILD174 / Protocol 38; availability and upgrade guidance
 
Line 2: Line 2:
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.6</div>
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.6</div>
<div style="color:#111111; margin-top:0.25rem;">Upcoming 0.1.6: not yet publicly released and not included in public 0.1.5. This page documents the implemented API planned for that update.</div>
<div style="color:#111111; margin-top:0.25rem;">Available since G1R:MP 0.1.6. Use the matching client and server (Protocol 38).</div>
</div>
</div>


Line 30: Line 30:


== Notes ==
== Notes ==
* Upcoming 0.1.6, not included in public 0.1.5. Server-side only; use this exact lowercase-leading Lua name. No uppercase alias is registered.
* Available since 0.1.6. Server-side only; use this exact lowercase-leading Lua name. No uppercase alias is registered.
* One active mount per player. The caller resource owns its lifecycle and removal. Use destroyPlayerMount from that same resource.
* One active mount per player. The caller resource owns its lifecycle and removal. Use destroyPlayerMount from that same resource.
* The native animal spawns near its owner. Model/coordinates are not parameters. Use ordinary native interactions for mounting and dismounting; other native restrictions remain.
* The native animal spawns near its owner. Model/coordinates are not parameters. Use ordinary native interactions for mounting and dismounting; other native restrictions remain.

Latest revision as of 21:56, 30 September 2026

createPlayerMount

AVAILABLE FROM UPDATE 0.1.6
Available since G1R:MP 0.1.6. Use the matching client and server (Protocol 38).

Requests a native rideable scavenger assigned to a specific connected player.

Syntax

createPlayerMount(playerId)

Parameters

Name Type Required Description
playerId int yes Positive connection player ID. Call after authentication, spawn and receipt of a movement snapshot, with a mount-capable client.

Returns

true when the server accepts and sends the creation request; false when it cannot grant/send it, including an existing lease, unavailable/ineligible player or missing mount support. This is not a native spawn completion acknowledgement or a mount object ID.

Examples

-- After your server-side permission and player-readiness checks:
local requested = createPlayerMount(playerId)
-- true is request acceptance, not a native spawn acknowledgement.

Notes

  • Available since 0.1.6. Server-side only; use this exact lowercase-leading Lua name. No uppercase alias is registered.
  • One active mount per player. The caller resource owns its lifecycle and removal. Use destroyPlayerMount from that same resource.
  • The native animal spawns near its owner. Model/coordinates are not parameters. Use ordinary native interactions for mounting and dismounting; other native restrictions remain.
  • No fixed two-minute lifetime. Disconnect, resource stop, lost observations, life/eligibility changes and explicit removal still clean up the session.
  • Assignment is to the current connection, not persistent account ownership. No transfer/getter/completion event is introduced. Do not spam retries.
  • See Mounts for late join, remote presentation, received-hit handling, safety timeouts and remaining in-game validation. This does not grant gamemode administrator permission; authorize callers in your script.