Quantcast

Jump to content

» «
Photo

Scripthook .Net Key Icons

5 replies to this topic
JebediahKerman
  • JebediahKerman

    Player Hater

  • Members
  • Joined: 14 Jan 2014

#1

Posted 14 January 2014 - 05:22 PM

Hey, I am wondering if It would be possible to display a Key Icon like the [F] when you are near your bed in the DrawText() method. I know that you can call a Native to Display such Icons but this Native is basically just the Game.DisplayText() method without all the advantages of the DrawText() method.

 

So my question is, is there a way to display those inside the DrawText()? If not I could use the DrawSprite but than I would have to position It all manually.


AgentWD40
  • AgentWD40

    GLITCHED

  • Members
  • Joined: 02 May 2009
  • Philippines

#2

Posted 14 January 2014 - 07:48 PM Edited by hardsty1e, 14 January 2014 - 07:49 PM.

list of icons

https://sites.google...my/x-gxt-editor

Game.DisplayText("Press ~F~");

JebediahKerman
  • JebediahKerman

    Player Hater

  • Members
  • Joined: 14 Jan 2014

#3

Posted 15 January 2014 - 03:42 PM

Yes I know that you can do it in the DisplayText method but I want to position the Text change the Font so I have to use the DrawText method inside GTA.Graphics.


AgentWD40
  • AgentWD40

    GLITCHED

  • Members
  • Joined: 02 May 2009
  • Philippines

#4

Posted 15 January 2014 - 06:08 PM Edited by hardsty1e, 15 January 2014 - 06:26 PM.

oh ok, maybe you can use

SET_TEXT_FONT(0);
DISPLAY_TEXT_WITH_LITERAL_STRING(x, y, "STRING", val);

JebediahKerman
  • JebediahKerman

    Player Hater

  • Members
  • Joined: 14 Jan 2014

#5

Posted 16 January 2014 - 04:15 PM

What do you mean with this? If I call them as natives I get weird flickering issues when using SET_TEXT_FONT(0) and I don't know which type x and y are? I'm used to work with floats but if I set them at 0.5f, 0.5f I don't see anything. Maybe It's just becaus I don't work with natives all that much. I'm calling them like so:

GTA.Native.Function.Call("SET_TEXT_FONT", 0);
GTA.Native.Function.Call("DISPLAY_TEXT_WITH_LITERAL_STRING", 0.5f, 0.5f, "Test", 1);

I also don't know what val is and I used "STRING" as the Input String which is false I think. Is there a way to list all the natives so I could look them up?


AgentWD40
  • AgentWD40

    GLITCHED

  • Members
  • Joined: 02 May 2009
  • Philippines

#6

Posted 16 January 2014 - 05:28 PM Edited by hardsty1e, 17 January 2014 - 10:22 AM.

I'm not sure about this native, you'll have to play around with it.

 

native list - http://www.gtamodding.com/index.php?title=List_of_native_functions

 

the native parameters might have 5 instead of 4.

http://www.gtamoddin...TEXT_WITH_FLOAT gtamodding.com says 4...

DISPLAY_TEXT_WITH_FLOAT( X, Y, "Test", heading, 0);
static void DisplayTextWithFloat(f32 x, f32 y, const ch *gxtName, f32 value, u32 unknown) { NativeInvoke::Invoke<ScriptVoid>("DISPLAY_TEXT_WITH_FLOAT", x, y, gxtName, value, unknown); }





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users