setWarningMessage
SET_WARNING_MESSAGE0x7B1776B3B53F8D74The GTA V native SET_WARNING_MESSAGE of the HUD namespace, as LS:MP client scripts call it: the global function setWarningMessage, in JavaScript and in Lua.
setWarningMessage(
titleMsg: string,
flags: number,
promptMsg: string,
p3: boolean,
p4: number,
p5: string,
p6: string,
showBackground: boolean,
errorCode: number
): voidsetWarningMessage(
titleMsg: string,
flags: integer,
promptMsg: string,
p3: boolean,
p4: integer,
p5: string,
p6: string,
showBackground: boolean,
errorCode: integer
)Usage
JavaScript
setWarningMessage(titleMsg, flags, promptMsg, p3, p4, p5, p6, showBackground, errorCode);Lua
setWarningMessage(titleMsg, flags, promptMsg, p3, p4, p5, p6, showBackground, errorCode)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
titleMsg | string | string | string |
flags | int | number | integer |
promptMsg | string | string | string |
p3 | BOOL | boolean | boolean |
p4 | int | number | integer |
p5 | string | string | string |
p6 | string | string | string |
showBackground | BOOL | boolean | boolean |
errorCode | int | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
You can only use text entries. No custom text.
Example: setWarningMessage("t20", 3, "adder", false, -1, 0, 0, true);errorCode: shows an error code at the bottom left if nonzero
Reference
- Namespace
- HUD HUD
- In the game
void SET_WARNING_MESSAGE(const char* titleMsg, int flags, const char* promptMsg, BOOL p3, int p4, const char* p5, const char* p6, BOOL showBackground, int errorCode)- Hash
0x7B1776B3B53F8D74