RedM Natives

IS_LOCATION_SPAWN_SAFE

Hash0xFB1E7998B8595825
Runtime nameIsLocationSpawnSafe
NamespacePED
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL IS_LOCATION_SPAWN_SAFE(Ped ped, float p1);

Parameters

NameTypeDescription
pedPed—
p1float—

Returns BOOL

Usage

Lua
local retval = IsLocationSpawnSafe(ped, p1)

-- always works, by hash
local retval = Citizen.InvokeNative(0xFB1E7998B8595825, ped, p1, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsLocationSpawnSafe(ped, p1);

// by hash
const retval = Citizen.invokeNative('0xFB1E7998B8595825', ped, p1 + 0.0000001, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xFB1E7998B8595825, ped, p1);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.