SA-MP Forums Archive
[Tutorial] Custom on-screen textures for SA:MP 0.3.7-DL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Custom on-screen textures for SA:MP 0.3.7-DL (/showthread.php?tid=651543)



Custom on-screen textures for SA:MP 0.3.DL - GRiMMREAPER - 22.03.2018

CUSTOM ON-SCREEN TEXTURES FOR SA-MP 0.3.DL
LAST UPDATED: 05/08/2018
This tutorial will get you up to speed with the newest San Andreas Multiplayer trend: custom made textures on screen!

Dependecies
Magic.TXD
adri1's TDEditor (I linked to version 1.17 as the latest release is broken)
object.dffVirus Total Scan
SA-MP 0.3.7-DL R1 Release
Procedures
  1. Download and install Magic.TXD from GTAGarage.com — linked above.
  2. Download SA-MP 0.3.7-DL R1 release (server and client, extracting and installing respectively) — linked above.
  3. Download object.dff and save it in root folder\models.
  4. Download adri1's TDEditor and follow the instructions — linked above.
  5. Open server.cfg and modify the following lines:
    password changeme # Change the password.
    filterscripts TDE
    plugins sscanf TDE
    Save the file and exit.
  6. Fire up Magic.TXD and once it loads, press CTRL+N to create a new .txd file.
  7. Select "GTA San Andreas" from the "Set" dropdown and give your file a name.


    For the purpose of this tutorial, I'm calling my textdraw file textdrawtest.txd — you may name it anything you want.

    You may then click "Create".
  8. Click the Ins(ert) key or go to Edit > Add and select the image you want to include. I will be using gtaevolution.png. Images must .png!
  9. Set the "Texture Name", click "compressed" and select "DXT3". Make sure "Generate Mipmaps" is checked.
    Note that I named my texture logo_black. Do not forget the name you set for the texture. You can add more images without the need of creating a new .txd file. Just repeat the steps above and give each texture a different name. You may now click CTRL+S or go to File > Save and exit the program.
  10. Go back to root folder\models and open artconfig.txt. You can delete it's content as I did. Once everything has been removed, you can add the following line:
    AddSimpleModel(-1,19379, -2001, "object.dff", "textdrawtest.txd");
  11. You may now launch the server. If the steps above were done correctly, you should see the following lines somewhere in your console:
    [artwork:crc] object.dff CRC = XXXXXXXXXX
    [artwork:crc] textdrawtest.txd CRC = YYYYYYYYYY
  12. Open the SA-MP server browser and add localhost to the favourites. Once in-game, launch TDE by typing /tde in the chat. Proceed by clicking the icon that pops up on the screen. Create a new project a give it a name.
  13. Right click on "New" and select Sprite TextDraw (TXD).
  14. Right click on "Text" and type in the following line:
    mdl-ID:texture_name
    mdl-ID: In artconfig.txt, we set the model ID to -2001. We will use that model ID.
    In Magic.TXD, we set the texture name to logo_black. We'll use that name.

    Therefore, the line should be input like this:
    mdl-2001:logo_black

    You may then click the >> button.




    ... or in video form.
  15. If your textdraw appears disproportionate, you may adjust it's size by clicking the "Size" mode at the bottom bar and left-click + drag the mouse around to adjust the images' proportions. You may also opt between a global or player textdraw.

    Quote:
    Originally Posted by Gammix
    Global textdraws are for all, so you can have changes to it which will be uniform for all players. Only show or hide matters per player (you can see TextDrawShowForPlayer have a playerid param).

    Whereas, player textdraws are per player, the param playerid makes it for a single player! So you can apply changes to them for a single individual.
  16. Once you are done, click Export. The textdraw will export to root folder\scriptfiles\<project-name>.txt and you may use the textdraw however you want!
End
I will help with any queries you may have — post them here or address me through private message. Despite my will to help, make sure you read the tutorial thoroughly as some errors may happen due to not following the steps as described.

All the best.


Re: Custom on-screen textures for SA:MP 0.3.7-DL - Jensenn - 22.03.2018

Nicee


Re: Custom on-screen textures for SA:MP 0.3.7-DL - StrikerZ - 22.03.2018

Damn man I needed this I couldn't figure out the textdraw stuff, thanks a lot dude. + rep


Re: Custom on-screen textures for SA:MP 0.3.7-DL - GRiMMREAPER - 22.03.2018

Thank you, guys — I'm glad I was able to help.


Re: Custom on-screen textures for SA:MP 0.3.7-DL - PaulCrouseVS - 09.04.2018

Wow, fine, like your post, perfect.


Re: Custom on-screen textures for SA:MP 0.3.7-DL - Eduardof077 - 09.04.2018

Damn, Awesome +rep


Re: Custom on-screen textures for SA:MP 0.3.7-DL - Maxandmov - 16.04.2018

Cool thing, lad! Definately love it and a bit less definately going to use it!


Re: Custom on-screen textures for SA:MP 0.3.7-DL - GRiMMREAPER - 19.04.2018

Glad it was useful!


Re: Custom on-screen textures for SA:MP 0.3.7-DL - Stefand - 04.06.2018

I keep getting 0xC0000005 opcodes, any idea how to solve it? Its invalid model code.


Re: Custom on-screen textures for SA:MP 0.3.7-DL - GRiMMREAPER - 04.06.2018

Quote:
Originally Posted by Stefand
Посмотреть сообщение
I keep getting 0xC0000005 opcodes, any idea how to solve it? Its invalid model code.
As anyone else ran across this issue? I haven't had any issues while following the steps indicated in the OP.