Jump to content

SET_TEXT_SCALE


Native Details

  • NameSET_TEXT_SCALE
  • NamespaceHUD
  • Native Hash0x4170B650590B3B00
  • Typeint
  • First seen version1207

Native Parameters

  • Parameter 0float scale
  • Parameter 1float size

DESCRIPTION

 Example in C# Function to create text in the screen. By: Hayden Almeida and Thanks to key_value.

// C# in Client script
public static void DrawScaleText(string text, int fonte, float x, float y, float size, int cor_red, int cor_green, int cor_blue, int Alpha, bool centralizado)
{
    float xc = x / 1920; // ScreenWidth
    float yc = y / 1080; // ScreenHeight
    API.SetScriptGfxDrawOrder(3);
    API.SetTextScale(size, size);
    Function.Call(Hash.SET_TEXT_CENTRE, centralizado); // centralized
    API.SetTextColor(cor_red, cor_green, cor_blue, Alpha); // COLOR: R G B Alpha
    Function.Call((Hash)0xADA9255D, fonte); // FONTS 0 to 20. 
    Function.Call(Hash._DISPLAY_TEXT, Function.Call<long>(Hash._CREATE_VAR_STRING, 10, "LITERAL_STRING", text ?? "N/A"), xc, yc);
    API.SetScriptGfxDrawOrder(3);
}

 



User Feedback

Recommended Comments

TrainIsSpooked

Posted

I have an error for this, is there anyway I can fix it? I don't know a lot of coding, only a bit of C#

Cyan

Posted

This native was removed in b1436 -- we'll update the native DB soon to indicate removed natives.

Some people have reported the latest version of Scripthook RDR2 remaps this native, but I am not sure.

Using LMS' ASI loader will restore this native:

 

 



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Red Dead Redemption 2 Native Database by www.mod-rdr.com, includes contributions by gudmunduro and alloc8or.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...