[ #D~ Tools ] Textdraw & Sprite Editor!

Started by DizzasTeR, Apr 23, 2015, 07:40 AM

Previous topic - Next topic

DizzasTeR

Textdraw & Sprite Editor - #D~ Tools

How's it goin' fellas? Well lately most of you guys know I got alot of work with sprites and textdraws in my server, and I'm almost not that good at getting the correct screen cordinates, which makes me use execute command for several minutes trying to perfectly fit the textdraw/sprite a day after I thought to implement something with which I can place the textdraw or sprite easily and ended up with these.

Textdraw Editor

So as the header says, the first filterscript is the Textdraw editor which I am going to discuss, its simple and very easy to use and create some smexy texdraws with your needs of placement!

When running this filterscript, after you have spawned, you can use the following commands:-

/td or /createtext

This command is used to create a textdraw, for instance /td Empire Gaming will create a textdraw on the top left "Empire Gaming"

IMPORTANT: When creating textdraw make sure you type the message/text in inverted comas ( "Your text here" ). This will surely create text in inverted comas but later at the time of saving you will get a correct output, if "" is not used then the output will still be okay but the text will not be outputted as a string and you will have to do it manually

/color

When you have created a textdraw and you are playing with it, positioning it, this feature allows you to color your textdraw, Colors are built in the script, so if you want more you will have to correctly follow the same steps in the script to add more colors. Currently it has Red, Green, Blue, Yellow.

Syntax: /color red

► Keys

Up | Down | Left | Right to position the textdraw on the screen
Press 1 to enable speed mode, with this  you can move textdraw more faster, pressing it again will disable it.
Del key to delete the textdraw you are already holding!. That means if the textdraw is not saved yet and you are working with it, this will work, once saved you can't remove that with any ingame command, since when would you create a textdraw and delete it ingame anyway? you can just skip that from the output.

► Backspace

Position your textdraw, color it and when its all done just press Backspace and you have your textdraw output on console as well as in Textdraw.ini

Sprite Editor

Pretty much the same as above, the controls for this is also the same but the creation method is a little different.

► Creating sprite ingame

To create a sprite use /cs or /createsprite.

IMPORTANT: When creating sprite make sure you type exactly the same image name which is stored in the store/sprites/ folder, giving wrong name won't do anything much, but you will just get a message sprite created but nothing on screen you will have to use Del key to delete it then.

Example:Having a sprite in store/sprites/logo.png
Command:/cs logo.png

Hope you got it!

► Sprite

After you have positioned your sprite, you can also set its alpha/transparency.

► Setting transparency / Alpha of sprite

This can be done after you create sprite, pressing the Page Up key will increase alpha & Page Down will decrease it, simple!

Note: Both of these filterscripts after creating the textdraw or sprite set them relative to all, this means while you are positioning it, its relatively positioned but, I haven't added that in output just cuz I forgot to, got reminded while posting this but anyway!

► Saving

Important: The saving method is the same, press Backspace and you will get output on console + in Sprites.ini but remember the name of the sprite lacks the inverted comas "" that means if you directly copy and paste it into your main script, it won't work, So all you have to do is just add "" to the main name of the sprite so it has its proper string type.

You guys can do at-least that much eh?

Anyways that's all, These were specially made for saving time & released to help you guys out with the time as well, and help those who can't just position it manually or whatever!

Upcoming Tools

- Map Editor! - Mapping in-game is alot more easier than ever!

Upcoming Updates For Sprites Editor

- Rotation! - The next update for sprites editor will include a rotation mode, when enabled you will have the ability to rotate sprites and save their output!









Download: Editor Tools pack

Notice: Don't forget to use all the latest plugins and server application.

101th Post woot!
Happy scripting,
Regards!

DeViL_JiN


MacTavish

Hey guys is there any way to get the id and position of non-custom objects like trees etc
I am unable to use map editor because when mapeditor is open the gtavc.exe doesnt work

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

DeViL_JiN

Quote from: Beztone on Apr 23, 2015, 09:16 AMHey guys is there any way to get the id and position of non-custom objects like trees etc
I am unable to use map editor because when mapeditor is open the gtavc.exe doesnt work
no it is not possible but you can load all the scenes from map editor and click on any object you will get the position + id.
and there is another way of finding objects id but I don't think this is the right place to talk.

EK.IceFlake


DizzasTeR

Quote from: NE.CrystalBlue on Apr 23, 2015, 11:56 AMOh no the map editor is my id!

There is going to be a huge difference between your and my map editor.

EK.IceFlake

Quote from: Doom_Killer on Apr 23, 2015, 12:24 PM
Quote from: NE.CrystalBlue on Apr 23, 2015, 11:56 AMOh no the map editor is my id!

There is going to be a huge difference between your and my map editor.
I hope so...

Sebastian

Finally...
This will help a lot of people. :)

You had to record a video for it, though. :D

DizzasTeR

Quote from: FinchDon on May 16, 2015, 09:25 AMfirst i was facing error of .ini file now when i download ini plugins and do /td sasdsad and do backspace its does not save and eror on console is WriteIniString does not exist and line
WriteIniString( "Textdraw.ini", "Textdraws", "", "CreateTextdraw( " + pData[ player.ID ].string + ", " + x + ", " + y + ", 0x" + pData[ player.ID ].Col + " );" );

I don't give a shit.

Thijn

Quote from: FinchDon on May 16, 2015, 12:03 PMwhat?
You always have simple problems which you can't fix yourself and fail to search for on the forum. Maybe it's time for you to realize your brain is not smart enough to get yourself your own server. That's fine though, you can still play at any other 0.4 servers. Just not your own.

MacTavish

But Thijn last time when i was working with WriteIniString then i noticed that this function doesnt creating an .ini file its just post an error instead "unable to open Objects.ini" dont know it has been fixed or not ( not tested again ), In 0.3 this Auto creates the ini if there was no in founded..

And @FinchDon if you dont have Textdraw.ini in your server folder then manually create it by notepad.

Open Notepad and press Space once
Click saveas., then writename Textdraw.ini & select format "all types" then click save and put that file in your server

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

MacTavish

Have you tried?

CreateTextdraw( "Fuck", 90, 150, 0xFFFFFFFF );

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

.

Quote from: FinchDon on May 16, 2015, 03:47 PMIts say on console the index Fuck does not exist

I'll just leave the computer for a bit. I promised to go outside and take some air whenever an index error pops up. I'll be back.
.

DizzasTeR

Quote from: FinchDon on May 16, 2015, 04:02 PMi add this onmy scriptload
its say the index Fuck does not exist

You are mentally f**ked up you know? Do you f**ing care to read the whole post? NO

Quote from: Doom_Killer on Apr 23, 2015, 07:40 AMIMPORTANT: When creating textdraw make sure you type the message/text in inverted comas ( "Your text here" ). This will surely create text in inverted comas but later at the time of saving you will get a correct output, if "" is not used then the output will still be okay but the text will not be outputted as a string and you will have to do it manually

DizzasTeR

Quote from: FinchDon on May 17, 2015, 08:01 AMi add this on server scriptload
CreateTextdraw( "Fuck", 90, 150, 0xFFFFFFFF );

No error on console but when i go to server no textdraw has been shown

local Retard_Finch = CreateTextdraw( "Fuck", 90, 150, 0xFFFFFFFF );

function onPlayerJoin( player )
{
     Retard_Finch.ShowForPlayer( player );
}