21.02.2012, 18:07
SA:MP Pictures on Screen
by Partner
List of content- Overview
- Basics
- Examples
- List of Textures
- Vice City R.I.P
- Special thanks
Overview
In this (simple) tutorial, i'm going to teach you how to show SA:MP / GTA San Andreas structured pictures / images.
It is also my first post in SA-MP Forum (in this account). This tutorial is quite simple, there are no any advanced requirements (unless you don't know how to script PAWN). The tutorial very invested, i was working on it 1-2 hours.
Basics
First, those pictures are being shown in textdraws, which makes the code abit longer (as one textdraw require 3-7 functions).
To show a picture in a textdraw, you'll simply need to write the *.txd file, and texture name in this structure:
Код:
LIB:image LIB - The *.txd file (without the .txd) image - The texture name
Simply, In the textdraw text, Put the LIB:image (for example samaps:map, the map) in the text, And change the font to 4. The font '4' is a new font in samp 0.3d that displays textures and not text.
Remember: You can edit the texture size by using the function
Код:
TextDrawTextSize
I'll note again that you'll need to put the texture in the textdraw's text parameter.
See textures list below ("List of textures" section)
Examples
Here's the first example:
pawn Код:
new Text:Map;
Map = TextDrawCreate(25.0, 323.0, "samaps:map"); // LIB:image
TextDrawFont(Map, 4); // Font 4 to show the textures (and not text)
TextDrawTextSize(Map, 120.0, 100.0); // Size, X 120, Y 100, It's the texture size
TextDrawUseBox(Map, 1); // Add it if you want...
This is how the textdraw will be displayed:
And another textdraw, Kind of unopenable admin menu (note the button to open).
pawn Код:
new Text:O;
new Text:Press;
O = TextDrawCreate(72.0, 197.0, "LD_BEAT:circle");
TextDrawFont(O, 4);
TextDrawTextSize(O, 20.0, 20.0);
TextDrawUseBox(O, 1);
Press = TextDrawCreate(20.00, 199.0, "Press to open admin menu");
TextDrawFont(Press, 1);
TextDrawTextSize(Press, 173.0, 245.0);
TextDrawLetterSize(Press, 0.519999 ,1.600000);
TextDrawUseBox(Press, 0);
If you want more skill when making a texture textdraw, Copy my examples to your script and change stuff.
List of textures
This is a small collection (that is most used) from a big collection of the txd files exists.
To track more, use an IMG tool and open *.txd files in the following path:
Код:
SA FOLDER/models/txd/*.txd
Library "samaps":
Код:
samaps:map samaps:gtasamapbit1 samaps:gtasamapbit2 samaps:gtasamapbit3 samaps:gtasamapbit4
Код:
hud:skipicon hud:radar_ZERO hud:radar_WOOZIE hud:radar_waypoint hud:radar_tshirt hud:radar_truck hud:radar_triadsCasino hud:radar_triads hud:radar_Torenoranch hud:radar_TORENO hud:radar_THETRUTH hud:radar_tattoo hud:radar_SWEET hud:radar_spray hud:radar_school hud:radar_saveGame hud:radar_RYDER hud:radar_runaway hud:radar_race hud:radar_qmark hud:radar_propertyR hud:radar_propertyG
Код:
LD_BEAT:chit LD_BEAT:chita LD_BEAT:circle LD_BEAT:circlea LD_BEAT:cring LD_BEAT:cringa LD_BEAT:cross LD_BEAT:crossa LD_BEAT:down LD_BEAT:downa LD_BEAT:downl LD_BEAT:downla LD_BEAT:downr LD_BEAT:downra LD_BEAT:left LD_BEAT:lefta LD_BEAT:right LD_BEAT:righta LD_BEAT:square LD_BEAT:squarea LD_BEAT:triang LD_BEAT:trianga LD_BEAT:up LD_BEAT:upa LD_BEAT:upl LD_BEAT:upla LD_BEAT:upr LD_BEAT:upra
There are also textures of Vice City. I think it's R.I.P textures, or that Rockstar edited these files to make San Andreas.
Because these files are hidden (etc..) i'll give pictures of it.
Код:
outro:outro
Код:
splash1:splash1
Код:
splash2:splash2
There are more textures that aren't relevant right now.
Special thanks
Partner - Writing the whole tutorial.
Unknown russian(?) - Vice City pictures.
****** - Giving me inspiration of subtitles (sections titles font, size etc..) from this thread.