This post originaly was for traffic lights or signs. I choose to make signs and i found help.
I did button (traffic sign) thats apear in specific region (area/polygon) but how to delete the sign when im outside of region/polygon?
Was actually my server (Sin'rs), and I'm Scottish, not Russian!
I made this as an add-on script for the popular LFSLapper ("lapper") InSim system, but unfortunately, I haven't had time to finish things off (I was also working on a drag race system that I was going to use on the long straight), but everything LFS related has had to come to a stop for now (no time).
The pop up traffic signs work by applying a timed sub-routine to start when a car enters a specifically defined "zone" (LFS x and y location), and just consist of text on overly large coloured full stops (.).
Full stops are one of the few UTF-8 symbols that I found can be used in LFS without any problems (like crashing the InSim).
In fact, if anyone's interested, the (quite) simple sub-routine for one of my traffic signs is as follows;
British Stop Sign (Red background with white lettering spelling STOP)
<?php Sub SE_StopSign($userName) openPrivButton( "sts_back",0,5,126,126,1,4,64,"^1•"); # red background openPrivButton( "sts_text",7,60,50,24,1,4,0,"^7STOP"); # white text EndSub ?>
- the text after # marks are just comments.
- "sts_back" and "sts_text" are the unigue button identifiers
- numbers conform to usual LFS button placements and size (in the case of the 'circle' made by a full stop, its 126 x 126 , whereas the STOP text is only 24 high).
Interesting... ok i have now idea how to do traffic lights and some of the signs.
I think signs will be easy to made. But how can i made triangle sign
or the yield sign...
So what i need here for signs...
I think i need code for creating the signs
code for place the sign at specific position... and thats it i think
OmG thats right i can use some characters and make them bigger as buttons
P.S OMG realy i found characters in traditional chinese for triangle and yield!!!!
Now remaining... how to place the signs in place that i want Im not lazy to learnin C# BUT tihs is my first project for fun and will be the last for that reason i trying with help from others
EDIT 2!!!!::
I Found how to find coordinates: http://denisbatya.narod.ru/ This tool helped me!
Only coordinates in that tool do not match but becouse i have to do math with numbers
(-230 * 196608), 2) + Math.Pow(Conn.CompCar.Y - (106 * 196608), 2)) / 65536)
coordinates for the point A is X-230 and Y106 but in map is different soo i have to do:
numbers from tool * 65536 and the result i have to divide by 19608 and the result is coordinates for cruise
Why is that?
EDIT3:::
I dont know why coordinates from map tools is different from lfs cruise BUT
The forum user: MadCatX is helped me AGAIN with this
-376 / 3 = -125
968 / 3 = 322
This simple calculation convert coordinates from map to/from lfs cruise
Here is my first traffic sign that apear in area that i want but i dont make code for the area i just used created one "KinderGarten"
And the button with this character not closing becouse i have to add delete button code interesting!
That's a good idea those traffic signs Myself I thought I'd like to have something like that in cruise servers, where people would have to obey the signs and/or traffic lights other than having just classic intersections where barely anyone knows who gives way to whom (probably rule of right hand but still, main roads, yield/stop signs and traffic lights would be an awesome addition).
Screenshot is from LFS of my friend
I will help anyone who wants signs too. Only i have to do delete button stuff and place sign in place where i want after i make it work like normal i can help.
I want button to be deleted when im not inside of coordinates....
I tried with "else" after that
InSim.Send_BFN_DeleteButton
BUT when i make another area to createbutton the secound button not apear ....