Author Topic: Traffic Lights Script [V2]  (Read 12597 times)

Heck, I could just make a traffic light using EVENTS! Ever heard of relays...?
we know we could use events,but this add on lets you have FULLY FUCTIONAL TRAFFIC LIGHTS without MESSY RELAYS.


Heck, I could just make a traffic light using EVENTS! Ever heard of relays...?
Ever heard of Reading the whole post?
fully functional traffic lights without any messy relay events!

Although i would rather make Relays than a new mod

This is useful for those who can't use relays.

Does this only function for two traffic lights? your example makes it seem like it.

Does this only function for two traffic lights? your example makes it seem like it.
You can have 2 traffic lights named stop2 and everything facing the same direction and like stop1 perpendicular to it.

Does this only function for two traffic lights? your example makes it seem like it.
Let me clear some things up.
This works for two SETS of traffic lights. Any traffic lights with the same name (say, slowLight1) will turn on simultaneously.

This is an easy way of how to do this. Even if there is ways of improving it dramatically, I encourage you to keep up the good work.
Please asplain, I'd love to work some more on this!


not work, this goes to  fail bin.

not work, this goes to  fail bin.
Maybe you not work. You goes to  fail bin.



Are you kidding me?

Code: [Select]
function serverCmdToggleTrafficLights(%cl)
{
if(%cl.isAdmin || %cl.isSuperAdmin)
{
if($stopLight == 1)
{
messageAll('',"\c6"@%cl.name@"\c3 has turned traffic lights \c6OFF\c3!");
$stopLight = 0;
}
else
{
messageAll('',"\c6"@%cl.name@"\c3 has turned traffic lights \c6ON\c3!");
$stopLight = 1;
stopLightTick();
}
}
}
Code: [Select]
function serverCmdToggleTrafficLights(%cl)
{
if(%cl.isAdmin)
$stopLight = !$stopLight;
}

Also %cl.isAdmin is a 1 for super admins, too.

You might want to make a /traficlighthelp
cause these are easy to forget >_>

I remember Wedge made city lights. One of them was a Traffic Light light that was red, turned green, then yellow and then red like a normal traffic light.

It'd be easier to make a light instead of having to make a script that involves changing the lights of multiple named bricks.