Log in to reply
 

How can i make the player receive a text message in my c# script?



  • Hi i wanted to make a script that involves you receiving a msg from Lester but the function i found just crashes the game Function.Call(Hash.NETWORK_SEND_TEXT_MESSAGE, "HI", 64);
    Any ideas?



  • You're modding for GTAO? If so you're probably better off on Fivem forums. I mean network function, or does that also apply to SP.?



  • @JohnFromGWN I'm modding SP
    Trying to make a Text message from your ingame phone to show up



  • @M8T not familiar with that function but 64 is not who you are sending the message to, right? 64 is the maximum number of characters. I would've suggested to try game.player.character but the last parameter is an int*.?

    Check out other functions with handle, for example
    NETWORK::NETWORK_GET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU

    NETWORK_HANDLE_FROM_PLAYER(Player player, int* networkHandle, int bufferSize) // 0x388EB2B86C73B6B3 0xD3498917 b323

    Returns a handle to networkHandle* from the specified player handle and stores it in a given buffer.

    • Currently unknown struct

    Example:
    std::vector GetPlayerNetworkHandle(Player player) {
    const int size = 13;
    uint64_t *buffer = std::make_unique(size).get();
    NETWORK::NETWORK_HANDLE_FROM_PLAYER(player, reinterpret_cast(buffer), 13);
    for (int i = 0; i < size; i++) {
    Log::Msg("networkhandle[%i]: %llx", i, buffer[i]);
    }
    std::vector result(buffer, buffer + sizeof(buffer));
    return result;
    }

    But i really feel this is MP online.



  • MP functions won't work when offline. The closest you're going to get to a text message from Lester is just a notification:

    GTA.UI.Notification.Show(NotificationIcon.Lester, "Lester", "your subject", "your message", false, false);

Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.