API REFERENCE
SpoofPed
Enables or disables server-side ped spoofing and queues a one-time ped change.
Syntax
local ok = ONYX.SpoofPed(spoofHash, spoofServer)Parameters
spoofHash(number (uint32)) — Model hash to report to the server.spoofServer(boolean) — true enables server spoofing and queues one ped change; false disables it.
Return(s)
boolean — true on success, false otherwise.
Behavior
- Calling with (hash, true) switches the ped and marks it as server driven; the spoof persists until disabled.
- Calling with (_, false) turns spoofing off without changing the current model.
Example(s)
local ok = ONYX.SpoofPed(GetHashKey("mp_m_freemode_01"), true)
ONYX.SpoofPed(GetHashCode(), false)