Social ClubClientNot in this build1 output

scProfanityGetProfaneWord

SC_PROFANITY_GET_PROFANE_WORD0x75CC8931A11128C9

The GTA V native SC_PROFANITY_GET_PROFANE_WORD of the SOCIALCLUB namespace, as LS:MP client scripts call it: the global function scProfanityGetProfaneWord, in JavaScript and in Lua.

SignatureJavaScript
scProfanityGetProfaneWord(token: number): [
  ok: boolean,
  outProfaneWord: string
]
SignatureLua
scProfanityGetProfaneWord(token: integer): boolean, string
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
const [ok, outProfaneWord] = scProfanityGetProfaneWord(token);
Lua
local ok, outProfaneWord = scProfanityGetProfaneWord(token)

Parameters

ParameterTypeJavaScriptLua
tokenintnumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2outProfaneWordstringstringstringText the game writes into a buffer. output

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Retrieves the profane part of the string with max size of 128.
Returns true if profane term was retrieved.

Reference

Namespace
Social Club SOCIALCLUB
In the game
BOOL SC_PROFANITY_GET_PROFANE_WORD(int token, char* outProfaneWord)
Hash
0x75CC8931A11128C9
Introduced
Game build 3258 legacy numbering

Open in the interactive natives reference