The online racing simulator
Searching in All forums
(94 results)
ADr3nAl1n
Demo licensed
Did you try turning the computer on and off ?
ADr3nAl1n
Demo licensed
Issued resolved. It was a common mistake not in the code above but in different location
ADr3nAl1n
Demo licensed
Yeeey time to play around :P
Thanks DarkKostas

Cup of tea - check
Tv - check
In bed with laptop - check
Remote? ...hmmhm remooote ? aaaaa F#$K ._.
ADr3nAl1n
Demo licensed
System.Timers.Timer ExampleTimer = new System.Timers.Timer(1000); // 1 second timer

ExampleTimer.Elapsed += new System.Timers.ElapsedEventHandler(ExampleTimer_Elapsed);
ExampleTimer.Enabled = true;

private void ExampleTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
int Timer = 60;
bool TimerEnabled = false;
if([COLOR="Lime"]TimerEnabled == true[/COLOR] && Timer >= 1)
{
Timer -= 1;
}
}

Something like that ...
ADr3nAl1n
Demo licensed
Why won't you make it yourself depending on what you want the command to do ? At least get involved , give more information . not demand "oh make me that and if I like I use it"
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
probably because you didn't port forward . Skype me when I'm online i will help you if the problem persists

Its either your router blocking the ports or a bad setup configuration in server files
ADr3nAl1n
Demo licensed
look in ChatCommands.cs , you can find there showoff
ADr3nAl1n
Demo licensed
Your question is a bit unclear ... Doesn't it have a !showoff command already?
ADr3nAl1n
Demo licensed
I did not add description to each command nor test it. But it should have !help showing the list of commands.
ADr3nAl1n
Demo licensed
By bug you mean ?
ADr3nAl1n
Demo licensed
Oh .. so your charging 5€ for something modified which was already on forum for free

...
ADr3nAl1n
Demo licensed
InSim.Send_BTN_CreateButton("^7Energy: ^6" + C.TotalHealth + "%", Flags.ButtonStyles.ISB_DARK, 5, 15, 0, 92, 4, C.UniqueID, 2, true);


5 is height , 15 is width , 0 position up/down , 92 position left/right , 4 is the button's id


Make it yourself
ADr3nAl1n
Demo licensed
Microsoft Visual Studio, thats how.
ADr3nAl1n
Demo licensed
I think he means for the insim , When someone connects he wants people to be able to have their accounts in insim protected by password.

Djaniko0o , it is possible but I doubt someone will do that for you.
ADr3nAl1n
Demo licensed
Your name has to be ^0Officer^1•^7 while you type !duty

Officer with black , the dot with red and name with white.

[COLOR="Black"]Officer[/COLOR][COLOR="Red"]•[/COLOR][COLOR="White"]example[/COLOR]

ADr3nAl1n
Demo licensed
Thanks for your answer

EDIT:

Oct 04 Authorised : ip (name)
Oct 06 Authorised : ip (name)

The problem was that it was reading always the first line which could've been outdated , But you gave me an idea.
I stored the first line in a string (ex: Pinfo) , and then used statement
If (read line != Pinfo) // != means the opposite of == , which can also be as (read line == Pinfo == false)
{
read the line
}

So now its always reading the last available line



Oh and about the extracting text

the line : Oct 03 13:03:02 Authorised : 99.99.99.99 (username)

int pFrom = info.IndexOf(": ") + ": ".Length;
int pTo = info.LastIndexOf(" (");

string result = info.Substring(pFrom, pTo - pFrom);


result being the ip
Last edited by ADr3nAl1n, .
StreamReader And String Cutting
ADr3nAl1n
Demo licensed
I'm trying to extract a string from log.txt with StreamReader but the problem is that I need it to read from last line to first.

Also I don't know how to cut from that string specific text between ": " and " (" like the Ip

Sep 29 20:04:40 Authorised : 127.0.0.1 (username)

I will probably find out how to take the ip from the string but I need some directions with the StreamReader...

Thanks!
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
There is no way that I would know of getting the Ip from a user with InSim

But you if you check the setup.cfg from the dedicated server folder you will find

// optional: message log file
/log=log.txt

You can search there anytime someones ip (note: the txt file will restart everytime you restart the server)
ADr3nAl1n
Demo licensed
So if the text you need to display is bla hair bla bla coconut bla bla bla bla bla goat butter bla

var a = bla hair bla bla coconut bla bla bla bla bla goat butter bla

and then you just put the a in the button


it might work ,Good idea
ADr3nAl1n
Demo licensed
Nevermind, CrashID1.Playername or CrashID1.Username
Sometimes requesting playername doesn't show .. if not try with username


MsgAll("^2Collision: " + Connections[GetConnIdx2(CON.A.PLID)] + " ^2hit " + Connections[GetConnIdx2(CON.B.PLID)] + " ^2 And killed him and raped him");

Replace this with

MsgAll("^2Collision: " + CrashID1.PlayerName + " ^2hit " + CrashID2.PlayerName + " ^2 And killed him and raped him");

I think its too long and it wont show the whole thing , considering removing the stuff after crashid2 , or switch to usernames instead of playernames
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
You can't do object detection but car detection yes

Look in docs/insim.txt to see what flag you have to add and things like that

Of course with lfs external 1.1.1.7
ADr3nAl1n
Demo licensed
Quote from dawesdust_12 :Visual C++ Express !== Visual C# Express.

Kyle-Caz, In case you didn't understand != is the opposite of ==
xD
You're trying to open C# project with C++ god damnit ! , haha
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
In MCI Updates you will find track info, look there...
ADr3nAl1n
Demo licensed
Quote from i-love-cruise :Hello,

How to use it at other tracks, like BL2?

You can't unless you code it , it has ONLY BL1
FGED GREDG RDFGDR GSFDG