The online racing simulator
Searching in All forums
(931 results)
MTC Send...
Fire_optikz001
S2 licensed
When I go to use the Send(); on a MTC packet, Prism just flat out gives me "Press any key to continue..." no error, now warning, nothing. The code I am using is


<?php 
    
public function onPrismError($errno$errstr)
    {
        
$MTC = new IS_MTC;
        
$MTC->UCID(255)->Text('^1ERROR: ^7['.$errno.'] '.$errstr)->Sound(4)->Send();
    }
    public function 
onPrismClose()
    {
        
$MTC = new IS_MTC;
        
$MTC->UCID(255)->Text('^1FATAL ERROR. Restarting...')->Sound(4)->Send();
        
Cruise::sqlSaveAll();
    }
    public function 
__construct()
    {
        
#PHP Stuff
        
set_error_handler(array($this'onPrismError'));
        
register_shutdown_function(array($this'onPrismClose'));
?>

I ran prism with out the ->Send() and it works fine, but soon as I go to send it, it crashes...
Edit... Just realized I posted from wrong account >.<
Fire_optikz001
S2 licensed
Quote from Krammeh :can you still use $... = new IS_BTN?

yes you can
Fire_optikz001
S2 licensed
hmm question, is it currently possible to update an existing button VIA the new button manager? cause when you currently try to resend the button, it just keeps adding buttons, but not deleting the old ones :/

the easy way to add this if it doesn't exist, would be to check if the button(key) exist, if it doesn't add it, if it does, update it
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
testing now :] I will be converting my cruise app over to the new button manager some time tonight, so feel free to come test it out =]

Edit: you forgot to include Layout Object :/
Edit2: NVM, you just forgot to remove the include from the pylons.php
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Dygear :No, I'm not home to submit the fix. I'm sitting in my ambulance corps right now.

ahh ok, no rush, so far, I love A2, and 0.3.6 updates, and all of it's packets :P
Fire_optikz001
S2 licensed
Quote from mat6681 :could we maybe get a new dl link?

https://spideroak.com/browse/share/T3charmy_Public/LFSLapper

and download the Complete.zip...
Fire_optikz001
S2 licensed
!refund <car,km,cash> <amount> <user>
Examples:
  • !refund car XRT Fire_optikz001
  • !refund cash 100 Fire_optikz001
  • !refund KM 10 Fire_optikz001
forcefine is the same, just do !forcefine instead of !refund

bye bye now
Fire_optikz001
S2 licensed
just wanted to say i fixed a few small things since the release, you may want to either
  1. run the included patcher
  2. if the patcher give "virus" warning download it manually
Fire_optikz001
S2 licensed
Quote from m1chi119 :It should spec everybody who joins after i did !lock, until i do !unlock to unlock the race again (it should also work in Training)
Why it doesnt work? Whats the mistake? :-S

why not just use mid race join?
Fire_optikz001
S2 licensed
New Version available: https://spideroak.com/browse/share/T3charmy_Public/LFSLapper (click download on Complete.zip)

Please note: This is the LAST update that i will be releasing

New in this version:
  1. !chase command has been redone type !chase and get a list of users within range
  2. !pay command hs been added
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Dygear :

<?php 
    
public function tmrMsgGoAway($UCID$number)
    {
        
/* Remove all welcome BTNs from screen */
        
return PLUGIN_STOP;
    }
?>


oh ok, thanks for clarifying
Fire_optikz001
S2 licensed
well all is well, as long as it does what we need :P
Fire_optikz001
S2 licensed
Quote from Krammeh :Presume this would also work


<?php 
$this
->createTimer('tmrMsgGoAway'15.0Timer::CLOSE, array($UCID1);
$this->createTimer('tmrMsgGoAway'55.0Timer::CLOSE, array($UCID2);
?>

and so on?

thats what i was thinking/wondering
do it that way then just list it i would assume?


<?php 
    
public function tmrMsgGoAway($argv)
    {
        list(
$UCID$number) = $argv;
        
/* Remove all welcome BTNs from screen */
        
return PLUGIN_STOP;
    }
?>

or i guess this would work too


<?php 
    
public function tmrMsgGoAway($argv)
    {
        
$UCID $argv[1]; $number $argv[2];
        
/* Remove all welcome BTNs from screen */
        
return PLUGIN_STOP;
    }
?>

Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
didn't you have alot of this already made?(i see now you updated it)... either way nice! :P ... i don't really use LFSLapper anymore but meh :P
Fire_optikz001
S2 licensed
Quote from Dygear :So you might be wondering why I would setup an argument within the Timers::createTime function, right? What good will that do? Well consider this usage case:


<?php 
php
class welcomeTimer extends Plugins
{
    const 
NAME 'WelcomeTimer';
    const 
DESCRIPTION 'A timed welcome message to the client, using buttons.';
    const 
AUTHOR "Mark 'Dygear' Tomlin";
    const 
VERSION PHPInSimMod::VERSION;

    public function 
__construct()
    {
        
$this->registerPacket('onClientConnect'ISP_NCN);
    }

    public function 
onClientConnect($Packet)
    {
        
$UCID =& $Packet->UCID;
        
/* Make a welcome message with BTNs */
        
$this->createTimer('tmrMsgGoAway'15.0Timer::CLOSE$UCID);
    }

    public function 
tmrMsgGoAway($UCID)
    {
        
/* Remove all welcome BTNs from screen */
        
return PLUGIN_STOP;
    }
}
?>


yay i needed this
Fire_optikz001
S2 licensed
Meh, since i'm starting to get away from LFSLapper more and more these days, i figured i would release my chat system that i made a while back, hopefully some one will find use of it
Fire_optikz001
S2 licensed

<?php 
 
 
CASE "!red":
  
$NickName GetCurrentPlayerVar("NickName");    
  
$NickStrip StripLFSColorToLower($NickName))
  
$IdxOfTag indexOf$NickStrip "[r]");
  IF( 
$IdxOfTag!= -)
  
THEN
   
IF( $argv != "" )      
   
THEN    
    $temp 
GetListOfPlayers( );                      
    FOREACH( 
$maVar IN $temp )    
     
$NickName GetPlayerVar($maVar["value"], "NickName");    
     
$NickStrip StripLFSColorToLower($NickName) );    
     
$IdxOfTag indexOf$NickStrip "[r]");    
     IF( 
$IdxOfTag != -)    
     
THEN    
       $argv1 
substr$argv,0,30 );
            
IF( 
strlen($argv) > 30 )
THEN 
 $argv2 
substr$argv,30,strlen($argv) );
ENDIF

IF( 
$argv2 != "" )
THEN  
IF( strlen($argv2) > 30 )
THEN 
 $argv3 
substr$argv,strlen($argv2),strlen($argv) );
ENDIF
ENDIF

PrivMsg$maVar["value"], "^1[r] " GetCurrentPlayerVar"UserName" ) .  " ^8: ^2" $argv1 );
                         
IF( 
$argv2 != "" )
THEN
  PrivMsg
$maVar["value"], "^1[r] " GetCurrentPlayerVar"UserName" ) .  " ^8: ^2" $argv2 );             
ENDIF
IF( 
$argv3 != "" )
THEN
  PrivMsg
$maVar["value"], "^1[r] " GetCurrentPlayerVar"UserName" ) .  " ^8: ^2" $argv3 );             
ENDIF    
     ENDIF    
    ENDFOREACH    
   ENDIF
  ENDIF    
 BREAK;
?>

Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Krammeh :does the connection handler auto reconnect at all?

Yes, it does it attempts to connects 5 times if they fail it closes PRISM
Fire_optikz001
S2 licensed
Quote from edza1188 :

int Jobnum = new Random[COLOR="Red"][B]()[/B][/COLOR].Next(1, 8);



int Jobnum = new Random.Next(1, 8);

This should work... i have no C# Knowledge so... give it a try and let me know?
Fire_optikz001
S2 licensed
oh wow i checked this right as you posted... any who... i may as well just build off of what i'm doing now then... depends what is more stable/quicker though
Fire_optikz001
S2 licensed
Quote from Dygear :I don't want to hold you back, so use you're own system for now, and when I release the next version you can just swap over. It should be pretty easy to do.

how exactly does a PDO work? can it still use MYSQL? so i can sync it with my website or would it just be better to stick with the MYSQL connect
Fire_optikz001
S2 licensed
in honor of the new year... all cars are unlocked... and we will be giving out free cars all tomorrow
Fire_optikz001
S2 licensed
Us members in [SC] would like to wish you a happy new years dean...
Fire_optikz001
S2 licensed
Quote from m1chi119 :Thanks so much, but i got 1 more question :-P
Is it also Possible to show the Nickname of the User who sent it?
Like
Nick[RED]:TEXT

yes, just change "^1RED" to GetPlayerVar($userName, "NickName")." ^1:"
Fire_optikz001
S2 licensed
Quote from Krayy :Your IF statement where you check if the IndexOf was successful is using the wrong var - idxSpace instead of IdxOfTag. Change it to this:

<?php 
        
CASE "!red"
            IF( 
$argv != "" )    
            
THEN  
            $temp 
GetListOfPlayers( );                    
                FOREACH( 
$maVar IN $temp )  
                
$NickName GetPlayerVar($maVar["value"], "NickName");  
                
$NickStrip StripLFSColorToLower($NickName) );  
                
$IdxOfTag indexOf$NickStrip "[r]");  
                    IF( 
$IdxOfTag != -)  
                    
THEN  
                        privMsg 
($maVar["value"],"^1Red: ^7".$argv);
                    ENDIF  
                ENDFOREACH  
            ENDIF  
        BREAK;
?>


oh wow... fail
FGED GREDG RDFGDR GSFDG