The Lab
NETWORK native

NETWORK_GET_HOST_OF_THIS_SCRIPT

returns Player0 paramsbuild 1232

Returns the host player of the calling network script.

Signature

C
Player NETWORK_GET_HOST_OF_THIS_SCRIPT(); // 0xC7B4D79B01FA7A5C b1232

Parameters

This native takes no parameters.

Facts

Facts about NETWORK_GET_HOST_OF_THIS_SCRIPT
Name
NETWORK_GET_HOST_OF_THIS_SCRIPT
Hash
0xC7B4D79B01FA7A5C
Namespace
Returns
Player
Game build
1232

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local player = Citizen.InvokeNative(0xC7B4D79B01FA7A5C, -- NETWORK_GET_HOST_OF_THIS_SCRIPT
  Citizen.ResultAsInteger()
)
print(player)
JavaScript
const player = Citizen.invokeNative("0xC7B4D79B01FA7A5C", // NETWORK_GET_HOST_OF_THIS_SCRIPT
  Citizen.resultAsInteger()
);
console.log(player)
C#
int player = Function.Call<int>((Hash)0xC7B4D79B01FA7A5C); // NETWORK_GET_HOST_OF_THIS_SCRIPT
All NETWORK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.