The ACTUAL tutorial on flags

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Inhabitant of a Country
Posts: 798
Joined: Sun May 28, 2017 0:07
Location: Melting in Argentina
Plugins: Show
Version: Beta


Plugin Creator

The ACTUAL tutorial on flags


Post by FranchuFranchu » Sat Jun 16, 2018 16:19

Since KoalaGuy was deleted, all his posts are gone. One of those posts was about flags. So here I am remaking the tutorial

Flags are used to make certain cars go only in certain roads. In the game it is used in the bus road.
First, you have to make a road with the flag

Code: Select all


    "flag normal":false, //No cars can go here
    "flag pkw":true //But passenger cars can
Next, we will have to make a car that drives here

Code: Select all

    "flag normal":false, //this is not a normal car
    "flag pkw":true //this is a passenger car!

Original topic

All possible flags:
"flag all"
"flag normal"
"flag pkw"
"flag lkw"
"flag bus"
"flag tram"
"flag airport"
"flag pedestrian"
"flag military"
"flag user0"
"flag user1"
"flag user9"
Lobby wrote:
Wed Dec 13, 2017 12:40
Version 390 will allow you to reference to your own flags by name. To allocate a flag that's called "lobby_newflag you may just write :json

Code: Select all

"allocate flag":["lobby_newflag"]  // "allocate flag":"lobby_newflag would work, too
To use it, write :json

Code: Select all

"flag lobby_newflag":true
You should add the definition above to every plugin which uses it (redefinition is therefore explicitly allowed). Just ensure that your flag name is some kind of unique.

⚠There's a limit of 20 custom flags in total.
Did you know you can't blink while smiling :) ?

Inhabitant of a Planet
Posts: 1308
Joined: Sun Nov 12, 2017 9:23
Location: The Kingdom of Babilandia
Plugins: Show
Version: Beta
Phone model: Samsung Galaxy 360H


Plugin Creator

Re: The ACTUAL tutorial on flags


Post by cesareborgia94 » Sun Jun 17, 2018 15:43

Thank you Franchu
Now please do a tutorial on custom animation, please...
I rarely make plugins now, but I still make them in spare time.
Disclaimer Please no request, I'm busy with real life stuff, I hope you understand ;)
You can find me here only. Discord is sh**, sorry JA :(

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 2 guests