ObjectClient

getStateOfRayfireMapObject

GET_STATE_OF_RAYFIRE_MAP_OBJECT0x899BA936634A322E

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

SignatureJavaScript
getStateOfRayfireMapObject(object: Object): number
SignatureLua
getStateOfRayfireMapObject(object: Object): integer

Usage

JavaScript
const result = getStateOfRayfireMapObject(object);
Lua
local result = getStateOfRayfireMapObject(object)

Parameters

ParameterTypeJavaScriptLua
objectObjectnumberinteger

Returns

int JavaScript number, Lua integer

Notes

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

Get a destructible object's state.
Substract 1 to get the real state.
See setStateOfRayfireMapObject to see the different states
For example, if the object just spawned (state 2), the native will return 3.

Reference

Namespace
Object OBJECT
In the game
int GET_STATE_OF_RAYFIRE_MAP_OBJECT(Object object)
Hash
0x899BA936634A322E
Formerly
_GET_DES_OBJECT_STATE

Open in the interactive natives reference