I have this code but the message is not erased how can I solve it?
void ShowSubtitle(char* Text)
{
UI::_SET_TEXT_ENTRY_2("STRING");
UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(Text);
UI::_DRAW_SUBTITLE_TIMED(1500, 1);
}
unsigned int giveweaponstest(unsigned int r3, unsigned int senderData, unsigned int recieverData, unsigned int r6, unsigned int r7, unsigned int r8, unsigned int r9)
{
int addressOfArgs = r3 + 10 * 0x4;
char *senderName = (char*)(*(int*)(senderData + 0x78) + 0x10);
if (addressOfArgs)
{
snprintf(scriptEventText, sizeof(scriptEventText), "Tried to give weapons %s...", senderName);
ShowSubtitle(scriptEventText);
*(int*)addressOfArgs = 0;
}
}
void ShowSubtitle(char* Text)
{
UI::_SET_TEXT_ENTRY_2("STRING");
UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(Text);
UI::_DRAW_SUBTITLE_TIMED(1500, 1);
}
unsigned int giveweaponstest(unsigned int r3, unsigned int senderData, unsigned int recieverData, unsigned int r6, unsigned int r7, unsigned int r8, unsigned int r9)
{
int addressOfArgs = r3 + 10 * 0x4;
char *senderName = (char*)(*(int*)(senderData + 0x78) + 0x10);
if (addressOfArgs)
{
snprintf(scriptEventText, sizeof(scriptEventText), "Tried to give weapons %s...", senderName);
ShowSubtitle(scriptEventText);
*(int*)addressOfArgs = 0;
}
}