ObjectClient

setStateOfRayfireMapObject

SET_STATE_OF_RAYFIRE_MAP_OBJECT0x5C29F698D404C5E1

The GTA V native SET_STATE_OF_RAYFIRE_MAP_OBJECT of the OBJECT namespace, as LS:MP client scripts call it: the global function setStateOfRayfireMapObject, in JavaScript and in Lua.

SignatureJavaScript
setStateOfRayfireMapObject(object: Object, state: number): void
SignatureLua
setStateOfRayfireMapObject(object: Object, state: integer)

Usage

JavaScript
setStateOfRayfireMapObject(object, state);
Lua
setStateOfRayfireMapObject(object, state)

Parameters

ParameterTypeJavaScriptLua
objectObjectnumberinteger
stateintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Defines the state of a destructible object.
Use the getRayfireMapObject native to find an object's handle with its name / coords.
State 2 == object just spawned
State 4 == Beginning of the animation
State 6 == Start animation
State 9 == End of the animation

Reference

Namespace
Object OBJECT
In the game
void SET_STATE_OF_RAYFIRE_MAP_OBJECT(Object object, int state)
Hash
0x5C29F698D404C5E1
Formerly
_SET_DES_OBJECT_STATE

Open in the interactive natives reference