The online racing simulator
Searching in All forums
(20 results)
play.net
S3 licensed
thank you
play.net
S3 licensed
Quote from denis-takumi :Use LFS Polygon Draw to identify new areas (streets) without the use of nodes on opened track like FEX FEY (LFS Z30 or higher)
used jsDraw2D - http://jsdraw2d.jsfiction.com/
use FireFox, Chrome

Update:
add: json style output
add: multipoligon drawing

Site where u can draw polygons

GitHub

C++ code to find point in polygon


<?php 
x
,curent position

polyX
[] - array of X polygon points
polyY
[] - array of Y polygon points

polySides 
count of points

bool checkPosition
(int polySides,int polyX[],int polyY[],int x,int y)
{

    
int    ij=polySides-;
    
bool  oddNodes=false     ;

    for (
i=0i<polySidesi++)
    {
        if (
polyY[i]<&& polyY[j]>=y
                
||  polyY[j]<&& polyY[i]>=y)
        {
            if (
polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x)
            {
                
oddNodes=!oddNodes;
            }
        }
        
j=i;
    }
    return 
oddNodes;
}
?>


Can it be done for c# please it will really help me
play.net
S3 licensed
Quote from cargame.nl :
Quote from play.net :But i want to know how to put that in code.

value * 3.6

Thx cargame.nl
play.net
S3 licensed
Quote from Bose321 :

edit: Maybe you can use the SpClose from IS_CON? That way you get the closing speed between the cars.

Oke thx thats really helpfull!


Thx u all for your answers!
play.net
S3 licensed
here in romania its different than other countries . i aleardy have learnt than when i was 13 .
But i want to know how to put that in code.
play.net
S3 licensed
int Days = int.Parse(BTT.Text); .....
try this
and u must change the BTT.Text to what u have .. stringMsg
Car Contact
play.net
S3 licensed
Hi there (Again) i am coding a car contact sitem and i code this.


// Car contact between 2 cars
private void CON_CarContact(Packets.IS_CON CON)
{
try
{

{
MsgAll("^1> ^3Accident: " + Connections[GetConnIdx2(CON.B.PLID)].NoColPlyName + " ^4<CRASH> " + Connections[GetConnIdx2(CON.A.PLID)].NoColPlyName);
MsgAll("^1> ^3Speed: " + Connections[GetConnIdx2(CON.B.PLID)].CompCar.Speed + "^1 m/s" + " ^4<CRASH> " + Connections[GetConnIdx2(CON.A.PLID)].CompCar.Speed + "^1 m/s");
}
}
catch { }
}



the code work corectly but it shows me the speed in meters per seconds and i cat figure out to change it to kilometers per hour

i tryed to add this : var kmh = Conn.CompCar.Speed / 91; but didnt work
THX for your help
play.net
S3 licensed
Some times i am not verry focuse on the code and miss some things
play.net
S3 licensed
yup i solved it Big grin i must replace the StrMsg[1] with the car name and now it work :d thx for your post i just readed the error messages better than before !
play.net
S3 licensed
Hi again! sorry for my post last night but i was sleepy! Sorry!

Now lets start!
I am trying to do a car dealer. I made the house,interface,
and now i work for buy/ sell buttons

Here is the code:


string Cars = Connections[GetConnIdx(BTC.UCID)].Cars;
switch (StrMsg[1].ToUpper())
{
case "XRG":

Cars = Cars + " " + "XRG";
Connections[GetConnIdx(BTC.UCID)].Cars = Cars;
Connections[GetConnIdx(BTC.UCID)].Cash -= Dealer.GetCarPrice("XRG");
MsgAll("^4|^7 " + Connections[GetConnIdx(BTC.UCID)].PlayerName + " ^7bought a ^1XRG");
InSim.Send_MTC_MessageToConnection("^4|^7 You have bought ^1XR GTi (XRG) ^7in Garage", BTC.UCID, 0);
InSim.Send_MTC_MessageToConnection("^4|^7 Price Tag: ^1$" + Dealer.GetCarPrice("XRG") + " ^7You have: ^2$" + Connections[GetConnIdx(BTC.UCID)].Cash + " ^7left", BTC.UCID, 0);

break;


Now when i put that in button click i get error cuz the "StrMsg[1]." So what i must to chenge to get it work in button click
Hey there! Need some help with insim! {Solved}
play.net
S3 licensed
Hi there . I have an problem with car dealer . i cant get it work!
Need the buy & sell buttons cuz i cant get it work. I can cod the rest!
I made the house and interface of house everything but i cant get the buttons work.!





Thx for Help !!!
play.net
S3 licensed
i use ic source for basic . and thx for reply i solved it but i forgot to post again that i solved it..
play.net
S3 licensed
Anyone???? please i really need this
I Need some help to make 1 click button {SOLVED}
play.net
S3 licensed
Hi there !

I am trying to make an click button on an cruise insim (iC Source) and i want to put it on screen for people to click it and open menu panel but i don't know where to but the code to work. I tryed to put it in event timers at Insim Interface but it didnt work. And i tryed to put it in ButtonClick.cs but no works. So anyone help?


Thank you for your Help!
play.net
S3 licensed
DOnt need helm anymore i figure it out alone anyway thx!
Casino HOuse Problem
play.net
S3 licensed
Hi there . I have a little(big problem) when i tryed to code my casino. I maked it like lotto but with more money and more nubers from 1-30. so all good but i get this error "The Name "CasinoPicked"doesn't exist in curent context" i will give u the code. the code its form chat cmds thats where i get the error

#region ' Accept Casino '
if (Conn.Cash > 100)
{
if (Conn.LastCasino == 0)
{
if (LastCasino > 30)
{
MsgPly("^4|^7 Can't pick more than 30 numbers!", BTT.UCID);
}
else if (CasinoPicked == 0)
{
MsgPly("^4|^7 Can't use zero on Casino pick!", BTT.UCID);
}
else
{
int RandomChance = new Random().Next(1, 30);
MsgPly("^4|^7 Winning Number is ^2" + RandomChance, BTT.UCID);

#region ' Casino '
if (CasinoPicked == RandomChance)
{
int prize = new Random().Next(5000, 6000);
MsgAll("^4|^7 " + Conn.NoColPlyName + " won ^2$" + prize + " ^7from winning prize in Casino!");
MsgPly("^4|^7 Congratulations you just earned ^2$" + prize, BTT.UCID);
Conn.Cash += prize;
}
else
{

MsgAll("^4|^7 " + Conn.NoColPlyName + " lost money in Casino!");
MsgPly("^4|^7 Better luck next time", BTT.UCID);

}
#endregion
play.net
S3 licensed
i will tell you go to From1.cs and globalbluffer and remove that /* from automessege
[RO]Romania Cruise
play.net
S3 licensed
Thx for your reply but where I can find that in my insim
I modified iCs Source if want to tell me please
[RO]Romania cruise
play.net
S3 licensed
Hello all cruisers or players !
I am the owner of server but I have some problems with the insim if he got 8 players it crash I don't know why I hope you will help me if you know please reply here or contact me on my Skype andreysimion007 thx for your reply
Me and maher administrate the server
FGED GREDG RDFGDR GSFDG