Mission Coding for Dummies - Texts

A Tutorial for Grand Theft Auto: San Andreas

SEX! Ok, we got your attention. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Arman Ossi Loko points.
  • Post: Give Arman Ossi Loko your thoughts on this Tutorial.
  • Vote: Help Arman Ossi Loko win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Sound fun?

Sign up

Already a Bananite? Login

Texts In this tutorial we will look into texts. There are all sort of texts: big, small, bold, colored... Display Text CODE 00BA: show_text_styled GXT 'BEEFY' time 3000 style 1 You have to use the name of the GXT entry between the ''. Behind time you have to put the amount of time which the text needs to be displayed. There are 7 styles, which you can fill in behind style: 1: In the middle, just like when you passed a mission or won a race. 2: At the bottomright, just like when you start a mission. 3: White text in the middle, just like when you are wasted or busted. 4: Style 1, but then smaller. 5: Same as style 4, but a bit higher on the screen. 6: Small white text in the middle of the screen. 7: Light blue text on top of the screen. Beware, 0 isn't a style, and the game will crash! White text along the bottom of the screen is displayed using other opcodes. There is a difference between highpriority and lowpriority opcodes. The highpriority will replace the lowpriority. For example: CODE 00BB: show_text_lowpriority GXT 'IE23' time 3000 flag 1 wait 1000 00BC: show_text_highpriority GXT 'MTIME3' time 3000 flag 1 So here 'IE23' will first be displayed, but after 1 second it will be replaced by 'MTIME3'. You can clear the texts with the following opcodes: CODE 00BE: text_clear_all 03D5: remove_text 'MTIME3' Display texts with number CODE 01E3: show_text_1number_styled GXT 'BB_15' number 500 time 5000 style 1 With this opcode you can add a number to the text. In this case, your new high score will be 500. The styles are exactly the same as mentioned above. But be ware: you have to use gxt entries that are compatible with numbers! I will get back on this in the following tutorial, when we are going to add new texts. There are more opcodes about this. I think they will speak for itself: CODE 01E4: show_text_1number_lowpriority GXT 'HJ_IS' number $var time 2000 flag 1 036D: show_text_2numbers_styled GXT 'TX_SEQ' numbers $var $var2 time 5000 style 5 02FD: show_text_2numbers_lowpriority GXT 'BB_05' numbers $var $var2 time 5000 flag 1 02FF: show_text_3numbers GXT 'WHEEL02' numbers $var $var2 $var3 time 3000 flag 1 0302: show_text_4numbers GXT 'WHEEL01' numbers $var $var2 $var3 $var4 time 3000 flag 1 0303: show_text_4numbers_highpriority GXT 'QUAR_P6' numbers $var $var2 $var3 $var4 time 10000 flag 1 0308: show_text_6numbers GXT 'HJSTAT' numbers $var $var2 $var3 $var4 $var5 time 5000 flag 5 Display text boxes CODE 03E5: show_text_box 'HELP101' This is the 'normal' textbox. It will disappear after some time. A textbox is a black square in the left upper corner with white letters. CODE 0512: show_permanent_text_box 'HOSP_1' This is a permanent text box, so it will be displayed until an opcode is executed which removes it. That is the following opcode: CODE 03E6: remove_text_box For example: CODE 0512: show_permanent_text_box 'HOSP_1' wait 1000 03E6: remove_text_box With this opcode you will display a text box, and will remove it after 1 second. CODE 0513: show_text_box_1number 'SLOT_02' number 2 This is an opcode for a text box with a number in the text, in this case the value 2. There are three opcodes which check if the text box exist: CODE 0A2A: text_box 'SGPUNT' displayed 08FE: text_box_displayed 88FE: not text_box_displayed CODE 0989: set_text_boxes_width 500 With this opcode, you can edit the width of the textbox. To see the difference, you can use the code below: CODE 0512: show_permanent_text_box 'HOSP_1' wait 1000 0989: set_text_boxes_width 500 Drawn Textes CODE 033E: set_draw_text_position 300.0 200.0 GXT 'BJ_PUSH' This is an example of a drawn text. You can give it the position you want, by editing the 300.0 and the 200.0. The 300.0 is horizontal, the 200.0 is vertical. A drawn text is normally a small white text. But you can change this with the opcodes 133F and 1340. You can only remove it with the following code: CODE 03F0: enable_text_draw 0 You can also make a drawn text with numbers: CODE 045A: draw_text_1number 320.0 155.333 GXT 'WINNER' number 1000 045B: draw_text_2numbers 320.0 390.0 GXT 'TIME' numbers 20 30 I think these codes speak for itself. Other text opcodes CODE 0A19: display_zone_text 'MARKS' With this opcode you can display a text just like the ones when you enter a zone. For example Saint Mark's. CODE 09C1: add_next_text_to_brief_history 1 With this opcode you can add a text to "brief" in main menu, so a player can look back. A 1 means that it has to be stored in the brief option, 0 means that it doesn't have to. You have to put this code before the opcode which you are using to display texts. For example: CODE 09C1: add_next_text_to_brief_history 1 00BB: show_text_lowpriority GXT 'IE23' time 3000 flag 1 When you want to see an example of a text in a short mission, you can look to the previous tutorial, which contains an application of the texts.

Posts

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Authors
Dutchy3010

Submitter

Arman Ossi Loko avatar
Arman Ossi Loko avatar Lurkin'
Admin Joined 10y
71,925 points Ranked 56th
63 medals 9 legendary 16 rare
  • GTAV First Adopter Medal icon
  • Submitted 15 Tools Medal icon
  • Submitted 30 Tutorials Medal icon
  • 1st place - 2015 Uberstyles Contest Medal icon
  • Achieved Admin clearance Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon

Arman Ossi Loko avatar
Arman Ossi Loko
KOPASSUS Incorporated Flag
KOPASSUS Incorporated

Redistributor
Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Details

Difficulty Level
Beginner Difficulty

Attributes

Stats

Posts
1
Views
2,961
Date Added
5y
Date Modified
4y
bcp.crwdcntrl.net tracking pixel