How to get the Security Token?
Where can I find the generated token?
We store for every player a unique token in his entity with the key ViorityToken
. This StateBag system is isolated from external resources (like cheat resources).
Clientside
Get the SecurityToken
Player(-1).state.ViorityToken -- This returns the token
Usage Example
TriggerServerEvent('viority_xxx:server:xy', Player(-1).state.ViorityToken, XY)
Serverside
Get the SecurityToken
Player(source).state.ViorityToken -- This returns the token for provided source
Usage Example
TriggerEvent('viority_xxx:server:xy', Player(source).state.ViorityToken, XY)