SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 22/03/2018, 01:05 PM   #1
GRiMMREAPER
Huge Clucker
 
GRiMMREAPER's Avatar
 
Join Date: Jan 2018
Posts: 229
Reputation: 54
Default Custom on-screen textures for SA:MP 0.3.DL

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.dff Virus 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.

Last edited by GRiMMREAPER; 05/08/2018 at 08:35 AM.
GRiMMREAPER is offline   Reply With Quote
Old 22/03/2018, 01:47 PM   #2
Jensenn
Big Clucker
 
Jensenn's Avatar
 
Join Date: Apr 2014
Location: PAWN Coder
Posts: 101
Reputation: 4
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Nicee
__________________


Last edited by Jensenn; 23/07/2018 at 01:43 AM.
Jensenn is online now   Reply With Quote
Old 22/03/2018, 01:59 PM   #3
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: India
Posts: 1,123
Reputation: 154
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Damn man I needed this I couldn't figure out the textdraw stuff, thanks a lot dude. + rep
__________________
StrikerZ is offline   Reply With Quote
Old 22/03/2018, 02:01 PM   #4
GRiMMREAPER
Huge Clucker
 
GRiMMREAPER's Avatar
 
Join Date: Jan 2018
Posts: 229
Reputation: 54
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Thank you, guys — I'm glad I was able to help.
GRiMMREAPER is offline   Reply With Quote
Old 09/04/2018, 03:30 AM   #5
PaulCrouseVS
Little Clucker
 
PaulCrouseVS's Avatar
 
Join Date: Jan 2018
Location: Buenos Aires
Posts: 36
Reputation: 5
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Wow, fine, like your post, perfect.
PaulCrouseVS is offline   Reply With Quote
Old 09/04/2018, 04:00 AM   #6
Eduardof077
Little Clucker
 
Join Date: Jan 2017
Location: Heaven
Posts: 33
Reputation: 42
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Damn, Awesome +rep
__________________
Join with us!
Forum: http://mf-samp.com
Discord: https://discord.gg/pRZvKDK
Eduardof077 is offline   Reply With Quote
Old 16/04/2018, 12:34 PM   #7
Maxandmov
Big Clucker
 
Maxandmov's Avatar
 
Join Date: Feb 2011
Location: Moscow, Russia.
Posts: 153
Reputation: 11
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Cool thing, lad! Definately love it and a bit less definately going to use it!
__________________
Give me rep, SAMPercluckers! (As long as I deserve it)
Maxandmov is offline   Reply With Quote
Old 19/04/2018, 08:54 AM   #8
GRiMMREAPER
Huge Clucker
 
GRiMMREAPER's Avatar
 
Join Date: Jan 2018
Posts: 229
Reputation: 54
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Glad it was useful!
GRiMMREAPER is offline   Reply With Quote
Old 04/06/2018, 07:41 AM   #9
Stefand
Gangsta
 
Stefand's Avatar
 
Join Date: Sep 2011
Location: The Netherlands
Posts: 779
Reputation: 27
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

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


Scripter & Mapper
_______________________
Stefand is offline   Reply With Quote
Old 04/06/2018, 09:56 AM   #10
GRiMMREAPER
Huge Clucker
 
GRiMMREAPER's Avatar
 
Join Date: Jan 2018
Posts: 229
Reputation: 54
Default Re: Custom on-screen textures for SA:MP 0.3.7-DL

Quote:
Originally Posted by Stefand View Post
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.
__________________
GRiMMREAPER is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Object Textures? XtremeRz SA-MP 0.3.DL 1 07/02/2018 09:15 AM
How can i make custom textures? GTLS Scripting Help 3 18/05/2015 05:44 PM
[Question] Custom textures Chale4tee7 Scripting Help 0 05/11/2013 05:51 PM
Custom textures Darien Scripting Help 4 03/04/2012 07:47 PM
How to add custom textures in SA-MP int3s0 Screenshots and Videos 1 06/08/2011 09:16 PM


All times are GMT. The time now is 10:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.