The online racing simulator
Quote from K0Z3L_43V3R :Nice Smile Updating should work, its working at test servers. How you starting tracker, with kingtracker.bat or manualy? Bat script is restarting tracker if it crashed. That's how updating works - new files are downloaded and tracker is stopped then bat script restart tracker. Update check is done every 3 hours or at tracker start. In case of error they are logged in /log folder.

Ok,I am with kagurazakayukari,so I will describe some technical details about our host here.

Our host was running in a Windows Server 2003 system.I have already set up a web-service of php,ngnix and mysql.so I cant use your Bat script came with the windows' version because it seems that it will set up another web-service which might crashed the web-service I already set.

Instead I use this bat to run your script:

php.exe -e d:/www/kingtracker/public/index.php insim start -d

It did work except it won't restart if it crashed..
Quote from Sheepy1977 :Ok,I am with kagurazakayukari,so I will describe some technical details about our host here.

Our host was running in a Windows Server 2003 system.I have already set up a web-service of php,ngnix and mysql.so I cant use your Bat script came with the windows' version because it seems that it will set up another web-service which might crashed the web-service I already set.

That shouldn't be a problem, just edit your bat to do autorestarts when php script stops:

@echo off
:START
php.exe -e d:/www/kingtracker/public/index.php insim start -d
goto START
pause

Quote from K0Z3L_43V3R :That shouldn't be a problem, just edit your bat to do autorestarts when php script stops:

@echo off
:START
php.exe -e d:/www/kingtracker/public/index.php insim start -d
goto START
pause


Now it works perfectThumbs up
Quote from K0Z3L_43V3R :New version v0.5.1b
- Translation support (how to add language) - partial, more translatable strings will be added in next updates
- FIX automatic restart not working in some cases
- Temporarily disabled split and lap notifications on open tracks

If you have enabled automatic updates, KingTracker will update automatically (!reload)

Download
- windows
- linux



I have temporarily disabled split and lap notifications on open tracks, using current fastest driver's time as WR record on open tracks sounds good I'll add that in next updates. Lap times are saved with all info (car restrictions, layout name ...) so it shouldn't be hard add some filters into Top laps chart.

There was bug with automatic restart in some cases, should be fixed in latest version. Attached sample config for track rotation and reverse grid. After setting up track rotation you can test it with "!test rotate" command.

Runs for a week and it works pretty fine. However there are some little issue...

It seems that its not possible to delete data? I've drive a car with no restrictions for several laps and then change to restricted and the delta shows I'm much slower than its time.....very annoying.....
And for some layout, driving over the construct object(eg some bridges) are invaild in HLVC so 100% no clean lap...
New version v0.5.2
- Layouts support
- !axlist command
- Top laps - show layout name, filter by tyres
- Main loop optimizations
- More translatable strings


Quote from kagurazakayukari :
It seems that its not possible to delete data? I've drive a car with no restrictions for several laps and then change to restricted and the delta shows I'm much slower than its time.....very annoying.....
And for some layout, driving over the construct object(eg some bridges) are invaild in HLVC so 100% no clean lap...

You can set in "User settings -> Timebar" when to reset stint / delta. I'll look if anything can be done with HLVC and object.
CHS for 0.5.2
Attached files
zh_CN.txt - 4.2 KB - 382 views
Quote from K0Z3L_43V3R :New version v0.5.2
- Layouts support
- !axlist command
- Top laps - show layout name, filter by tyres
- Main loop optimizations
- More translatable strings




You can set in "User settings -> Timebar" when to reset stint / delta. I'll look if anything can be done with HLVC and object.

For usage, with the reverse method set correctly, should /start= typed with some parameters or just ignore it? Usually we do a 2-round-race, typed in /start=fixed after Round 1 start and manually order the start place by end race. How to deal with it with tracker now? need type anything different?

And an issue, autosretart still not working in some cases...

Now we are using it as a leaderboard/race combined server, except following issues it works pretty fine~

UPDATE: Somehow we've been enabled autoupdate but it just doesn't work...so update manually by overwriting it and it works fine~

autorestart still not ok...
Its nice to see people are happy about native language.Thumbs up
Attached images
无标题.png
Quote from K0Z3L_43V3R :New version v0.5.2
- Layouts support
- !axlist command
- Top laps - show layout name, filter by tyres
- Main loop optimizations
- More translatable strings
....

I was trying to use KingTracker's database within my website so I wrote a simple php based script which it didn't get the things right and I don't understand why.

My script checks the LAPS table of KingTracker's database every 30 secs.If there is new lap-time record in it ,my script will read it and translate to my database's format and put it into my website's database.

The core-code was as followed:

$sql="select maxID from max_lap_id where host_id=$hostID";
$maxID=getsql($sql,0);//The max_lap_id table was set up by me in order to record the max lap ID that have been put into my database

$sql="select * from laps where track='$track' and id>$maxID order by id ";//make sure don't record the same lap-data again.
$ok=mysql_query($sql);
$idLog='';
if (mysql_num_rows($ok)>0){
while ($row=mysql_fetch_array($ok))
{

$player_id=$row["player_id"];
$sql2="select UName from players where id=$player_id";
$plyName=getsql($sql2,0);
$car=$row["car"];
//$timestamp=time();
$maxID_new=$LapId=$row['id'];
$idLog=$maxID_new."\r\n".$idLog;
$LapTime=$row["time"]/1000;
$sectors=$row["sectors"];
$timestamp=strtotime($row["added"])+8*3600;
$var=json_decode($sectors,true);
$st0=$var["1"];
$st1=$var["2"];
$SectorTime0=getSeconds($st0);
$SectorTime1=getSeconds($st1);
$LapCount=0;
$data=$data."$LapId,1,$plyName,$car,4,5,6,7,8,$LapCount,$SectorTime0,$SectorTime1,$LapTime,$SectorTime0,$SectorTime1,$LapTime,$timestamp\n";
//I will post this $data to my website's receiver.
$sql3="update max_lap_id set maxID=$maxID_new where host_id=$hostID";//update the max-lap-id
mysql_query($sql3);

}

Well, if I set the max-lap-id to zero or something much more smaller than the LAPS table actually recorded,and the script will do it all right which will transfer all data into my website correctly in the very first time .but if the script keep running,all data transfer to my website were wrong.

So I wonder that will KingTracker update the certain LAPS record after insert it into LAPS table?If the answer is yes,could you tell me when KingTracker will update it ?
New version v0.5.2f
- Track rotation - added open layouts
- !status command
- chinese language updated (kagurazakayukari)
- FIX laps saving on some layouts
- FIX restart timers
- FIX layout unloading (splits count)

Download
- windows
- linux

Update
If you are updating manualy there is sql file (update_v0.5.2f.sql) with changes made to database

Quote :So I wonder that will KingTracker update the certain LAPS record after insert it into LAPS table?If the answer is yes,could you tell me when KingTracker will update it ?

Yes, lap records are updated if player made a better time on same conditions (car, track, layout, setup configs, tyres ...), I have added new field "updated" with datetime when it was updated. Also see example code in /external/getLaps.php how you can easily fetch lap time in your script.
Thanks a lot for your kindly reply.Since we are planning to record every single lap that every player did in our server and no matter what time they did,so we have to find some other way to do that.
-
(kagurazakayukari) DELETED by kagurazakayukari
I have unfinished ResultsService - where all laps from last 10 races / qualifications are stored, maybe you can use that.
Oops… Seems Immidietely it become a powerful insim……
Nice to hear that you have this kind of idea… a little bit shocked. Even Airio doesn't have this
Sorry but I have a little problem....
Its hard to find the LFS ID in leaderboard...
The tracker (KingTracker_v0.5.2f) crashed again and show these:

======================================================================
The application has thrown an exception!
======================================================================
Zend\ServiceManager\Exception\ServiceNotCreatedException
An exception was raised while creating "Insim\Controller\Insim"; no instance re
turned
----------------------------------------------------------------------
D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\ServiceManager.p
hp:941
#0 D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\AbstractPlugi
nManager.php(330): Zend\ServiceManager\ServiceManager->createServiceViaCallback(
Object(Closure), 'insimcontroller...', 'Insim\\Controlle...')
#1 D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\AbstractPlugi
nManager.php(289): Zend\ServiceManager\AbstractPluginManager->createServiceViaCa
llback(Object(Closure), 'insimcontroller...', 'Insim\\Controlle...')
#2 D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\ServiceManage
r.php(634): Zend\ServiceManager\AbstractPluginManager->createFromFactory('insimc
ontroller...', 'Insim\\Controlle...')
#3 D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\ServiceManage
r.php(597): Zend\ServiceManager\ServiceManager->doCreate('Insim\\Controlle...',
'insimcontroller...')
#4 D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\ServiceManage
r.php(530): Zend\ServiceManager\ServiceManager->create(Array)
#5 D:\www\kingtracker\vendor\zendframework\zend-servicemanager\src\AbstractPlugi
nManager.php(161): Zend\ServiceManager\ServiceManager->get('Insim\\Controlle...'
, true)
#6 D:\www\kingtracker\vendor\zendframework\zend-mvc\src\DispatchListener.php(94)
: Zend\ServiceManager\AbstractPluginManager->get('Insim\\Controlle...')
#7 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\Mv
cEvent))
#8 D:\www\kingtracker\vendor\zendframework\zend-eventmanager\src\EventManager.ph
p(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 D:\www\kingtracker\vendor\zendframework\zend-eventmanager\src\EventManager.ph
p(263): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend
\Mvc\MvcEvent), Object(Closure))
#10 D:\www\kingtracker\vendor\zendframework\zend-mvc\src\Application.php(340): Z
end\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mv
c\MvcEvent))
#11 D:\www\kingtracker\public\index.php(43): Zend\Mvc\Application->run()
#12 {main}
I cant tell what went wrong from that error messages.
- are there any more logs in /logs folder?
- was that after manual or automatic update?
Quote from K0Z3L_43V3R :I cant tell what went wrong from that error messages.
- are there any more logs in /logs folder?
- was that after manual or automatic update?

Oops,this is my mistake..I just found that the database was deleted by incident.Now it is all ok and thank you!
New version v0.5.3
- ResultsService store last 20 races results and laps / splits (external sample added)
- Automatic race restart after qualify ends (delayed)

Update
update
Reupload please !
Download links fixed
New version v0.5.4
Open tracks improvements:
- split and lap times are compared with fastest lap on current track/layout/car/restrictor
- HLVC disable object contact check with some objects (concrete, ramps) (!host -> race settings -> general)
- translated HLVC messages

Update
update
New version v0.5.5b
- silent mode
- editable commands prefix for each host
- fixed !sc
- updated tracks info BL2, BL3, BL4

Update
update
1-
Does the language change automatically according to the user country?
(Manual option must be added)

2-
I translated the Turkish language,But it didn't work Frown
why?
www/kingtracker/langs -> add tr_TR.txt
"not work"

____
update: Attachments "work"
Attached files
tr_TR.txt - 5.6 KB - 260 views
Thanks for translation, yes language changes automatically based on user in game language, but it have to be set before user joins server - I can't detect user language change, only language when he connects. (manual language selection will be added in near future)

File you sent was saved in wrong encoding (ANSI), KingTracker needs UTF-8. I have attached correct file which worked for me.
Attached files
tr_TR.txt - 5.6 KB - 378 views
Quote from K0Z3L_43V3R :Thanks for translation, yes language changes automatically based on user in game language, but it have to be set before user joins server - I can't detect user language change, only language when he connects. (manual language selection will be added in near future)

File you sent was saved in wrong encoding (ANSI), KingTracker needs UTF-8. I have attached correct file which worked for me.

hmm now work Big grin

"File you sent was saved in wrong encoding (ANSI)" Thumbs up


There is no translation here?
Attached images
Screenshot_2.jpg

FGED GREDG RDFGDR GSFDG