Theme
Vehicles
A spec per vehicle and a spawner the manager owns.
| Export | Summary |
|---|---|
ShVehicleCount | The catalogue, named one spawn at a time by eye. |
ShVehicleAt | See ShVehicleCount. |
ShVehicleName | See ShVehicleCount. |
ShGetOccupiedVehicle | Resolve the vehicle currently containing the local player. |
ShSpawnVehicle | Two entries FREEZE the game if entered: the alpaca 0x40081214 and the unused monster 0x40BA6E9D. |
ShSpawnWarm | Warm the spec cache on a background thread so the first spawn does not scan the address space synchronously. |
ShSpawnWarmProgress | How that warm-up is going, for a status line: 1 while the walk runs, with *done of *total specs resolved, and 0 when nothing is running (the numbers are not written then). |
ShSpawnInvalidate | See ShSpawnWarmProgress. |
ShReadBytes | Guarded reads, for anything walking engine memory. |
ShReadU64 | See ShReadBytes. |
ShReadF32 | See ShReadBytes. |
ShRegisterFrameCallback | — |
ShUnregisterFrameCallback | — |
ShVehicleCount
c
SH_API int ShVehicleCount(void);The catalogue, named one spawn at a time by eye. Ids are stable across sessions, addresses are not.
scripthook.h, line 788
ShVehicleAt
c
SH_API const ShVehicle *ShVehicleAt(int index);Documented together with ShVehicleCount just above.
scripthook.h, line 789
ShVehicleName
c
SH_API const char *ShVehicleName(uint32_t vehicleId);Documented together with ShVehicleCount just above.
scripthook.h, line 790
ShGetOccupiedVehicle
c
SH_API int ShGetOccupiedVehicle(ShOccupiedVehicle *out);Resolve the vehicle currently containing the local player. The class comes from the stable vehicle catalogue rather than a camera-distance fallback; identified says the id/name came from that catalogue.
scripthook.h, line 809
ShSpawnVehicle
c
SH_API uint64_t ShSpawnVehicle(uint32_t vehicleId,
const ShVec3 *pos);Two entries FREEZE the game if entered: the alpaca 0x40081214 and the unused monster 0x40BA6E9D.
scripthook.h, line 817
ShSpawnWarm
c
SH_API void ShSpawnWarm(void);Warm the spec cache on a background thread so the first spawn does not scan the address space synchronously. Call once after the world is loaded; later calls do nothing.
scripthook.h, line 822
ShSpawnWarmProgress
c
SH_API int ShSpawnWarmProgress(int *done, int *total);How that warm-up is going, for a status line: 1 while the walk runs, with *done of *total specs resolved, and 0 when nothing is running (the numbers are not written then). The walk takes about fifteen seconds and a dispatch that lands in the middle of it waits, so a caller that is about to wait can say what for. Either pointer may be NULL.
scripthook.h, line 829
ShSpawnInvalidate
c
SH_API void ShSpawnInvalidate(void);Documented together with ShSpawnWarmProgress just above.
scripthook.h, line 830
ShReadBytes
c
SH_API int ShReadBytes(uint64_t addr, void *out, uint32_t len);Guarded reads, for anything walking engine memory. They go through the kernel, so a freed page fails instead of killing the game.
scripthook.h, line 835
ShReadU64
c
SH_API uint64_t ShReadU64(uint64_t addr, int *ok);Documented together with ShReadBytes just above.
scripthook.h, line 836
ShReadF32
c
SH_API float ShReadF32(uint64_t addr, int *ok);Documented together with ShReadBytes just above.
scripthook.h, line 837
ShRegisterFrameCallback
c
SH_API int ShRegisterFrameCallback(ShFrameFn_t fn, void *user);No doc comment in the header.
scripthook.h, line 842
ShUnregisterFrameCallback
c
SH_API void ShUnregisterFrameCallback(ShFrameFn_t fn);No doc comment in the header.
scripthook.h, line 843