The online racing simulator
LFSLapper Adding ISP_CSC (Car's State Changed) packet
hi,

I've added a another small event.
This event shows when the Car's State is changed.

For now it only reports when the car is driving or has been stopped.

##########################################################
#Actions to do when Car's State is changed#
##########################################################
#When $StateOfCar(bits) returns a value
#CSC_STOP, //0 Car stopped
#CSC_START, //1 Car started moving

Event OnCarStateChanged($userName,$StateOfCar)
/*
IF($StateOfCar == 0)THEN
globalmsg(getplayervar($userName,"NickName")."^7 Stopped the car!");
ENDIF
IF($StateOfCar == 1)THEN
globalmsg(getplayervar($userName,"NickName")."^7 Start driving!");
ENDIF
*/
EndEvent

Other value's that i could add in the Event Header.

-Time (current racetimer)
-Direction of the car
-Heading of the car
-Current Speed of the car (speed always be 0 or 1)
-X/Y/Z Coordinates


THIS IS A TEST VERSION
Any feedback whould be nice
Attached files
LFSLapper V7.0.4.1.rar - 2.2 MB - 575 views
Thumbs up
What do you do to vehicle speed ?
It is not possible to get Vehicle speed with this event.


You can get your vehicle speed with:

GetCurrentPlayerVar( "InstantSpeed" );

To get your speed with a command.

CASE "!myspeed":
privmsg("My speed: ".GetCurrentPlayerVar( "InstantSpeed" ). " km/h");
BREAK;


FGED GREDG RDFGDR GSFDG