SA-MP Forums Archive
Traffic Light Control - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Traffic Light Control (/showthread.php?tid=301328)



Traffic Light Control - sciman001 - 03.12.2011

Hello everyone. I am going to tell you all about a little idea I have for SA-MP in the future. Here it is:

Script controlled traffic lights. Now, I was thinking.. if someone wants control over ALL the lights in the game SEPERATELY, how would they know which onw they're working with? The answer is this: create a map (picture) of all the traffic lights in the game. Then, you could put an id on each one. And the way you control them could be like this:
Код:
SetTrafficLightState(id, state);
GetTrafficLightStare(id);
ToggleNormalLights(toggle); //makes them controlled by game like normal or not

//states
1 - red
2 - yellow
0 - green
Now, the best way to do this, I think, is use the code of the RemoveBuilding thingy to remove all the lights and then put in blank lights and then make controllable fx and put them in front of the lights. I know it's a stretch, but... I would be soooooo happy to see it. I understand that it would require hours of work, but if someone makes this.. I hope that it will be included in the next release. Also, this is NOT a request thread, but an idea thread. :P Anyway, thanks for reading! CYA!

p.s. i know others hav this idea.. this is just my opinion on it.


Re: Traffic Light Control - -Rebel Son- - 03.12.2011

That's a Interesting concept.


Re: Traffic Light Control - sciman001 - 03.12.2011

Thanks! I hope I explained it well enough...


Re: Traffic Light Control - dr.pepper - 04.12.2011

Good luck man, that's going to have to be a lot of effort put into. Seems like it's not really needed, but I guess it could be great for maybe Cops and Robbers?

Edit: Nice idea* Didn't read full description


Re: Traffic Light Control - sciman001 - 04.12.2011

I was thinking RP and race. Also, I ain't making it. It's just an idea I wanted to shaew with the world.


Re: Traffic Light Control - Scenario - 04.12.2011

This would be freaking awesome, lots of development opportunity with this!


Re: Traffic Light Control - teomakedonija - 06.01.2013

I want to create this.I want to when Police Member type /tloff or /tlon when type /tloff to set yellow light and when type /tlon to start traffic lights normally that is that script ?


Re: Traffic Light Control - InActtive™ - 06.01.2013

Not a bad idea. Seems quite interesting. Although I wouldn't really expect something like this until about 2 more updates or so.

Btw you have GetTrafficLightStaRe(id); instead of StaTe.
pawn Код:
GetTrafficLightState(id);



Re: Traffic Light Control - Biess - 06.01.2013

Would be awesome if this works.


Re: Traffic Light Control - nilanjay - 06.01.2013

This will be an awesome idea for roleplay servers and might make roleplaying more realistic.