The online racing simulator
Searching in All forums
(535 results)
misiek08
S3 licensed
There is a flag "R" for that.
misiek08
S3 licensed
ISRM is working with Z28 very good.
Show table
misiek08
S3 licensed
Hi!
Here's is first version of my plugin which generates table and shows it to user. It's open source, free and other thigs so you can edit it and release again but please remember to don't forget to write my nick as first creator.


<?php 
php
class table extends Plugins
{
    const 
NAME 'Table Plugin Example';
    const 
AUTHOR 'misiek08';
    const 
VERSION PHPInSimMod::VERSION;
    const 
DESCRIPTION 'Plugin to generate button table. Can be used for showing results or other info.';

    private 
$data = array(array('test''test2''test3'),array('teste''teste2''teste3'),array('tester''tester2''tester3'));
    private 
$header = array('1st''2nd''3rd');
    private 
$width 10;
    private 
$height 8;
    private 
$x 50;
    private 
$y 50;
    
    
/* Remember about this:
        define('IS_X_MIN',    0);
        define('IS_X_MAX',    110);
        define('IS_Y_MIN',    30);
        define('IS_Y_MAX',    170);
    */

    
public function __construct()
    {
        
$this->registerSayCommand('prism table''cmdTable'"Shows defined in code table for used.");
    }
    public function 
cmdTable($Msg$UCID$packet)
    {
        
$cols count($this->header);
        
$rows count($this->data);
        
$id 70;
        for(
$i 0$i $rows$i++){
            for(
$j 0$j $cols$j++){
                
$this->createButton($UCID,
                
$id,
                 ((
$j 1) * $this->width) + $this->x,
                 ((
$i 1) * $this->height) + $this->y,
                  
$this->width,
                   
$this->height,
                   
$this->data[$i][$j]);
                   
$id ++;
                   echo ((
$i 1) * $this->height) + $this->PHP_EOL;
            }
        }

        return 
PLUGIN_HANDLED;
    }
    
    private function 
createButton($ucid$id$x$y$w$h$text){
        
$btn = new IS_BTN();
        
$btn->UCID($ucid)
            ->
L($x)
            ->
T($y)
            ->
ClickID($id)
            ->
W($w)
            ->
H($h)
            ->
Text($text)
            ->
Send();
    }
}

?>

misiek08
S3 licensed

<?php 
$pst 
$SDK->get_pst('juniox_dias');
?>

Try this.
misiek08
S3 licensed
This will not work because u use 2 variables: $_Session and $PlayerVar so you have to choice which one are you going to use.

On-topic:
You can get UCID by additional function.
misiek08
S3 licensed
How it's working? Send_MST_Message is trigerring error?
misiek08
S3 licensed
@Dygear - you said and I know it - PHP executes script from left to right in this example. So if you do IS_BTN_and_text_x_y_.....->Send()->W(0)->H(0); you send button with dimensions specified (or not - that's bad) before Send() and W(0) and H(0) doesn't make sense, because LFS is not receiving it. It's after Send()!
Position change
misiek08
S3 licensed
Hi!
I need plugin showing who changed position, who was overtook and what the position was but not like: Misiek from 18 to 17, Dygear from 17 to 18 as alone messages. I wonna see: Misiek overtook Dygear (18 to 17).
misiek08
S3 licensed
Yes, I was updating sometimes from github. Changes are big. Tell me please - will every of actual function work in the future or you are rewriting all the API and functions in the future will be different?

EDIT:
I have the first question: why u are doing: ->Send()->W(0)->H(0); ??
Last edited by misiek08, .
misiek08
S3 licensed
It's working good for me.
misiek08
S3 licensed
- Misiek
- misiek08
- Poland
- Kożuchów
- without photo - I'm not publishing my photos public in internet.
misiek08
S3 licensed
It is possible to reupload this file?
misiek08
S3 licensed
BTT packet.
misiek08
S3 licensed
You can. I'll try my solution first and then you can do your. I will do it in 0.3.0 or in 0.3.1 but only if you will release it tomorrow before 15pm UTC
misiek08
S3 licensed
Wow, saving MCI's and NLP's could kill system because PHP can be blocked by connection php-mysql. But every other packet can be logged. I think you are going to make this view (code it) but when?
misiek08
S3 licensed
s1,s2,s3 are split times.

EDIT:
overallTime is changed on LAP and SPX packet's so the ETime from last LAP packet (lapsdone) != overallTime
Last edited by misiek08, .
misiek08
S3 licensed
Quote :SELECT *,IF(s1=0,1,0) as s1_isnull, IF(s2=0, 1, 0) as s2_isnull, IF(s3=0, 1, 0) as s3_isnull FROM results ORDER BY lapsdone DESC, s1 ASC, s2 ASC, s3 ASC, s1_isnull ASC, s2_isnull ASC, s3_isnull ASC

Did I miss something?
misiek08
S3 licensed
Hmn, we have to include splits (because it's 5 sec interval, AJAX system). You did this if the table looks like
Quote :results { lfsw, name, lapsdone, overallTime, s1,s2,s3,car,pits}

lapsdone gets from the last packet and s1,2,3 too.
overalllTime is ETime from the last SPX or LAP packet.

EDIT: Chagned spX columns to sX columns - that are splits.
Last edited by misiek08, .
misiek08
S3 licensed
I know how to do it but only with the same time of start. Can someone write an algorithm (script) in any programming lang for this? I will translate it to PHP but help me, please.
misiek08
S3 licensed
Someone from polish forum gave me panel. Delete topic please.
misiek08
S3 licensed
You said something about changing API and the plugin can not work. This system will use multi hosts and some other PRISM modules so it can be time wasting now.
misiek08
S3 licensed
Ok. I can select from DB data about last ETime in LAP packet and count laps. So we have now array:

<?php 
$racers 
= array('benten' => array(25150000'XFG'), 'boothy' => array(24149900'XRG'), 'Dygear' => array(25147800'FXO'));
?>

I will do some code in 1 hour so we can finish that today. I will not write all of the LTWT before 0.4.0 because Dygear said there will be big changes in API.
misiek08
S3 licensed
Ok. Now we should take array for players but wchich data is needed and how to compare it. For example we have 4 servers and races didn't started at same time. Track is KY Oval. On 1,2 servers when people are crossing S-F line, on 3,4 servers people crosses SP1.
Comparing last registered times will not work. All data is saved in database. Splits, laps, pitstop have separate tables.
LTWT: Live Teams Web Tracker
misiek08
S3 licensed
Hi!
After LWT wchich is easy (but maybe something will change with 0.4.0 version of PRISM) I will start working on LTWT.

Here is my problem. I can do everything but only when I have 1 server.
Can you help me with script that calculates positions for multi-server race.
First version of defining classes (but I will change if the change will help us) for cars is something like this:

<?php 
$classes 
= array('TBO' => 'FXO,XRT''STD' => 'XFG,XRG');
?>

or

<?php 
$classes 
= array('TBO' => array('FXO','XRT'), 'STD' => array('XFG','XRG'));
?>

misiek08
S3 licensed
I have that application. It's sending live (every 5 seconds) fuel status to my DB but not everyone will install soft.
FGED GREDG RDFGDR GSFDG