The online racing simulator
And I've tested almost all and fixed a few packets in my "master branch"

I've changed the pack method to expect an array-value for formatting codes with repeater (except aXX).
The changes in PHPInSimMod.php are mainly for testing purposes
lol, already have a yahoo robot slurping the test url

(ok really going to bed now)
i was just reading through the PHPInSimMod.php happened to see this:


<?php 
                
if ($pps || $pps 100)
                {
                    
console('Invalid pps '.$ps.' for '.$hostID);
                    
console('Host '.$hostID.' will be excluded.');
                    continue;
                }
?>

shouldn't that be this?:



<?php 
console
('Invalid pps '.$pps.' for '.$hostID);
?>

yep, fixed in my branch (which dygear will get tomorrow)

PS - If you're interested in the very latest version (my http server + dygears admin updates) you can get it as a plain zip here : http://github.com/VictorVanV/PRISM/archives/httpAndAdmin
how do i get a users Username?
In game, press control, or alt, or shift and it will show up in place of the player name on the connections list (bottom right side of the screen). Also if you talk to them on the forum then it's the username here. LFS Username = Forum Username, they use the same database.
Quote from Dygear :In game, press control, or alt, or shift and it will show up in place of the player name on the connections list (bottom right side of the screen). Also if you talk to them on the forum then it's the username here. LFS Username = Forum Username, they use the same database.

no i meant in the insim like welcome blah(username)
Thats not yet implemented
Quote from Fire_optikz001 :oh :3 ok

*fluffles* Just a reminder Fire_optikz001 you're using something very bleeding edge - although it's good to be involved early on with projects (wish I could lend some time to this tbh ) Although I'm sure you know this, and I apologise with a galactic heap of... something nice.. Kitties? - keep in mind that the api will almost certainly change relatively rapidly and things could be very b0rked I'm not trying to discourage you, infact quite the opposite. I salute you Sir!

Dygear, etc. regarding the function/class arguments, might be worth checking out and adopting how the Zend Framework, Symfony, Doctrine, and many other high profile PHP projects deal with that problem, and basically that's 2 ways - argument #1 can generally be an instance of SomeClassName_Config or an associative array. In both instances you can make a simple loop that iterates over the "named" arguments and assigns or transforms them as necessary Very effective and easy to deal with, and very quickly generalised, as well as lightweight.
Quote from Fire_optikz001 :no i meant in the insim like welcome blah(username)

Like up in the chat are it would say "Welcome, $PName ($UName)"?
Quote from Dygear :Like up in the chat are it would say "Welcome, $PName ($UName)"?

yes :P
Quote from Fire_optikz001 :yes :P


<?php 
php
class welcome extends plugins
{
    const 
NAME 'Welcome';
    const 
DESCRIPTION 'Prints a welcome messages to the client who just joined.';
    const 
AUTHOR 'Dygear';
    const 
VERSION '1.0.0';
    public function 
__construct(&$parent)
    {
        
$this->parent =& $parent;
        
$this->registerPacket('onClientConnect'ISP_NCN);
    }
    public function 
onClientConnect($p)
    {
        
$MTC = new IS_MTC();
        
$MTC->UCID $p->UCID;
        
$MTC->Msg "Welcome {$p->PName} ({$p->UName})";
        
$this->sendPacket($MTC);
    }
}
?>

Things that you should know:
  • You must name this file welcome.php.
  • You must define this plugin in plugins.ini.
2

FGED GREDG RDFGDR GSFDG