[Tutorial] SA:MP Images usage, list and usage.
#1

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
How to put it in a textdraw?

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 will create a textdraw, shows San Andreas map, on the radar, (blocks the radar)
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);
See the screenshot:



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
And put the texture in the structure shown in "Basics" section.

Library "samaps":
Код:
samaps:map
samaps:gtasamapbit1
samaps:gtasamapbit2
samaps:gtasamapbit3
samaps:gtasamapbit4
Library "hud":
Код:
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
Library "LB_BEAT":
Код:
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
Vice City R.I.P

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
Picture:





Код:
splash1:splash1
Picture:




Код:
splash2:splash2
Picture:


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.
Reply
#2

Nice?
Reply
#3

Thanks?
Reply
#4

Nice
Reply
#5

HOly yeah !! i almost forgot about that rip one inside loadsc shit |
thanks for reminding , Kewl!!
Reply
#6

Quote:
Originally Posted by Michael@Belgium
Посмотреть сообщение
Nice
Thanks man!

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
HOly yeah !! i almost forgot about that rip one inside loadsc shit |
thanks for reminding , Kewl!!
Yeah, You welcome
Reply
#7

I could never guess i'll get 25 reputation from that tutorial... Thank you everybody really!
Reply
#8

Is Very Good !!!! Nice !!
Reply
#9

Awsome!Thank you.
Reply
#10

I was looking for a tutorial like this, thank you.
Reply
#11

NYC tutorial
Reply
#12

You can open images from url?
Reply
#13


*cough* I use a PS3 controller. You owe me a million dollars. Pay up.
Reply
#14

Quote:
Originally Posted by Host-samp
View Post
Is Very Good !!!! Nice !!
Thanks!

Quote:
Originally Posted by fadhilkab
View Post
Awsome!Thank you.
Thanks!

Quote:
Originally Posted by Guitar
View Post
I was looking for a tutorial like this, thank you.
Happy I helped, thanks!

Quote:
Originally Posted by Shabi RoxX
View Post
NYC tutorial
Nice*. Thanks!

Quote:
Originally Posted by LuisGraph
View Post
You can open images from url?
You can't open images from url as the texture usage using GTA San Andreas files.
You might download pictures and add them to the game, but you're the only one who's going to see it.
Maybe, in latest versions of sa-mp, we will be able to load pictures from url, because we are able to load songs from url.

Quote:
Originally Posted by MP2
View Post

*cough* I use a PS3 controller. You owe me a million dollars. Pay up.
Sure, come to my server and I'll /givemoney MP2 1000000
Reply
#15

nice tut!! i was wondering how you do that!.

how can I look and find the images in the models folder myself?
is there an app for samp or will I have to use some generic .txd program
and how will i know the lib:name for the files I want?

edit:

nvm i found something, after some heavy ****** searching!
Reply
#16

give me my 1,000,000
Reply
#17

Thanks, this comes in handy for me
Are there any of those .txd's for peds?
So I can for example: Put an image of the most wanted target on the side of everyones screen...
Reply
#18

How can i open .txt files and see them like picture ??
Reply
#19

But if i created a .txd and putted in Gta san andreas\SAMP,the players will see it?
Reply
#20

Quote:
Originally Posted by mevi
View Post
give me my 1,000,000
No.

Quote:
Originally Posted by [MNC]Azz
View Post
Thanks, this comes in handy for me
Are there any of those .txd's for peds?
So I can for example: Put an image of the most wanted target on the side of everyones screen...
Not really. But you can create textdraws that will describe the skin of the player...

Quote:
Originally Posted by Marko Koprivanac
View Post
How can i open .txt files and see them like picture ??
File converter / Right Click > Open with

Quote:
Originally Posted by calin1996
View Post
But if i created a .txd and putted in Gta san andreas\SAMP,the players will see it?
No, unless the players has the exact file with the exact name.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)