GET_CURRENT_SERVER_ENDPOINT
Returns the peer address of the remote game server that the user is currently connected to.
Signature
char* GET_CURRENT_SERVER_ENDPOINT();Returns char* — The peer address of the game server (e.g. `127.0.0.1:30120`), or NULL if not available.
Description
Returns the peer address of the remote game server that the user is currently connected to.
Usage
local retval = GetCurrentServerEndpoint()
-- always works, by hash
local retval = Citizen.InvokeNative(0xea11bfba, Citizen.ResultAsString())JavaScript and C#
const retval = GetCurrentServerEndpoint();
// by hash
const retval = Citizen.invokeNative('0xea11bfba', Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0xea11bfba);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.