Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

casshem

Text Around Radar Ring

Recommended Posts

casshem

Hello there; I'm new to coding and would like to know how you would go about coding the text around your radar like in this picture:

user posted image

 

Thank you very much for helping me out.

Edited by casshem

Share this post


Link to post
Share on other sites
Deji

Step 1: Learn how to draw text.

Step 2: Oh.. there is no step 2...

Share this post


Link to post
Share on other sites
casshem

And how would I learn to read the memory for the information pertaining to my character?

Share this post


Link to post
Share on other sites
Deji

So you don't need help drawing the text, you need help getting the information to draw? Shoulda started with that... What are you coding in? Have you already started the code? If so, please post it.

Share this post


Link to post
Share on other sites
casshem

I'm trying to learn cleo to do this, but all the tutorials I've been sifting through don't deal with displaying character information.

Share this post


Link to post
Share on other sites
Frank.s

Edit: Didn't see your last post before.

What info do you want to get via coding about the player?

Edited by Frank.s

Share this post


Link to post
Share on other sites
casshem

I want to read and draw text information of the player's zone, money, health and armor. I'd like to also get the 'world' time as well. Pretty much everything that I posted in that picture.

Share this post


Link to post
Share on other sites
Frank.s

Ah ok, you'll probably like Sanny Builders Opcode Search Tool (ctrl + alt + 2) icon14.gif

 

 

I want to read and draw text information of the player's zone
You can get the zone names from the info.zon
0154:   actor $PLAYER_ACTOR in_zone 'EASB'  // Easter Basin

 

money
010B: [email protected] = player $PLAYER_CHAR money 

 

health
0226: $6459 = actor [email protected] health

 

armor
04DD: $9594 = actor $PLAYER_ACTOR armour 

 

I'd like to also get the 'world' time as well
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes 

 

Edited by Frank.s

Share this post


Link to post
Share on other sites
casshem

Wow, thanks! I'm going to try and get started on the code and see how it goes.

Share this post


Link to post
Share on other sites
Frank.s

Glad to help. icon14.gif

The first one is a "conditional check" so it's layed out like this:

:ThreadLabel_1000001: wait 0 ms 00D6: if0154:   actor $PLAYER_ACTOR in_zone 'EASB'  // Easter Basin004D: jump_if_false @ThreadLabel_100 //Do something here.

 

Share this post


Link to post
Share on other sites
Ify24

Ok, and now how to draw it ?

Share this post


Link to post
Share on other sites
Deji
Ok, and now how to draw it ?

This is not your topic. moto_whistle.gif

Share this post


Link to post
Share on other sites
Ify24
Ok, and now how to draw it ?

This is not your topic. moto_whistle.gif

So ? Do I need to open new topic for a same question ?

I am just asking... moto_whistle.gif

Share this post


Link to post
Share on other sites
LINK/2012

 

033E: set_draw_text_position 320.0 180.333 GXT 'BJ_PUSH'  // Push045A: draw_text_1number 320.0 155.333 GXT 'ALLRACE' number [email protected]  // ALL RACES WON!~n~~w~$~1~045B: draw_text_2numbers 320.0 390.0 GXT 'TIME' numbers $TIME_MINS $6228  // ~1~:~1~

 

 

 

Share this post


Link to post
Share on other sites
Ify24
033E: set_draw_text_position 320.0 180.333 GXT 'BJ_PUSH'  // Push045A: draw_text_1number 320.0 155.333 GXT 'ALLRACE' number [email protected]  // ALL RACES WON!~n~~w~$~1~045B: draw_text_2numbers 320.0 390.0 GXT 'TIME' numbers $TIME_MINS $6228  // ~1~:~1~

 

Yeah, whit these opcodes you draw text... but how to draw player health ?

Share this post


Link to post
Share on other sites
LINK/2012
033E: set_draw_text_position 320.0 180.333 GXT 'BJ_PUSH'  // Push045A: draw_text_1number 320.0 155.333 GXT 'ALLRACE' number [email protected]  // ALL RACES WON!~n~~w~$~1~045B: draw_text_2numbers 320.0 390.0 GXT 'TIME' numbers $TIME_MINS $6228  // ~1~:~1~

 

Yeah, whit these opcodes you draw text... but how to draw player health ?

 

0226: [email protected] = actor $PLAYER_ACTOR health045A: draw_text_1number 95.0 375.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBER

 

Share this post


Link to post
Share on other sites
Ify24
033E: set_draw_text_position 320.0 180.333 GXT 'BJ_PUSH'  // Push045A: draw_text_1number 320.0 155.333 GXT 'ALLRACE' number [email protected]  // ALL RACES WON!~n~~w~$~1~045B: draw_text_2numbers 320.0 390.0 GXT 'TIME' numbers $TIME_MINS $6228  // ~1~:~1~

 

Yeah, whit these opcodes you draw text... but how to draw player health ?

 

0226: [email protected] = actor $PLAYER_ACTOR health045A: draw_text_1number 95.0 375.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBER

 

Thanks, but it draws 149 and when I loss health its stil 149...

Share this post


Link to post
Share on other sites
Silent

Thought about looping it?

Share this post


Link to post
Share on other sites
casshem

Did you figure out how to get it to update?

Share this post


Link to post
Share on other sites
Ify24

Yes.

Whit looping.

Share this post


Link to post
Share on other sites
casshem

 

:Health0342: enable_text_draw_centered 1033F: set_text_draw_letter_size 0.4 1.1081C: draw_text_outline 1 RGBA 0 0 0 2550340: set_text_draw_RGBA 255 255 255 255 0226: [email protected] = actor $PLAYER_ACTOR health045A: draw_text_1number 35.0 335.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBERJump @Health:Armor0342: enable_text_draw_centered 1033F: set_text_draw_letter_size 0.4 1.1081C: draw_text_outline 1 RGBA 0 0 0 2550340: set_text_draw_RGBA 255 255 255 255 0226: [email protected] = actor $PLAYER_ACTOR armour045A: draw_text_1number 154.0 335.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBERJump @Armor

 

 

Okay, that's what I have so far for HP and Armor, but I'm not sure if: 1. I have to use @164 for HP and 2. @165 is okay for Armor. Also, if I just paste that into a .cs file, it won't run, right? Could I just put this at the beginning of the script to make it run:

 

 

gosub @Health gosub @Armor

 

Edited by casshem

Share this post


Link to post
Share on other sites
LINK/2012

Ok, reedited

 

It should work, but put a variable below of [email protected]

 

and instead of a jump put a return:

 

:LOOPwait 0gosub @Healthgosub @Armorjump @LOOP:Health0342: enable_text_draw_centered 1033F: set_text_draw_letter_size 0.4 1.1081C: draw_text_outline 1 RGBA 0 0 0 2550340: set_text_draw_RGBA 255 255 255 2550226: [email protected] = actor $PLAYER_ACTOR health045A: draw_text_1number 35.0 335.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBERreturn:Armor0342: enable_text_draw_centered 1033F: set_text_draw_letter_size 0.4 1.1081C: draw_text_outline 1 RGBA 0 0 0 2550340: set_text_draw_RGBA 255 255 255 2550226: [email protected] = actor $PLAYER_ACTOR armour045A: draw_text_1number 154.0 335.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBERreturn

 

 

 

Make sure if it's not writing various texts, if yes, remove it before update.

You can do too a system to update only if the values change.

Edited by Link2012

Share this post


Link to post
Share on other sites
casshem

Very awesome of you! Thank you very much mate biggrin.gif I'll work on the money and time thing, which should be easy if it follows the format I used for Armor and HP.

 

[Edit]: This doesn't work at all

 

 

:[email protected] = Player.Money($PLAYER_CHAR)0342: enable_text_draw_centered 1 033F: set_text_draw_letter_size 0.4 1.1 081C: draw_text_outline 1 RGBA 0 0 0 255 0340: set_text_draw_RGBA 255 255 255 255 045A: draw_text_1number 400.0 300.0 GXT 'NUMBER' number [email protected]  // ~1~return 

 

 

This also just crashes SA:MP on startup:

 

 

:LOOPwait 0gosub @Healthgosub @Armorjump @LOOP:Health0342: enable_text_draw_centered 1033F: set_text_draw_letter_size 0.4 1.1081C: draw_text_outline 1 RGBA 0 0 0 2550340: set_text_draw_RGBA 255 255 255 2550226: [email protected] = actor $PLAYER_ACTOR health045A: draw_text_1number 35.0 335.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBERreturn:Armor0342: enable_text_draw_centered 1033F: set_text_draw_letter_size 0.4 1.1081C: draw_text_outline 1 RGBA 0 0 0 2550340: set_text_draw_RGBA 255 255 255 2550226: [email protected] = actor $PLAYER_ACTOR armour045A: draw_text_1number 154.0 335.0 GXT 'NUMBER' number [email protected]  // 'NUMBER' GXT Entry is "~1~". So in GXT Text '~1~' means NUMBERreturn

 

Edited by casshem

Share this post


Link to post
Share on other sites
DK22Pac
{$CLEO}0000:while true   wait 0   if       player.Defined(0)   then       0226: [email protected] = actor $3 health       0226: [email protected] = actor $3 armour       03F0: enable_text_draw 1        0342: enable_text_draw_centered 1       033F: set_text_draw_letter_size 0.4 1.1       081C: draw_text_outline 1 RGBA 0 0 0 255       0340: set_text_draw_RGBA 255 255 255 255       045A: draw_text_1number 35.0 335.0 GXT 'NUMBER' number [email protected]       045A: draw_text_1number 154.0 335.0 GXT 'NUMBER' number [email protected]   endend

 

Share this post


Link to post
Share on other sites
Silent

@DK22Pac

Unlike EXE draws, SCM ones reset the data after the draw, so you should make it like that instead:

 

 

{$CLEO}0000: DRAWS  while true   wait 0   if       player.Defined(0)   then       0226: [email protected] = actor $3 health       0226: [email protected] = actor $3 armour       03F0: enable_text_draw 1        0342: enable_text_draw_centered 1       033F: set_text_draw_letter_size 0.4 1.1       081C: draw_text_outline 1 RGBA 0 0 0 255       0340: set_text_draw_RGBA 255 255 255 255       045A: draw_text_1number 35.0 335.0 GXT 'NUMBER' number [email protected]       0342: enable_text_draw_centered 1       033F: set_text_draw_letter_size 0.4 1.1       081C: draw_text_outline 1 RGBA 0 0 0 255       0340: set_text_draw_RGBA 255 255 255 255       045A: draw_text_1number 154.0 335.0 GXT 'NUMBER' number [email protected]   endend

 

 

Also, nice idea to not use $PLAYER_ACTOR, but it won't help much if SCM has actor handle on different var.

Share this post


Link to post
Share on other sites
DK22Pac

@Silent

You mean that .exe can change that values when it draws some from TextSprites elements? But there no "wait"s between these two "scm" drawers.

And $PLAYER_ACTOR means it will always compile it as $3, until you change it in settings files.

Share this post


Link to post
Share on other sites
Silent

If I remember well, SCM text drawers reset its style after they're drawed.

Share this post


Link to post
Share on other sites
casshem

Thank you guys SOOOOO much! The mod is really coming along fellas, but I need help with this bit:

 

 

045A: draw_text_1number 35.0 335.0 GXT 'NUMBER' number [email protected]  // ~1~

 

 

How do I draw a dollar sign before [email protected] get drawn so it becomes $~1~???

 

user posted image

 

user posted image

 

user posted image

Edited by casshem

Share this post


Link to post
Share on other sites
Deji

Use DOLLAR instead of NUMBER. DOLLAR is $~1~ in the GXT, so it's only obvious.

Share this post


Link to post
Share on other sites
casshem

Two questions now:

 

1.

How would I call up the zone text? I'm a bit confused by:

 

0154:   actor $PLAYER_ACTOR in_zone 'EASB'  // Easter Basin

 

 

2.

How would I make it so that all the text disappears or is toggled off when you press f10?

 

 

Here's what I have so far biggrin.gif:

 

user posted image

Edited by casshem

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.