Skip to content

sc_creative_v1.set_infinite_ammo

Infinite ammo for the weapons you carry: a magazine you fire from is topped up to its maximum. SCO_FAILED when the magazine setter can’t be hooked or no release hook is left. game.creative.ammo.

sco_result (*)(sco_plugin *, int)

Service index

Property Value
Symbol sc_creative_v1.set_infinite_ammo
Record ID sc-creative-v1-set-infinite-ammo
Service game.creative
Table sc_creative_v1
Version macro SC_CREATIVE_SERVICE_VERSION
Packed table version 65536
Since / availability size >= 40; 1.0
Complete member extent (x64 bytes) 40
Table size (x64 bytes) 64

Header source

sco_result (*set_infinite_ammo)(sco_plugin* self, int on);
Infinite ammo for the weapons you carry: a magazine you fire from is topped up to its maximum. SCO_FAILED when the magazine setter can’t be hooked or no release hook is left. game.creative.ammo.

Absent table: query_service NOT_FOUND; missing feature capability: UNAVAILABLE; null/unknown self: BAD_ARG; released-handle refusal unspecified. Additional failures/output state unspecified unless described in the buffer contract.

Absent table: query_service NOT_FOUND

Caller outputs; host owns toggle state. No allocation transfer; internal allocation unspecified.

Game thread only (WRONG_THREAD elsewhere); last_error any thread. Recursive reentrancy unspecified.

unspecified

unspecified

No in-flight cancellation entrypoint; owned toggles switched off and speed restored on ordinary unload/non-retained crash cleanup. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sc_creative.h
(*set_infinite_ammo)
cpp typed-wrapper include/scosdk/game/creative.hpp
sco_result SetInfiniteAmmo(bool on) const noexcept { return detail::CanCall(ref_.Get(), &sc_creative_v1::set_infinite_ammo) ? ref_->set_infinite_ammo(self_, on ? 1 : 0) : SCO_UNAVAILABLE; }
csharp typed-wrapper sdk/csharp/Sco.Sdk/Game/Creative.cs
public ScoResult SetInfiniteAmmo(bool on) => _t == null || _t->size < (uint)((byte*)&_t->set_infinite_ammo - (byte*)_t + sizeof(nint)) || _t->set_infinite_ammo == null ? ScoResult.Unavailable : _t->set_infinite_ammo(Self, on ? 1 : 0);
lua unsupported sdk/docs/lua.md
Read-only: scripts can see which toggles are on but can’t switch any

None identified in the catalogue; this is not proof none can exist.

ABI pins prove layout, not semantic behavior or a live game session.