The online racing simulator
Searching in All forums
(13 results)
Stakikety
Demo licensed
Specifies 30 seconds saved here ,


<?php 
IF ( GetCurrentPlayerVar"IsHost" ) != "")
    
THEN
      PrivDelayedCommand
"savedist_" GetCurrentPlayerVar"UserName" ),30Save_total_distance_driven );
    ENDIF
?>

Here, it saves to the database , I'm sorry if I gave the wrong information.

<?php 
Sub Save_total_distance_driven
$userName )
    
$total_distance_driven GetCurrentPlayerVar"total_distance_driven" ) + GetCurrentPlayerVar"TotDistMeter" );
    
SetCurrentPlayerVar"total_distance_driven",$total_distance_driven );
    
SetCurrentPlayerVar"TotDistMeter",);
    
SetUserStoredValue"total_distance_driven"$total_distance_driven );
    
Total_distance_driven$KeyFlags );
EndSub
?>


Stakikety
Demo licensed
Thank you Smile
About the IP address
Stakikety
Demo licensed
Players entering the pits , I get the IP address . Without entering the pit , can I get the ip address?
Stakikety
Demo licensed
Thank you , I tried to kick myself , no kick . Ip address 127.0.0.1 I did. I guess that throws another player ?
Stakikety
Demo licensed
I tried, unfortunately did not work . I think the problem , Can not pull ip address from list
Stakikety
Demo licensed
I did something like this , where is the error ?



<?php 
Event OnNewPlayerJoin
$userName 
UserInGroup"IPAdress""./Blacklist.txt" );

IF (
UserInGroupGetCurrentPlayerVar($userName,"IPAdress") == 1
THEN
cmdLFS
("/kick " GetCurrentPlayerVar("userName") );
ENDIF
EndEvent
?>


Server IP Kick
Stakikety
Demo licensed
Hello

I found a code when I was browsing the forum. We will create a new text document, If you have IP in the list if a direct kick. For this can you help?


Code :

Event OnNewPlayerJoin( $userName )
IF (GetCurrentPlayerVar($userName,"IPAdress") == "127.0.0.1")
THEN
cmdLFS("/kick " . GetCurrentPlayerVar("userName") );
ENDIF
EndEvent

Last edited by Stakikety, .
Stakikety
Demo licensed
Thank you for everything Thumbs up
Stakikety
Demo licensed
Tried again, and I think the problem is in variables

Stakikety
Demo licensed
Will you fix the missing part and give me the code?
Stakikety
Demo licensed
I came to such a conclusion. But I can not get the IP address ?


CatchEvent OnLapperStart()
RegisterScheduleAction( "0 * * * * * *", Timer_Sub );
EndCatchEvent

Sub Timer_Sub1()
$Players = GetListOfPlayers();
FOREACH ($NickName IN $Players)
SetUserStoredValue($NickName["value"], "IPAdress", GetPlayerVar($NickName["value"],"IPAdress"));
ENDFOREACH
EndSub

Last edited by Stakikety, .
Stakikety
Demo licensed
Yes, can be done

CatchEvent OnNewPlayerJoin( $userName )
online( $KeyFlags );
EndCatchEvent

Sub online( $KeyFlags )
openGlobalButton( "test500",5,112,30,4,4,-1,32,"^T^7Date ^2: ^7 ". GetLapperVar ( "ShortDate" ),"" );
openGlobalButton( "test501",5,116,30,4,4,-1,32,"^T^7Clock ^2: ^7 ". GetLapperVar ( "LongTime" ),"" );
openGlobalButton( "test502",5,120,30,4,4,-1,32,"^T^7Map ^2: ^7 ". GetLapperVar ( "ShortTrackName" ),"" );
HostDelayedCommand( 1, online );
EndSub
Stakikety
Demo licensed
Tonyslayt I agree with you , Yisc[NL] can you write us a plugin for this?
FGED GREDG RDFGDR GSFDG