SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 25/03/2016, 03:20 AM   #1
Seregamil1
Big Clucker
 
Join Date: Nov 2012
Location: Russia, Altay
Posts: 132
Reputation: 45
Default .pwn to .tde (iPleomax TD Editor)

Converts this
PHP Code:
//Global Textdraws:

new Text:Textdraw0;
new 
Text:Textdraw1;
new 
Text:Textdraw2;


Textdraw0 TextDrawCreate(130.2489774.666663"Ammuniton:");
TextDrawLetterSize(Textdraw00.2279200.899999);
TextDrawAlignment(Textdraw01);
TextDrawColor(Textdraw0, -1);
TextDrawSetShadow(Textdraw00);
TextDrawSetOutline(Textdraw01);
TextDrawBackgroundColor(Textdraw051);
TextDrawFont(Textdraw02);
TextDrawSetProportional(Textdraw01);

Textdraw1 TextDrawCreate(125.689620, -0.250007"usebox");
TextDrawLetterSize(Textdraw10.0000007.645375);
TextDrawTextSize(Textdraw1121.6896050.000000);
TextDrawAlignment(Textdraw11);
TextDrawColor(Textdraw10);
TextDrawUseBox(Textdraw1true);
TextDrawBoxColor(Textdraw1, -2139062017);
TextDrawSetShadow(Textdraw10);
TextDrawSetOutline(Textdraw10);
TextDrawFont(Textdraw10);

Textdraw2 TextDrawCreate(640.59478773.833305"usebox");
TextDrawLetterSize(Textdraw20.000000, -0.476675);
TextDrawTextSize(Textdraw2, -1.5314500.000000);
TextDrawAlignment(Textdraw21);
TextDrawColor(Textdraw20);
TextDrawUseBox(Textdraw2true);
TextDrawBoxColor(Textdraw2, -2139062017);
TextDrawSetShadow(Textdraw20);
TextDrawSetOutline(Textdraw20);
TextDrawFont(Textdraw20);


//Player Textdraws:

new PlayerText:Textdraw0[MAX_PLAYERS];
new 
PlayerText:Textdraw1[MAX_PLAYERS];
new 
PlayerText:Textdraw2[MAX_PLAYERS];


Textdraw0[playerid] = CreatePlayerTextDraw(playerid156.54911819.666666"Minigun: ~r~~h~None");
PlayerTextDrawLetterSize(playeridTextdraw0[playerid], 0.2279200.899999);
PlayerTextDrawAlignment(playeridTextdraw0[playerid], 1);
PlayerTextDrawColor(playeridTextdraw0[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw0[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw0[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw0[playerid], 51);
PlayerTextDrawFont(playeridTextdraw0[playerid], 2);
PlayerTextDrawSetProportional(playeridTextdraw0[playerid], 1);

Textdraw1[playerid] = CreatePlayerTextDraw(playerid156.61207533.500000"Rocket launcher: ~g~~h~~h~3");
PlayerTextDrawLetterSize(playeridTextdraw1[playerid], 0.2279200.899999);
PlayerTextDrawAlignment(playeridTextdraw1[playerid], 1);
PlayerTextDrawColor(playeridTextdraw1[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw1[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw1[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw1[playerid], 51);
PlayerTextDrawFont(playeridTextdraw1[playerid], 2);
PlayerTextDrawSetProportional(playeridTextdraw1[playerid], 1);

Textdraw2[playerid] = CreatePlayerTextDraw(playerid156.67503347.333328"Mine launcher: ~g~~h~~h~1");
PlayerTextDrawLetterSize(playeridTextdraw2[playerid], 0.2279200.899999);
PlayerTextDrawAlignment(playeridTextdraw2[playerid], 1);
PlayerTextDrawColor(playeridTextdraw2[playerid], -1);
PlayerTextDrawSetShadow(playeridTextdraw2[playerid], 0);
PlayerTextDrawSetOutline(playeridTextdraw2[playerid], 1);
PlayerTextDrawBackgroundColor(playeridTextdraw2[playerid], 51);
PlayerTextDrawFont(playeridTextdraw2[playerid], 2);
PlayerTextDrawSetProportional(playeridTextdraw2[playerid], 1); 
to this

PHP Code:
130.248977|4.666663|0.227920|0.899999|0.000000|0.000000|1|-1|0|0|0|1|51|2|1|0|0|Ammuniton:
156.549118|19.666666|0.227920|0.899999|0.000000|0.000000|1|-1|0|0|0|1|51|2|1|0|1|Minigun: ~r~~h~None
156.612075
|33.500000|0.227920|0.899999|0.000000|0.000000|1|-1|0|0|0|1|51|2|1|0|1|Rocket launcher: ~g~~h~~h~3
156.675033
|47.333328|0.227920|0.899999|0.000000|0.000000|1|-1|0|0|0|1|51|2|1|0|1|Ammuniton:
125.689620|-0.250007|0.000000|7.645375|121.689605|0.000000|1|0|1|-2139062017|0|0|0|0|0|0|0|usebox
640.594787
|73.833305|0.000000|-0.476675|-1.531450|0.000000|1|0|1|-2139062017|0|0|0|0|0|0|0|usebox 
Run the application
Enter the path to the file
Press 'Enter'

Source code
PHP Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.IO;
using System.Text.RegularExpressions;

namespace 
ipleomax
{
    class 
Program
    
{
        public static 
string iPositionX "0.000000";
        public static 
string iPositionY "0.000000";
        public static 
string iLetterX "0.000000";
        public static 
string iLetterY "0.000000";
        public static 
string iTextX "0.000000";
        public static 
string iTextY "0.000000";
        public static 
string iAlignment "0";
        public static 
string iColor "0";
        public static 
string iUsebox "0";
        public static 
string iBoxcolor "0";
        public static 
string iShadow "0";
        public static 
string iOutline "0";
        public static 
string iBackgroundcolor "0";
        public static 
string iFont "0";
        public static 
string iProportion "0";
        public static 
string iSelectable "0";
        public static 
string iType "0";
        public static 
string iText "0";

        static 
void Main(string[] args)
        {
            
Console.WriteLine("Enter path to file");
            
string path Console.ReadLine();

            
using (StreamReader fRead = new StreamReader(pathEncoding.GetEncoding("windows-1251")))
            {
                
using (StreamWriter fWrite = new StreamWriter(path ".tde"false))
                {
                    
string line string.Empty;

                    
Regex integer = new Regex(@"\b(\d+)|-\b(\d+)");
                    
Regex doubles = new Regex(@"(?:\d{1,6})?(?:\.\d{1,6})|-(?:\d{1,6})?(?:\.\d{1,6})");
                    
Regex quote = new Regex("\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"");
                    
Regex bracket = new Regex(@"\(.+\)");

                    
MatchCollection collection;

                    
bool key false;

                    while (!
fRead.EndOfStream)
                    {
                        
line fRead.ReadLine();

                        if (
line.Length == 0)
                        {
                            if (
key == false)
                                continue;

                            
string resultLine string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}|{9}|{10}|{11}|{12}|{13}|{14}|{15}|{16}|{17}",
                                
iPositionXiPositionYiLetterX,
                                
iLetterYiTextXiTextY,
                                
iAlignmentiColoriUsebox,
                                
iBoxcoloriShadowiOutline,
                                
iBackgroundcoloriFontiProportion,
                                
iSelectableiTypeiText );

                            
fWrite.WriteLine(resultLine);
                            
Console.WriteLine(resultLine);

                            
iPositionX "0.000000";
                            
iPositionY "0.000000";
                            
iLetterX "0.000000";
                            
iLetterY "0.000000";
                            
iTextX "0.000000";
                            
iTextY "0.000000";
                            
iAlignment "0";
                            
iColor "0";
                            
iUsebox "0";
                            
iBoxcolor "0";
                            
iShadow "0";
                            
iOutline "0";
                            
iBackgroundcolor "0";
                            
iFont "0";
                            
iProportion "0";
                            
iSelectable "0";
                            
iType "0";
                            
iText "0";
                            
key false;
                        }

                        if (
line.Contains("TextDrawCreate") || line.Contains("CreatePlayerTextDraw"))
                        {
                            
key true;
                            
line bracket.Match(line).Value;
                            
iText quote.Match(line).Value;
                            
collection doubles.Matches(line);

                            
iPositionX collection[0].Value;
                            
iPositionY collection[1].Value;

                            
iType = ((line.Contains("playerid") ? "1" "0"));
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawLetterSize") || line.Contains("PlayerTextDrawLetterSize"))
                        {
                            
line bracket.Match(line).Value;

                            
collection doubles.Matches(line);

                            
iLetterX collection[0].Value;
                            
iLetterY collection[1].Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawTextSize") || line.Contains("PlayerTextDrawTextSize"))
                        {
                            
line bracket.Match(line).Value;

                            
collection doubles.Matches(line);

                            
iTextX collection[0].Value;
                            
iTextY collection[1].Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawAlignment") || line.Contains("PlayerTextDrawAlignment"))
                        {
                            
line bracket.Match(line).Value;

                            
iAlignment integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawColor") || line.Contains("PlayerTextDrawColor"))
                        {
                            
line bracket.Match(line).Value;

                            
iColor integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawUseBox") || line.Contains("PlayerTextDrawUseBox"))
                        {
                            
line bracket.Match(line).Value;

                            
iUsebox = (line.Contains("true") ? "1" "0");//integer.Match(line).Value;
                            
continue;
                        }
                        
                        if (
line.Contains("TextDrawBoxColor") || line.Contains("PlayerTextDrawBoxColor"))
                        {
                            
line bracket.Match(line).Value;

                            
iBoxcolor integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawSetShadow") || line.Contains("PlayerTextDrawSetShadow"))
                        {
                            
line bracket.Match(line).Value;

                            
iShadow integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawSetOutline") || line.Contains("PlayerTextDrawSetOutline"))
                        {
                            
line bracket.Match(line).Value;

                            
iOutline integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawBackgroundColor") || line.Contains("PlayerTextDrawBackgroundColor"))
                        {
                            
line bracket.Match(line).Value;

                            
iBackgroundcolor integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawFont") || line.Contains("PlayerTextDrawFont"))
                        {
                            
line bracket.Match(line).Value;

                            
iFont integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawSetProportional") || line.Contains("PlayerTextDrawSetProportional"))
                        {
                            
line bracket.Match(line).Value;

                            
iProportion integer.Match(line).Value;
                            continue;
                        }
                        
                        if (
line.Contains("TextDrawSetSelectable") || line.Contains("PlayerTextDrawSetSelectable"))
                        {
                            
line bracket.Match(line).Value;

                            
iSelectable integer.Match(line).Value;
                            continue;
                        }
                    }
                }
            }
            
Console.Read();
        }

    }

http://rghost.ru/6hMRyPWqn
Seregamil1 is offline   Reply With Quote
Old 25/03/2016, 08:31 AM   #2
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 320
Reputation: 37
Default Re: .pwn to .tde (iPleomax TD Editor)

Good job.
Max_Andolini is offline   Reply With Quote
Old 25/03/2016, 08:45 AM   #3
Roozevelt
Gangsta
 
Roozevelt's Avatar
 
Join Date: Jan 2016
Location: Tunsia
Posts: 529
Reputation: 154
Default Re: .pwn to .tde (iPleomax TD Editor)

OMG , can't understand anything :/
__________________
• Left SA-MP.
• Roosevelt's stunt map pack : Click here
• SEF community
• Join now

Support my music : https://www.youtube.com/watch?v=1ats...&start_radio=1
Roozevelt is offline   Reply With Quote
Old 27/03/2016, 03:39 AM   #4
Jimmmy
Gangsta
 
Jimmmy's Avatar
 
Join Date: Jul 2014
Location: Rio de Janeiro
Posts: 535
Reputation: 66
Default Re: .pwn to .tde (iPleomax TD Editor)

Very good
__________________



Hospedagem de Site, Host SA:MP, Revenda SA:MP, Host MTA, Host minecraft e VPS, Antiddos incluído em todos planos.

Viva Virtual - Em desenvolvimento...

Faço scripts de samp por encomenda. Entra em contato PM!.
Jimmmy is offline   Reply With Quote
Old 27/03/2016, 05:36 PM   #5
HaRdiiZin
Gangsta
 
HaRdiiZin's Avatar
 
Join Date: Jan 2015
Location: localhost/HaRdiiZin
Posts: 805
Reputation: 98
Default Re: .pwn to .tde (iPleomax TD Editor)

Ohh good
HaRdiiZin is offline   Reply With Quote
Old 27/03/2016, 06:13 PM   #6
LaLy17
Big Clucker
 
Join Date: Jan 2015
Posts: 92
Reputation: 4
Default Re: .pwn to .tde (iPleomax TD Editor)

Don't work. :/
LaLy17 is offline   Reply With Quote
Old 05/04/2016, 01:11 PM   #7
HydraHumza
Gangsta
 
HydraHumza's Avatar
 
Join Date: Oct 2014
Posts: 627
Reputation: 130
Default Re: .pwn to .tde (iPleomax TD Editor)

Will be awesome if you create a video or post screenshot how it actually works.
__________________
Quote:
Originally Posted by Kalcor View Post
The fact is, I am right. And if you think I'm wrong, you are wrong.
HydraHumza is offline   Reply With Quote
Old 06/04/2016, 02:58 PM   #8
wampiros6
Big Clucker
 
Join Date: Oct 2012
Posts: 52
Reputation: 8
Default Re: .pwn to .tde (iPleomax TD Editor)

it don't work with tdeditor. It show me error.
__________________
wampiros6 is offline   Reply With Quote
Old 06/04/2016, 07:41 PM   #9
SecretBoss
Gangsta
 
SecretBoss's Avatar
 
Join Date: Dec 2014
Location: Greece
Posts: 808
Reputation: 103
Default Re: .pwn to .tde (iPleomax TD Editor)

Can you add the option to save the file somewhere? It's very boring to copy all this code
__________________
SecretBoss is offline   Reply With Quote
Old 08/05/2016, 03:47 PM   #10
legendd
Banned
 
Join Date: May 2016
Posts: 31
Reputation: 4
Default Re: .pwn to .tde (iPleomax TD Editor)

good job, great work
legendd 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
Ipleomax TD Editor - Problem ZmaXy Scripting Help 3 18/08/2015 02:04 PM
Help Ipleomax td editor shadowstorm Server Support 1 26/04/2015 05:40 PM
Need help - IPLEOMAX textdraw editor hoonz Scripting Help 2 24/08/2014 03:25 PM
[Ajuda] Ipleomax's Editor ElGringo Português/Portuguese 11 23/08/2014 08:49 PM
[Ajuda] Ipleomax TextDraw Editor Lucas_Pawno Português/Portuguese 2 25/01/2014 01:48 PM


All times are GMT. The time now is 07:59 AM.


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