GET_PLAYER_TOKEN
Gets a player's token.
Signature
char* GET_PLAYER_TOKEN(char* playerSrc, int index);Parameters
| Name | Type | Description |
|---|---|---|
playerSrc | char* | A player. |
index | int | Index between 0 and GET_NUM_PLAYER_TOKENS. |
Returns char* — A token value.
Description
Gets a player's token. Tokens can be used to enhance banning logic, however are specific to a server.
Usage
local retval = GetPlayerToken(playerSrc, index)
-- always works, by hash
local retval = Citizen.InvokeNative(0x54c06897, playerSrc, index, Citizen.ResultAsString())JavaScript and C#
const retval = GetPlayerToken(playerSrc, index);
// by hash
const retval = Citizen.invokeNative('0x54c06897', playerSrc, index, Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0x54c06897, playerSrc, index);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.