Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: Anik on May 01, 2017, 07:44 AM

Title: [Release] Anik's GUI Editor
Post by: Anik on May 01, 2017, 07:44 AM
GUI Editor - Vice City Multiplayer

Hello guys, I am presenting you my GUI Editor. Which gives you the opportunity to edit GUIElements in game. Which will save a lot of time.
This gui editor will also output the code so you can easily copy and paste them into your script!

Interaction with Editor

Its easy make sure you read this carefully, the editor is really user-friendly and takes you no time to learn.

You can move your element by holding CTRL key and moving your mouse. And hold RMB and move mouse to resize your element.

Everything updates instantly to other players. So many players can edit a project at a time


Project Management:-

Elements Management:-

Player Keys:-

Outputs:-
Once finished creating a project and its time for you to use it. You can use the export command as mentioned above. After you see the message that the project has been outputted successfully, you can go into /scripts/Client Script/ and here you will find a .nut file with the same name as your project with all the codes inside.

Credits:-

Download Latest Version:-

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F27b0bd85da28f4b27f27f2a59a31fa1b%2FAnik%27s_GUI_Editor_v1.1.zip&hash=2200b29ed93d4895f321e49cb10168ad7104d75d) (http://files.thijn.ovh/download/27b0bd85da28f4b27f27f2a59a31fa1b/Anik's_GUI_Editor_v1.1.zip)

[Spoiler=ARCHIVE - OLD VERSIONS]
v1.0
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F98dc759e36be6e3003e90d4c81b9b9c2%2FAnik%27s%2520GUI%2520Editor.zip&hash=0c1f1e08ab15b57592532be2c650e0261f0a0ef3) (http://files.thijn.ovh/download/98dc759e36be6e3003e90d4c81b9b9c2/Anik's%20GUI%20Editor.zip)

v1.1
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F27b0bd85da28f4b27f27f2a59a31fa1b%2FAnik%27s_GUI_Editor_v1.1.zip&hash=2200b29ed93d4895f321e49cb10168ad7104d75d) (http://files.thijn.ovh/download/27b0bd85da28f4b27f27f2a59a31fa1b/Anik's_GUI_Editor_v1.1.zip)
[/Spoiler]

Changelog:-

-    Changelog - v1.1
-    ► Fixed AddChild bug.
-    ► Fixed the game crash while adding child.

The Video explains everything. How to use it :-
https://www.youtube.com/watch?v=g2W-ueXB7is#

How to install the editor :-
https://www.youtube.com/watch?v=WdLW1X3vWlI&feature=youtu.be#

Fun Fact:
When Doom released his Map editor that was his 300th post. And now I am releasing GUI Editor. Its also my 300th post :P :P

~ Happy Editing!
~ 300th post!
~ Regards, Anik!
Title: Re: [Release] Anik's GUI Editor
Post by: Zone_Killer on May 01, 2017, 08:07 AM
Good Job!!!!! 8)
Title: Re: [Release] Anik's GUI Editor
Post by: DizzasTeR on May 01, 2017, 08:09 AM
Nice work :) I'd say this is more than enough for VCMP with its current situation and limitations.
Title: Re: [Release] Anik's GUI Editor
Post by: luchgox on May 01, 2017, 08:10 AM
Good Job,its so useful bro thank you so much!
Can i load editer.nut by putting: dofile("scripts/editor.nut")? on  ScriptLoad?
Title: Re: [Release] Anik's GUI Editor
Post by: Casper on May 01, 2017, 08:43 AM
good job
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 01, 2017, 09:16 AM
Quote from: UFt.LuchGox on May 01, 2017, 08:10 AMGood Job,its so useful bro thank you so much!
Can i load editer.nut by putting: dofile("scripts/editor.nut")? on  ScriptLoad?
I have given server.cfg file along with it. You need to put plugins and server file to it.

Server - http://forum.vc-mp.org/?topic=3352.0

Plugins - http://v04.thijn.ovh/allplugins_04rel004_patch7.7z

:edit:
How to install the editor :-
https://www.youtube.com/watch?v=WdLW1X3vWlI&feature=youtu.be#
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 01, 2017, 09:17 AM
Quote from: [MDt]Casper on May 01, 2017, 08:43 AMgood job
Quote from: Zone_Killer on May 01, 2017, 08:07 AMGood Job!!!!! 8)
Quote from: Doom_Kill3R on May 01, 2017, 08:09 AMNice work :) I'd say this is more than enough for VCMP with its current situation and limitations.

Thanks Everyone. Feel free to report about the bugs and glitches.
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 01, 2017, 09:56 AM
:edit: I forgot to add the client sided script to the zip file. Link UPDATED.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F98dc759e36be6e3003e90d4c81b9b9c2%2FAnik%26%23039%3Bs%2520GUI%2520Editor.zip&hash=7724e8f18834ffbe14a9ec8c1cd88293c57f0365) (http://files.thijn.ovh/download/98dc759e36be6e3003e90d4c81b9b9c2/Anik's%20GUI%20Editor.zip)
Title: Re: [Release] Anik's GUI Editor
Post by: KrlozZ... on May 01, 2017, 10:31 AM
Wow awesomw work!
just with read it all make me anxious to use it OmO.

I will tes it when i get in my laptop as my pc sux in gui v.v

Keep it up, all your works are really nice :)
Title: Re: [Release] Anik's GUI Editor
Post by: luchgox on May 01, 2017, 11:27 AM
(https://i58.servimg.com/u/f58/19/38/49/71/screen16.png)



[more](https://i58.servimg.com/u/f58/19/38/49/71/screen17.png)
Title: Re: [Release] Anik's GUI Editor
Post by: EK.IceFlake on May 01, 2017, 12:58 PM
Quote from: UFt.LuchGox on May 01, 2017, 11:27 AM(https://i58.servimg.com/u/f58/19/38/49/71/screen16.png)



[more](https://i58.servimg.com/u/f58/19/38/49/71/screen17.png)
Please. We don't want to start this again.
There is clearly a 225 error on the console. Which means that the error is not even remotely related to this topic.
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 01, 2017, 02:00 PM
Quote from: KrlozZ... on May 01, 2017, 10:31 AMWow awesomw work!
just with read it all make me anxious to use it OmO.

I will test it when i get in my laptop as my pc sux in gui v.v

Keep it up, all your works are really nice :)
Thanks mate.
Title: Re: [Release] Anik's GUI Editor
Post by: ! on May 02, 2017, 04:00 PM
Great work @Anik

   +

Found a bug:-
>Create a window & label.
>Make label child of window.
>Now close the project.
>Now load the project again, the label will not be child of window.

Solution Don't know if it's the correct one.Yet not checked full script :P :)
I think you forget to add
ChildAdd( str );to script_mem.nut line 113.
case 5: //Addchild
local data = split( str, ":" ), int = data[0].tointeger(), intt = data[1].tointeger();
::CurrentElement = intt;
pData.PositionMode = true;
pData.Editing = true;
break;

 :edit:
Another bug
>Create a window
>Now create another window.
>Now make the first window(ID:1) child of second window(ID:2)

Booom game crashes :'(
Title: Re: [Release] Anik's GUI Editor
Post by: Sebastian on May 02, 2017, 06:54 PM
Sounds too good to be true. :D
Wish you the best ! I like your motivation.
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 03, 2017, 05:58 AM
Quote from: zeus on May 02, 2017, 04:00 PMGreat work @Anik

   +

Found a bug:-
>Create a window & label.
>Make label child of window.
>Now close the project.
>Now load the project again, the label will not be child of window.

Solution Don't know if it's the correct one.Yet not checked full script :P :)
I think you forget to add
ChildAdd( str );to script_mem.nut line 113.
case 5: //Addchild
local data = split( str, ":" ), int = data[0].tointeger(), intt = data[1].tointeger();
::CurrentElement = intt;
pData.PositionMode = true;
pData.Editing = true;
break;

 :edit:
Another bug
>Create a window
>Now create another window.
>Now make the first window(ID:1) child of second window(ID:2)

Booom game crashes :'(

Thanks for reporting the bug. But that's not the reason of the bug. Btw fixed both of the bugs.

Fixed Version

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F27b0bd85da28f4b27f27f2a59a31fa1b%2FAnik%26%23039%3Bs_GUI_Editor_v1.1.zip&hash=ae5a3b626413e581cead8dab24ac95dfd5b29b3b) (http://files.thijn.ovh/download/27b0bd85da28f4b27f27f2a59a31fa1b/Anik's_GUI_Editor_v1.1.zip)
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 03, 2017, 06:02 AM
► Fixed AddChild bug.
► Fixed the game crash while adding child.

Thanks to @zeus for pointing out the bug.
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 03, 2017, 08:31 AM
Quote from: sseebbyy on May 02, 2017, 06:54 PMSounds too good to be true. :D
Wish you the best ! I like your motivation.
Thanks mate.
Title: Re: [Release] Anik's GUI Editor
Post by: EK.IceFlake on May 14, 2017, 01:23 PM
Did you seriously make a publicly released script _memed? You're just encouraging people to be selfish and keep their client scripts to themselves and their players PCs but not the players themselves. Despite the fact that the players own their PCs and whatsoever is on it.
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on May 14, 2017, 03:39 PM
Quote from: EK.IceFlake on May 14, 2017, 01:23 PMDid you seriously make a publicly released script _memed? You're just encouraging people to be selfish and keep their client scripts to themselves and their players PCs but not the players themselves. Despite the fact that the players own their PCs and whatsoever is on it.
The _mem was added when I was making it. I forgot to remove the _mem when released it. Thanks for pointing out. Will be removed on next update
Title: Re: [Release] Anik's GUI Editor
Post by: luchgox on Jun 19, 2017, 03:05 PM
Hey Anik,
              I'm very pleased to your this GUI Editor.I like to suggest you a idea.

-How about,If color mode should be changed from "Page up and down" to a cmd ("/changecolour (R/G/B)"). Because I'm tired to tap tap the page up and down button.Suppose if people want to paste their own colour (according rgb) they can do easily (/changecolour 124 155 100)?.

I hope you understand me
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on Jun 19, 2017, 08:03 PM
Quote from: luchgox on Jun 19, 2017, 03:05 PMHey Anik,
              I'm very pleased to your this GUI Editor.I like to suggest you a idea.

-How about,If color mode should be changed from "Page up and down" to a cmd ("/changecolour (R/G/B)"). Because I'm tired to tap tap the page up and down button.Suppose if people want to paste their own colour (according rgb) they can do easily (/changecolour 124 155 100)?.

I hope you understand me
Thanks for your suggestion. Will be added in future update.
Title: Re: [Release] Anik's GUI Editor
Post by: longhackmc on Jul 04, 2017, 12:59 PM
How to use / addchild
Give me an example
tks
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on Jul 04, 2017, 01:49 PM
Quote from: longhackmc on Jul 04, 2017, 12:59 PMHow to use / addchild
Give me an example
tks
Watch the video
Title: Re: [Release] Anik's GUI Editor
Post by: longhackmc on Jul 04, 2017, 03:05 PM
Quote from: Anik on Jul 04, 2017, 01:49 PM
Quote from: longhackmc on Jul 04, 2017, 12:59 PMHow to use / addchild
Give me an example
tks
Watch the video
and Element list, where it?
Title: Re: [Release] Anik's GUI Editor
Post by: Anik on Jul 04, 2017, 05:11 PM
Quote from: longhackmc on Jul 04, 2017, 03:05 PMand Element list, where it?
Uhh!! Watch the video. By the way, you can use /elements in game to get a list of all elements.
Title: Re: [Release] Anik's GUI Editor
Post by: MEGAMIND on Jul 09, 2017, 06:36 PM
Quote from: longhackmc on Jul 04, 2017, 03:05 PM
Quote from: Anik on Jul 04, 2017, 01:49 PM
Quote from: longhackmc on Jul 04, 2017, 12:59 PMHow to use / addchild
Give me an example
tks
Watch the video
and Element list, where it?

doesnt works game crashes when using /elements
Title: Re: [Release] Anik's GUI Editor
Post by: EnForcer on Apr 08, 2020, 07:02 AM
Sorry for Bumping topic but some players will complain that they add button after exporting script they got GUIWindow instead of GUI Button

Mistake :
else if ( element == "GUIButton" ) scriptdata += ""+CurrentProject+"."+name+" = GUIWindow( VectorScreen( sX * "+x+", sY * "+y+" ), VectorScreen( sX * "+SizeX+", sY * "+SizeY+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".TextColour = Colour( "+txtcolour[0]+", "+txtcolour[1]+", "+txtcolour[2]+" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
Just Change "GUIWindow" to "GUIButton"
Fixed Code Given below:

else if( cmd == "exportproject" )
{
if( CurrentProject != "" )
{
if( ElementCreated == 0 )
{
QuerySQL( Projects, "DROP TABLE " + CurrentProject.tolower() + "" );
CurrentProject = "";
return MessagePlayer( "[#ffffff][PROJECT]: [#00CC00]The project has been [#ffffff]closed & deleted [#00CC00]as no elements were created.", player );
}

SendDataToClient( null, 7, "" );
SendDataToClient( null, 1, "" );
local arraydata = "/* \r\n\t Code Generated Using Anik's GUI Editor\r\n https://www.youtube.com/watch?v=g2W-ueXB7is \r\n*/\r\nsX <- GUI.GetScreenSize().X;\r\nsY <- GUI.GetScreenSize().Y;\n\r\n"+CurrentProject+" <-\r\n{",
scriptdata = "",
childdata = "",
q = QuerySQL( Projects, "SELECT * FROM "+CurrentProject.tolower() );
while( GetSQLColumnData( q, 0 ) )
{
local element = GetSQLColumnData( q, 1 ), name = GetSQLColumnData( q, 2 ), x = GetSQLColumnData( q, 3 ), y = GetSQLColumnData( q, 4 ), SizeX = GetSQLColumnData( q, 5 ), SizeY = GetSQLColumnData( q, 6 ), childof = GetSQLColumnData( q, 7 ), txt = GetSQLColumnData( q, 8 ), fontsize = GetSQLColumnData( q, 9 ), colour = split( GetSQLColumnData( q, 10 ), "," ), txtcolour = split( GetSQLColumnData( q, 11 ), "," );
arraydata += "\r\n "+name+" = null";
if( element == "GUILabel" ) scriptdata += ""+CurrentProject+"."+name+" = GUILabel( VectorScreen( sX * "+x+", sY * "+y+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
else if ( element == "GUIWindow" ) scriptdata += ""+CurrentProject+"."+name+" = GUIWindow( VectorScreen( sX * "+x+", sY * "+y+" ), VectorScreen( sX * "+SizeX+", sY * "+SizeY+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".TextColour = Colour( "+txtcolour[0]+", "+txtcolour[1]+", "+txtcolour[2]+" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
else if ( element == "GUIButton" ) scriptdata += ""+CurrentProject+"."+name+" = GUIButton( VectorScreen( sX * "+x+", sY * "+y+" ), VectorScreen( sX * "+SizeX+", sY * "+SizeY+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".TextColour = Colour( "+txtcolour[0]+", "+txtcolour[1]+", "+txtcolour[2]+" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
if( childof != "none" ) childdata += ""+CurrentProject+"."+childof+".AddChild( "+CurrentProject+"."+name+" );\r\n";
GetSQLNextRow( q );
}
arraydata += "\r\n}\r\n\n\n"+scriptdata+"\r\n\n"+childdata;

exportMapToFile( CurrentProject, arraydata );
CurrentProject = "";
ElementCreated = 0;

Message( "[#00CC00][PROJECT]: [#ffffff]" + player.Name + " has exported the project!" );
FreeSQLQuery( q );
}
}