Log in to reply
 

[C++] What is this function name/native?



  • How can i call in C++ the subtitle function?

    Image:
    alt text



  • @Tarack Three natives:
    BEGIN_TEXT_COMMAND_PRINT
    ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME
    END_TEXT_COMMAND_PRINT

    the GxtEntry for the BEGIN_TEXT_COMMAND_PRINT seems to be "CELL_EMAIL_BCON".

    The next two are pretty straight-forward.

    Source: SHVDN source code.



  • Yes but when i try to use add_text_component_substring_player_name it says not member of namespace UI



  • I tried this code:

    void func_15(char * iParam0) {
    func_1(iParam0);
    UI::_ADD_TEXT_COMPONENT_STRING(iParam0);
    UI::_SET_TEXT_ENTRY_2("EPS8_06");
    UI::_DRAW_SUBTITLE_TIMED(7500, 1);
    }

    but nothing. ( the func_1 is the alternative debug mode, the notification above the radar. its working but the subtitle not.



  • The native has probably been renamed. Check your natives.h



  • The names of natives have changed. _DRAW_SUBTITLE_TIMED is now END_TEXT_COMMAND_PRINT and _SET_TEXT_ENTRY_2 is now BEGIN_TEXT_COMMAND_PRINT. @Tarack


  • MODERATOR

    @Tarack Not sure how you'd do the colors, but what's wrong with just doing this?

    UI.ShowSubtitle ("Go to Covenant Ave", 3000);


  • @meimeiriver That's a ScriptHookVDotNet function, it doesn't apply to C++ unfortunately.



  • Wich native version? My currently version is DRAW_SUBTITLE_TIMED the END_TEXT_COMMAND_PRINT not found.
    Where can i download the NEW sdk (because i download from the website)


  • MODERATOR

    @Tarack Get the latest natives.h from here and replace your current one with the one you just downloaded (in the project folder).



  • Yes. The function is not underlined with red anymore.
    But.. Nothing happens in GTA V when i try to call this with main function.

    Code:

    void func_15(char * iParam0) {
    UI::BEGIN_TEXT_COMMAND_PRINT("STRING");
    UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(iParam0);
    UI::END_TEXT_COMMAND_PRINT(5000,1);
    }

    Why? :)



  • Yes. The function is not underlined with red anymore.
    But.. Nothing happens in GTA V when i try to call this with main function.

    Code:

    void func_15(char * iParam0) {
    UI::BEGIN_TEXT_COMMAND_PRINT("STRING");
    UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(iParam0);
    UI::END_TEXT_COMMAND_PRINT(5000,1);
    }

    Why? :)


  • MODERATOR

    @Tarack Well, show more of your code because you might don't call it properly or something...



  • @Unknown-Modder

    void ScriptMain() {
    func_5(96, -1291, 29, 79);
    func_3();

    }

    void func_3() {
    while (true)
    {
    func_7();
    if (SequenceOne_Started == true ) {
    if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false)) {
    switch (iVar_7) {
    case 0:
    Vector3 iVar_6 = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false);
    if (GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(iVar_6.x, iVar_6.y, iVar_6.z, 96, -1291, 29, true) > 65) {
    iVar_7 += 1;
    func_15("Go to ~y~destination.");
    func_14("CHAR_DEFAULT", "Unknown", "Message", "Assasinate a target! \n Target: Something \nName: Something \nGender: Male");
    break;
    }
    case 1:
    Vector3 iVar_9 = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false);
    if (GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(iVar_6.x, iVar_6.y, iVar_6.z, 96, -1291, 29, true) > 95) {
    iVar_7 += 1;
    func_16(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0));
    break;
    }
    }
    if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 0) {
    }
    }
    else {
    if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 0 ) {

    		   }
    	   }
    	   if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) > 0) {
    	   }
        }
    	WAIT(0);
    }
    WAIT(0);
    

    }

    void func_15(char * iParam0) {
    UI::BEGIN_TEXT_COMMAND_PRINT("STRING");
    UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(iParam0);
    UI::END_TEXT_COMMAND_PRINT(5000,1);
    }

    Here it is. :)


  • MODERATOR

    @Tarack Is func_15() defined at the top of the file or in a header file?



  • But, when i add normal notification to func_15, its working! (Above the radar) but the subtitle is not!
    Yes, i added. Because when i not added, the V.Studio can't export it.



  • I love c++ language, but why? Why isn't working?


  • MODERATOR

    @Tarack I have no idea, this makes literally no sense. If the notification above the map works, then the subtitle one has to work too. Maybe something's wrong with your settings that prevents showing subtitles or idk.



  • I turned on the subtitles, BUT ITS NOT WORKING! WHY? PLEASE SOMEBODY HELP ME :(



  • Above the radar Notification is working perfectly, but THIS IS NOT? But why? :( Anyone?



  • Somebody? My script is almost done, but this function, what i NEED! :) Please


Log in to reply
 

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