Coding a train Plugin

You have great tips for other players? Share them here.
Online
User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 190
Joined: Mon Jan 06, 2020 9:57
Location: Glenia
Plugins: Show
Version: Beta

Plugin Creator

Platform

Coding a train Plugin

#1

Post by Kiki012 »

Do you Don't Know How coding of train Plugin :?:

Here the coding ;)
Train Wagon

Code: Select all    Reset

{ "id":"$Cargo_2019",. // please Use Other id "type":"car", "author":"kiki012", "flag normal":false, "flag train":true, "frames":[{"bmp":"Car2.png","count":4,"h":19,"w":20}], "speed":1.5, "v2":true },
JSON checker
Check
Train Head

Code: Select all    Reset

{ "id":"$CC206", "type":"car", "author":"Kiki012", "flag normal":false, "flag train":true, "frames":[{"bmp":"CC206.png","count":4,"h":19,"w":20}], "tail":["Train_Link", "$White_2016","Train_Link",. // the Train Link ke For Train Make Not Like' Connect Each Other "$White_2016","Train_Link", "$White_2016","Train_Link", "$White_2016","Train_Link", "$White_2016","Train_Link", "$White_2016","Train_Link", "$Cargo_2019"], "speed":1.5, "v2":true },
JSON checker
Check
(SORRY KINGTUT 101 BECAUSE SAME ID USING :lol: )
If You Want Custom Railway(optional)

Code: Select all    Reset

{ "id":"IDN_Narrow_Gauge", "type":"road", "title":"Narrow gauge Railway", "text":"Used to guide your trains.", "author":"Kiki012", "frames":[{"bmp":"NG.png","count":16,"h":17,"w":32}], //the Frames "bridge frames":[{"bmp":"NGBR.png","count":12,"h":48,"w":32}],. //bridge Frames "tunnel frames":[{"bmp":"TNGF.png","h":19,"handle y":7,"w":16,"x":0}], //Tunnel Frames "draw ground":true, "price":50, "monthly price":1, "bridge height":11, "bridge price":120, "flag normal":false, "flag train":true, "ordinal":304, "allow transfer":true, "allow bus":false, "connectable":true, "auto join":false, "level":5, "speed":1.5, "x flags":{"flag normal":true,"flag train":true} },//Basically Just An Road With Train Flag
JSON checker
Check
Train Spawner

Code: Select all    Reset

{ "id":"IDN_PL4", "type":"railway Station", "author":"Kiki012", "width":1, "height":1, "frames":[{"bmp":"PL5.png"},{"bmp":"PL6.png"},{"bmp":"PL7.png"},{"bmp":"PL8.png"}],//optional for multiple frames! "price":100, "monthly price":0, "rotation aware":true, "draw ground":true, "water":"0", "power":"0", "car spawner":[{"targets":["IDN_PL4"],"cars":["$CC206PR"],"count":1,"radius":1000}], // This Important "ordinal":307, "build time":0, "needs road":false, "text":"Platforms ", "title":"Deco Platform" },
JSON checker
Check
This all Code From My Indonesian Train Plugin
Available on my drive Download Here!

Thanks :bp :bd
Last edited by Kiki012 on Thu Feb 04, 2021 7:14, edited 3 times in total.
Hah?,Kosong?

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5347
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Coding a train Plugin

#2

Post by Bearbear76 »

putting some comments would make it easier for people to understand what you did. ;)

Such as:

Code: Select all

"category":"$foobar", //puts train platform into the category with the id "$foobar"
Just my opinion

SenyaBell
Bell
Reactions:
Posts: 864
Joined: Fri Oct 02, 2020 11:18
Location: Saratov
Plugins: Show
Version: Beta
Contact:

Platform

Re: Coding a train Plugin

#3

Post by SenyaBell »

Code: Select all    Reset

your code
JSON checker
Check

Online
User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 190
Joined: Mon Jan 06, 2020 9:57
Location: Glenia
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Coding a train Plugin

#4

Post by Kiki012 »

SenyaBell wrote:
Fri Dec 04, 2020 6:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code
Hah?,Kosong?

SenyaBell
Bell
Reactions:
Posts: 864
Joined: Fri Oct 02, 2020 11:18
Location: Saratov
Plugins: Show
Version: Beta
Contact:

Platform

Re: Coding a train Plugin

#5

Post by SenyaBell »

Kiki012 wrote:
Fri Dec 04, 2020 10:13
SenyaBell wrote:
Fri Dec 04, 2020 6:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code
LMFAO

Post Reply Previous topicNext topic

Return to “Tips and Tricks”