NETWORK_HANDLE_FROM_FRIEND
Hash
0xD45CB817D7E177D2Runtime name
NetworkHandleFromFriendNamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xD45CB817D7E177D2Signature
void NETWORK_HANDLE_FROM_FRIEND(int friendIndex, Any* gamerHandle);Parameters
| Name | Type | Description |
|---|---|---|
friendIndex | int | — |
gamerHandle | Any* | — |
Returns void
Usage
local gamerHandle = NetworkHandleFromFriend(friendIndex, gamerHandle)
-- always works, by hash
local gamerHandle = Citizen.InvokeNative(0xD45CB817D7E177D2, friendIndex, Citizen.PointerValueIntInitialized(gamerHandle))JavaScript and C#
const gamerHandle = NetworkHandleFromFriend(friendIndex, gamerHandle);
// by hash
const gamerHandle = Citizen.invokeNative('0xD45CB817D7E177D2', friendIndex, Citizen.pointerValueIntInitialized(gamerHandle));var gamerHandle = new OutputArgument();
Function.Call((Hash)0xD45CB817D7E177D2, friendIndex, gamerHandle);
// gamerHandle.GetResult<int>()- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.