The online racing simulator
RPM Limiter with custom sound
(17 posts, started )
RPM Limiter with custom sound
***updated***
I made with radekteam basecode (only udp packet capture) and my code
set outgauge port to 11111
unrar start and enjoy :

cfg.txt:

OutGauge Mode 2
OutGauge Delay 5
OutGauge IP 127.0.0.1
OutGauge Port 11111
OutGauge ID 2

updated link : http://data.hu/get/658442/limiter.rar.html

try it

its only active for rpm limiter light!

Source code:


unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdUDPBase, IdUDPServer,IdSocketHandle, StdCtrls,
ComCtrls, ExtCtrls, Gauges, MMsystem;

type
TPacket = record
Time: longint; // time in milliseconds (to check order)
Car: array[0..3] of char; // Car name
Flags: word; // OG_FLAGS
Gear: byte; // Reverse:0, Neutral:1, First:2...
SpareB: byte;
Speed: single; // M/S
RPM: single; // RPM
Turbo: single; // BAR
EngTemp: single; // C
Fuel: single; // 0 to 1
OilPress: single; // BAR
Spare1: single;
Spare2: single;
Spare3: single;
Throttle: single; // 0 to 1
Brake: single; // 0 to 1
Clutch: single; // 0 to 1
Display1: array[0..15] of char; // Usually Fuel
Display2: array[0..15] of char; // Usually Settings
// ID: integer; // optional - only if GameID is specified
end;

TForm1 = class(TForm)
IdUDPServer1: TIdUDPServer;
Label16: TLabel;
Label17: TLabel;
GroupBox1: TGroupBox;
CheckBox1: TCheckBox;
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
procedure IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
paczka: Tpacket;
gear_tmp:string;
s: array[0..79] of char;

implementation


{$R *.dfm}

procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
begin
Adata.Read(paczka, sizeof(paczka));

//////OG Flags//////

if (paczka.Flags AND 1) <> 0 then
CheckBox1.Checked:= True
else
CheckBox1.Checked:= False;

if (paczka.Flags AND 1) <> 0 then
CheckBox1.Checked:= True
else
CheckBox1.Checked:= False;



end;

procedure TForm1.Button1Click(Sender: TObject);
begin
IdUDPServer1.DefaultPort := 11111;
IdUDPServer1.Active := true;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
IdUDPServer1.Active:=False;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
IdUDPServer1.DefaultPort := 11111;
IdUDPServer1.Active := true;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if checkbox1.Checked = true then
begin
StrCopy(s, 'rev.wav');
sndPlaySound(s, 1);
checkbox1.Checked:=false;
end;
end;

end.

Quote from Gegry1992 :I made with radekteam basecode (only udp packet capture) and my code
set outgauge port to 11111
Download Link: http://data.hu/get/656262/limiter.rar.html
rev.wav copy c:\
you can change to your own rev.wav project1.exe work everything
try it

Strange , Why in "C:\" ? insted of LFS/Data........

This sound strange IMO
i writed for c:\rev.wav to load, but ineed perfect revlimiter sound
Quote from Inouva : Strange , Why in "C:\" ? insted of LFS/Data........

This sound strange IMO

YOU are strange IMO
Quote from Takumi_lfs :YOU are strange IMO

No she isn't It's strange, the program should load it from the folder of LFS.
She, kabbe Toki
Does this work?
yes
I'm curious, what all this people, which somehow cannot post a reply here, since a few hours, are saying, while their discs are being formated or smth....

okey i updated
i don't get it how to make it works
#13 - senn
why does it ask me if i want to keep blocking network connections for this program, why does it even REQUIRE a network connection????
Quote from senn :why does it ask me if i want to keep blocking network connections for this program, why does it even REQUIRE a network connection????

Cuz is a H4x0r!!11One!shift1!
Hmm... its good idea but
i tryed it and its work but lol its not sounds good ...
its not sound from the car :s
i hope you will keep trying until you will do it right
Hmm O.o

RPM Limiter with custom sound
(17 posts, started )
FGED GREDG RDFGDR GSFDG