The online racing simulator
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
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
?>


<?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
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;
?>

still doesnt work, shows to someone random :-P

<?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( 
$idxSpace != -)  
                    
THEN  
                        PrivMsg
($maVar["value"],"^1Red: ^7".$argv)  
                    ENDIF  
                ENDFOREACH  
            ENDIF  
        BREAK;
?>

This is exactly the code, tried it with someone else on the server, my name was
[R] Michi
his name:
[TEAMTAG]>NAME<
he was able to read the message, i wasnt
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;
?>

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
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
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:"
Thanks so much :-)
Hi guys,

I have LFSLapper versions. 5.529(was it like that ?) and 6.011. I am trying to get drift to my friend and i have got it sometime work but not anymore I am using your drift things Sinanju and cant get them work For 6.011 T3Charmy said that they are ready on it ? When i connect it to my server i type !gui Therein bottom is Drift option and when i put it to YES nothing what is drift comes on it nothing. Could you guys help me ?

P.S. This message is posted from train because i am going to a holiday and i will get the LFSLappers to this minilaptop.

See you
-jsrk-
Look in the .\bin\default\includes folder, you will see a file called addonused.lpr.

You need to open this up (Notepad will do), and you will see a line #include( "./driftmeter.lpr");

Remove the # (hash) sign from front of line, then save. Restart lapper again and the separate driftmeter should now be working.
Blue and yellow flag
Hi i've read posts on the sub forum but i've not find the answer about the disparition of flags during the race.
Is there a method or a code to correct it?

I wish you all a healthy 2011
Quote from vdl-nei :Hi i've read posts on the sub forum but i've not find the answer about the disparition of flags during the race.
Is there a method or a code to correct it?

Could you explain the problem a little bit more? I'm not sure what you are trying to fix.
How to let a !axlist display /axlist?
tried with

<?php 
        
CASE "!axlist":
            IF ( 
UserIsAdmin$userName ) == || UserInGroup"admin1",$userName ) == || UserInGroup"admin2",$userName ) == || UserInGroup"admin3",$userName ) == 1)
            
THEN            
              cmdLFS
"/axlist" );
            ENDIF
            BREAK;
?>

But it doesnt show the /axlist output
Quote from Austin Hedley :

<?php 
##################################
#Options for idle player on track#
##################################
#$IdleExclude = "Lagamel,Gai-Luron"; # Usernames excluded for idle check
$OnIdleTimeout1 20# Idle timeout for OnIdleAction1 in seconds
Event OnIdle1$userName # Player event
privMsglangEngine"%{main_idle1}%" ) );
EndEvent
$OnIdleTimeout2 
30# Idle timeout for OnIdleAction2 in seconds
Event OnIdle2$userName # Player event
cmdLFS"/spec " GetCurrentPlayerVar("UserName") );
privMsglangEngine"%{main_idle2}%" ) );
EndEvent
?>


How would I change $IdleExclude = "Lagamel,Gai-Luron";
to read list from a txt file instead?
Assuming text file is admin.txt in default.

Finally worked out the answer, so I thought I'd post my working code for others to see.

<?php 
##################################
#Options for idle player on track#
##################################

#$IdleExclude = "names here"; # Usernames excluded for idle check

$OnIdleTimeout1 20# Idle timeout for OnIdleAction1 in seconds

Event OnIdle1$userName # Player event
    
privMsglangEngine"%{main_idle1}%" ) );
EndEvent

$OnIdleTimeout2 
30# Idle timeout for OnIdleAction2 in seconds

Event OnIdle2$userName # Player event
    
UserGroupFromFile"admin""./admin.txt" );
    
$UserName GetCurrentPlayerVar("UserName");
    IF( 
UserInGroup"admin",$UserName ) == )
    
THEN
    privMsg
"^3You have admin status and wont be kicked ;)");
    ELSE
    
cmdLFS"/spec " GetCurrentPlayerVar("UserName") );
    
privMsglangEngine"%{main_idle2}%" ) );
    ENDIF
EndEvent
?>



guys : ((Options for idle player on track)) not working

#$IdleExclude = "names here"; # Usernames excluded for idle check << what dos that means ??
Do I have to put password admins here or what to work properly !!
Quote from ViKTOOR-LFS :guys : ((Options for idle player on track)) not working
#$IdleExclude = "names here"; # Usernames excluded for idle check << what dos that means ??
Do I have to put password admins here or what to work properly !!

Any part of a line with with a hash (#) symbol before it gets ignored by lapper. The hash is usually used for comments.

That's why sometimes in a lapper script you'll see a bit of code followed by a hash followed by comments on the line of script (e.g. $AdminFile = "./admin.txt"; # Name of the file containing admin lfsname player).

Normally, the $IdleExclude would be used by admins so that if they stop on track for any reason (to answer questions, kick or ban someone, etc), they don't get spectated.

So for your server, you might have
$IdleExclude = "ViKTOOR-LFS";
Quote from m1chi119 :How to let a !axlist display /axlist?
tried with

<?php 
        
CASE "!axlist":
            IF ( 
UserIsAdmin$userName ) == || UserInGroup"admin1",$userName ) == || UserInGroup"admin2",$userName ) == || UserInGroup"admin3",$userName ) == 1)
            
THEN            
              cmdLFS
"/axlist" );
            ENDIF
            BREAK;
?>

But it doesnt show the /axlist output

Hi,

Its not posible to use axlist in lapper to show a list of layouts on the screen.

It will only work for the user who type /axlist on the server.
So if you type ( if you are logged in as a admin ) /axlist . The (dedi)server shows the list of layouts that are stored on the (dedi)server for that track to the user that typed /axlist.

If you do this in lapper then lapper do the /axlist to the (dedi)server and not you.
If you do this in lapper it works but the output of the list of layouts is show in the console of the dedi server and not on the screen.

But its posible to use lapper to load layouts. ( /axload layout_name )



PS. layouts are not working on Demo servers
Okay, thats bad :-(

<?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; 
?>

Need more help with this one :-(
how to make the message be able to be longer?
And how to make that only people who could also Read the Message, are able to send a Message to them?
Quote from m1chi119 :Okay, thats bad :-(

<?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; 
?>

Need more help with this one :-(
how to make the message be able to be longer?
And how to make that only people who could also Read the Message, are able to send a Message to them?

Hi,

You can check if a nickname starts with [r] then you can use !red
Its only posible (i think) to use 95 character on one line but if you use colors then the colors codes are also counting.
You can show the $argv on a new line so the message can be a bit longer.




<?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    
      privMsg 
($maVar["value"],"^1Red:");
      
privMsg ($maVar["value"],$argv);  
     ENDIF    
    ENDFOREACH    
   ENDIF
  ENDIF    
 BREAK;
?>

Quote from sinanju :Any part of a line with with a hash (#) symbol before it gets ignored by lapper. The hash is usually used for comments.

That's why sometimes in a lapper script you'll see a bit of code followed by a hash followed by comments on the line of script (e.g. $AdminFile = "./admin.txt"; # Name of the file containing admin lfsname player).

Normally, the $IdleExclude would be used by admins so that if they stop on track for any reason (to answer questions, kick or ban someone, etc), they don't get spectated.

So for your server, you might have
$IdleExclude = "ViKTOOR-LFS";

ty sinanju

put what realy i mean is this code not working at all !
##################################
#Options for idle player on track#
##################################
#$IdleExclude = "ViKTOOR-LFS"; # Usernames excluded for idle check
$OnIdleTimeout1 = 20; # Idle timeout for OnIdleAction1 in seconds
Event OnIdle1( $userName ) # Player event
privMsg( langEngine( "%{main_idle1}%" ) );
EndEvent
$OnIdleTimeout2 = 30; # Idle timeout for OnIdleAction2 in seconds
Event OnIdle2( $userName ) # Player event
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privMsg( langEngine( "%{main_idle2}%" ) );
EndEvent

i try to lit my self on server for 10 min put nothing happen! he should spectated me to pit .. like

main_idle1 = "^3You are idle and will be spectated in 10 seconds" ;
main_idle2 = "^3You are spectated for non-activity";

Hi ViKTOOR-LFS,

Your code looks ok. Did you reloaded lapper? ( !reload )
Quote from Tim NL :Hi ViKTOOR-LFS,

Your code looks ok. Did you reloaded lapper? ( !reload )

what is !reload ... you mean restart from Control Panel !! or somthing als
This thread is closed

Config help
(1112 posts, closed, started )
FGED GREDG RDFGDR GSFDG