Hi, I have a problem when I send a message to all players. After I wrote the message on the keyboard, it opens again as many times as there are players in the session.
I use this:
int i;
for (i = 0; i <= 18; i++)
{
int id = GET_PLAYER_PED(i);
if (id > 0 && id != PLAYER_PED_ID())
{
char *defaultText;
DISPLAY_ONSCREEN_KEYBOARD(TRUE, "FMMC_KEY_TIP8", "", defaultText, "", "", "", 40);
while (UPDATE_ONSCREEN_KEYBOARD() == 0) WAIT(0);
char text[40];
strcpy_s(text, GET_ONSCREEN_KEYBOARD_RESULT());
int NetHandleBuffer = 0x10070200;
NETWORK_HANDLE_FROM_PLAYER(i, &NetHandleBuffer, 13);
NETWORK_SEND_TEXT_MESSAGE(text, &NetHandleBuffer);
print("~b~Sended Message to Lobby", 3000);
}
}
Can somebody help me?
Thanks.
I use this:
int i;
for (i = 0; i <= 18; i++)
{
int id = GET_PLAYER_PED(i);
if (id > 0 && id != PLAYER_PED_ID())
{
char *defaultText;
DISPLAY_ONSCREEN_KEYBOARD(TRUE, "FMMC_KEY_TIP8", "", defaultText, "", "", "", 40);
while (UPDATE_ONSCREEN_KEYBOARD() == 0) WAIT(0);
char text[40];
strcpy_s(text, GET_ONSCREEN_KEYBOARD_RESULT());
int NetHandleBuffer = 0x10070200;
NETWORK_HANDLE_FROM_PLAYER(i, &NetHandleBuffer, 13);
NETWORK_SEND_TEXT_MESSAGE(text, &NetHandleBuffer);
print("~b~Sended Message to Lobby", 3000);
}
}
Can somebody help me?
Thanks.