The online racing simulator
Searching in All forums
(931 results)
Fire_optikz001
S2 licensed
Quote from Dygear :Wait? It's working? I don't remember leaving it in a working state!?

yes its working o.o.... but the repeat is messed up, so in the timer even i just have it recalling the timer
Fire_optikz001
S2 licensed
Quote from Dygear :Where you using the internal PRISM timer or your own setup?

one in PRISM
Fire_optikz001
S2 licensed
Quote from Dygear :Yeah, Pconnect really was never meant to be used in this way. Pconnect assumes that your using the connection between page loads, and it holds the connection in the background. Where as we run in memory all of the time we don't really use Pconnect ... But I will have to send keep-alives every now and again to the connection in the background. I guess I'll be sure to add that to a timer, every 300 seconds should be able to keep the connection open even if I'm not doing anything with it.

nope, my save timer was every 5 min, by the time that 5 min hit it had already lost connection... this is what i had originally tried then i tried pconnect... which didnt woek... so i ended up having to call connect everytime the connection was needed
Fire_optikz001
S2 licensed
Quote from Dygear :Interesting, I was thinking about making a universal PDO interface for PRISM, like spinning it out to a module so everyone can use the same interface structure that's handle by PRISM at the base level. But I really don't know what to do. I know I really should have a single point for MySQL, and SQL in general, interface so that it's standard across the board, but I don't know what to implement.

Should it just be a simple persistent MySQL connection, through a PDO interface that all plugins and all modules can use, or should be go another route where every pluging uses their own interface. (I think that could get messy, so I don't want to do that, but that's what will happen unless I come up with a solution.)

Drawing from experince, I would use the AMX Mod X & Source Mod model of doing it. Let the plugins read from the config files and let them make up their own mind what should be allowed and what should not be allowed via SQL permissions. But they also had to build their on MySQL module in C++ so that it could be used by the SmallC plugin or Source:Pawn plugins. I don't have that problem.

I think I'll provide a basic addon module that will basically just extend PDO in a very simple way, in that it just starts the connection on startup of PRISM (with the module loaded) and keep it's self in a protestant state. If it has any problems I use the Exception system so that they can be handled by the plugins (and their programmers) and not just seen by the user / admin.

I can do alot better with PRISM then I have been doing, and I think that's my new years resolution. To be a better programmer so that everyone can learn from the open source code that I'm producing along with the PRISM development team. (Because, you're all so kick ass for taking time and helping me with this.)

well my problem was even though i used Mysql_pconnect it still seemed to find a way to lose connection to the mysql server... i had to end up going back and call mysql_connect every time the mysql was needed... the only reason i am using remote mysql is so i can pull up stats on my team website...

but beside the few crashes that i had when i first added the mysql to the plugin i haven't had any problems at all
Fire_optikz001
S2 licensed
Quote from Dygear :That's right, bitches! This one is stable!

Haha, thanks for the help ... Like I said man, keep up the good work!

i will :] This will be one insim project that i actually plan to stay with till the end... i'm still working on my cruise plugin... i finally got all the kinks worked out that i had with Remote MYSQL crashing Prism....

P.S. Am i an official PRISM Dev? reason i am asking is i have read + write powers for the PRISM GIT
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Dygear :So, no one found any bugs? 'Effing sweet!

your welcome
Fire_optikz001
S2 licensed
we are sorry for anyone who may have joined last night, our stats failed due to the fact that my IP changed, so the Remote MYSQL denied connection
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from mat6681 :
Atm we are working on that to windstyle cruise (it died a little month ago ) and Team ImP mixed together.

Windstyle has not died... they are currently remaking their insim from scratch...
Fire_optikz001
S2 licensed
Quote from m1chi119 :still doesnt work, shows to someone random :-P

works fine for me o.o
Fire_optikz001
S2 licensed
Quote from Dygear :I'm not a fan of the ClickID's at all, I can't wait to get higher then that and just let PRISM handle it for me. (I do mean that I'll have to program SOMETHING, but I'll program it once, and never hard to worry about ClickIDs ever again.)

couldn't you program what LFSLapper has? and go by a button "name" instead of a click ID?
Fire_optikz001
S2 licensed
Quote from m1chi119 :

<?php 
        
CASE "!red":
            IF( 
$argv != "" )   
            
THEN 
                $temp 
GetListOfPlayers( );                   
                    FOREACH( 
$maVar IN $temp 
                        
$NickName GetPlayerVar($maVar["value"], "nickName"); 
                        
$NickStrip StripLFSColorToLower($NickName) ); 
                        
$IdxOfTag indexOf$NickStrip "[TEAM]"); 
                            IF( 
ToNum(indexOf$NickStrip "[TEAM]")) >= 
                                
THEN 
                                    PrivMsg
($maVar["value"],"Red: ".$argv
                            ENDIF 
                    ENDFOREACH 
            ENDIF 
        BREAK;
?>

tried to add this in Lapper.lpr -> not working :-S

oh i see why... i fogot... the [TEAM] has to be lower case

so

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

Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from m1chi119 :Okay, as i said, the Trackchange thing is done, i think i am close to the Admin-Only-Help but the Private-Chat i cant make it :-S


<?php 
  
IF( $argv != "" )   THEN
  $temp 
GetListOfPlayers( );                  
        FOREACH( 
$maVar IN $temp )
           
$NickName GetPlayerVar($maVar["value"], "nickName");
           
$NickStrip StripLFSColorToLower($NickName) );
         
$IdxOfTag indexOf$NickStrip "[TEAM]");
         IF( 
ToNum(indexOf$NickStrip "[TEAM]")) >= )
               
THEN
               PrivMsg
($maVar["value"],"Team: ".$argv)
               ENDIF
        ENDFOREACH
    ENDIF
?>

Fire_optikz001
S2 licensed
Quote from m1chi119 :how to do the thing with timer? :-S sry, i am kinda new to C# :-D
Done with trackchange - changed ctrack code as needed and added + included as new file :-)


does the code check for a Group or does it check the Nickname for a special tag? :-)

And, how to make special parts of Help only visible to special groups? :-S

LFSLapper is not C# ... the base is C# but the actual code in the LPRs is GLScript... something that Gai made up...
Fire_optikz001
S2 licensed
Quote from m1chi119 :i want one command to End the Race, change the track and load a layout after, how to do this?
CASE "!command":
IF ( UserIsAdmin( $userName ) == 1 )
THEN
cmdLFS( "/end" )
Thread.Sleep(4000)
cmdLFS( "/track BL3" )
Thread.Sleep(10000)
cmdLFS( "/axload layout" );
ENDIF
BREAK;

This doesnt work :-S

Also how to add a Private chat regarding Nicknames? E.g. [TEAM]Michi119 and [TEAM]XYZ should be able to read the message when someone writes "!team test" :-S
Next Problem: Making Admin-Help only visible for admins :S

if i remember correctly there is currently to make lapper sleep... what you could do though is make it so it calls a timer or you could edit the source and add a sleep function yourself

i have the code somewhere where you can send team members messages... i will find it asap
Fire_optikz001
S2 licensed
not to be a bother... but on your banner you have .infp :X
Fire_optikz001
S2 licensed
Quote from Dygear :
The idea behind the zero width & height button detail is that you could update the button without knowing where it was on screen. Not sure how useful that is any more come to think of it.

the current way of BTNs = array(); seems like a great solution to this problem... i could see it coming very in handy with some of my future plugins that i plan to create.
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
A few things:
Come This weekend for free $10,000 in insim cash!

Just added:
  • Insim stats can now be access on the site! Example
  • you can now click on a username in the server stats(previously LFSWorld link) which will bring you to that user's insim stats
Coming soon:
  • a new PHPChat which will sync between the server(VIA PRISM) and the chat itself
  • more Cruise insim functions
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
On the turn after the old pits.... but you don't have access to as5 o.o
New Insim
Fire_optikz001
S2 licensed
Hey you guys!
...
Anyways, hey guys, i have been hard at work making a new insim... if all goes well it will be ready by... Christmas morning ... The insim has been up in the server for the last few days, but the insim will have a decent amount done to it by then...

Cya later, T3charmy
Fire_optikz001
S2 licensed
i turned the insim off for the night...

@Dygear, i have sent you a copy of the php file check your PM
Fire_optikz001
S2 licensed
Quote from Dygear :Are you going to release the source code for this?

i plan to yes, Just trying to get the basic functions added before i release.
Fire_optikz001
S2 licensed
hmm so how would i create a timer for a specific user? like when a user it displays welcome message for 5 seconds then it disappears... i looked but i couldn't find out how

Current Progress: http://sprng.me/9iupd
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Dygear :Not sure if I finished these functions or not, but you should be able to use this, in the plugin's constructor.


<?php 
$this
->createTimer($interval 1.0$callback$args NULL$flags Plugins::TIMER_CLOSE)
?>

The following code will make a timer that will run every 300 seconds (that's 5 minutes) and execute the plugin function called sqlSave. It still not send any args to that function, but it will repeat it self.

<?php 
$this
->createTimer(300'sqlSave'NULLTIMER_REPEAT);
?>


PHP NOTICE:
Use of undefined constant TIMER_REPEAT - assumed 'TIMER_REPEAT'

Edit: nvm fixed that... now once the timer is activated once it repeats itself every second instead of doing it every 5 min

and i get
PHP NOTICE:
Undefined index: flags
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Ok, so today, i added stat save to mysql... just wanted to know if there is a way to save states EVERY 5 min.
Fire_optikz001
S2 licensed
Quote from Dygear :I will go and take a look. This sounds interesting.

sorry i forgot to leave prism running when i went to sleep... so check it out any time today
FGED GREDG RDFGDR GSFDG