<?php
IF $flagConfirm & 2 THEN # 2 means that the result is confirmed.
?>
<?php
SWITCH( GetCurrentPlayerVar("FinishedPos") ) # variable for race finish order
CASE 1:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point900",$point_L,$point_T-4,40,4,4,-1,96,"^7 Race on ^3" . getLapperVar("LongDate") . " @ " . getLapperVar("LongTime") );
openGlobalButton( "point910",$point_L+40,$point_T-4,6,4,4,-1,96,"^7points" );
openGlobalButton( "point001",$point_L,$point_T,40,4,4,-1,96,"^7 1 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point101",$point_L+40,$point_T,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 2:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point002",$point_L,$point_T+4,40,4,4,-1,96,"^7 2 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point102",$point_L+40,$point_T+4,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 3:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point003",$point_L,$point_T+8,40,4,4,-1,96,"^7 3 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point103",$point_L+40,$point_T+8,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 4:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point004",$point_L,$point_T+12,40,4,4,-1,96,"^7 4 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point104",$point_L+40,$point_T+12,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 5:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point005",$point_L,$point_T+16,40,4,4,-1,96,"^7 5 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point105",$point_L+40,$point_T+16,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 6:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point006",$point_L,$point_T+20,40,4,4,-1,96,"^7 6 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point106",$point_L+40,$point_T+20,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 7:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point007",$point_L,$point_T+24,40,4,4,-1,96,"^7 7 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point107",$point_L+40,$point_T+24,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 8:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point008",$point_L,$point_T+28,40,4,4,-1,96,"^7 8 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point108",$point_L+40,$point_T+28,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 9:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point009",$point_L,$point_T+32,40,4,4,-1,96,"^7 9 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point109",$point_L+40,$point_T+32,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 10:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point010",$point_L,$point_T+36,40,4,4,-1,96,"^710 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point110",$point_L+40,$point_T+36,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 11:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point011",$point_L,$point_T+40,40,4,4,-1,96,"^711 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point111",$point_L+40,$point_T+40,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
CASE 12:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point012",$point_L,$point_T+44,40,4,4,-1,96,"^712 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point112",$point_L+40,$point_T+44,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
DEFAULT: # If no value match then do this (in this case, do nothing)
BREAK;
ENDSWITCH
?>
<?php
Event OnResult( $userName,$flagConfirm ) # Player event
$month = getLapperVar("ShortDate"); # Get date in dd/mm/yyyy format
$datestrip = substr( $month,3,2 ); # Strip the month from the short date
$year = substr( $month,6,4 ); # Find the year
IF ( $datestrip == "01" ) THEN $newmonth = "January" ; # Start checking short month cycle and turn result into long month
ELSE
IF ( $datestrip == "02" ) THEN $newmonth = "February" ; #
ELSE
IF ( $datestrip == "03" ) THEN $newmonth = "March" ;
ELSE
IF ( $datestrip == "04" ) THEN $newmonth = "April" ;
ELSE
IF ( $datestrip == "05" ) THEN $newmonth = "May" ;
ELSE
IF ( $datestrip == "06" ) THEN $newmonth = "June" ;
ELSE
IF ( $datestrip == "07" ) THEN $newmonth = "July" ;
ELSE
IF ( $datestrip == "08" ) THEN $newmonth = "August" ;
ELSE
IF ( $datestrip == "09" ) THEN $newmonth = "September" ;
ELSE
IF ( $datestrip == "10" ) THEN $newmonth = "October" ;
ELSE
IF ( $datestrip == "11" ) THEN $newmonth = "November" ;
ELSE
IF ( $datestrip == "12" ) THEN $newmonth = "December" ;
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
$champs = ( $newmonth . " " . $year ); # Create a var $champs to hold current month and year
$Username = GetCurrentPlayerVar( "Username" );
SetCurrentPlayerVar( "ps_race_points",(($ps_max_points+1) - GetCurrentPlayerVar( "FinishedPos" ) ) );
SetCurrentPlayerVar( $champs,getUserStoredValue( $champs ) );
IF( GetCurrentPlayerVar( $champs ) == "" )
THEN
SetCurrentPlayerVar( $champs,"0" );
ENDIF
IF( ToNum(GetCurrentPlayerVar( "ps_race_points" )) < 1 )
THEN
SetCurrentPlayerVar( "ps_race_points",0 );
ENDIF
SWITCH( GetCurrentPlayerVar("FinishedPos") ) # variable for race finish order
CASE 1:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point900",$point_L,$point_T-4,40,4,4,-1,96,"^7 Race on ^3" . getLapperVar("LongDate") . " @ " . getLapperVar("LongTime") );
openGlobalButton( "point910",$point_L+40,$point_T-4,6,4,4,-1,96,"^7points" );
openGlobalButton( "point001",$point_L,$point_T,40,4,4,-1,96,"^7 1 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point101",$point_L+40,$point_T,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
...
etc
....
CASE 12:
IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))
THEN
openGlobalButton( "point012",$point_L,$point_T+44,40,4,4,-1,96,"^712 : " . GetCurrentPlayerVar("NickName") );
openGlobalButton( "point112",$point_L+40,$point_T+44,6,4,4,-1,32,"^3" . GetCurrentPlayerVar( "ps_race_points" ) );
ENDIF
BREAK;
DEFAULT: # If no value match then do this (in this case, do nothing)
BREAK;
ENDSWITCH
SetCurrentPlayerVar( $champs,ToNum(GetCurrentPlayerVar( $champs ))+ GetCurrentPlayerVar( "ps_race_points" ) );
setUserStoredValue( $champs, GetCurrentPlayerVar( $champs ) );
?>
<?php
topUser( $champs,$champs,"DESC",$argv );
?>
<?php
$lpt = (GetCurrentPlayerVar("LapTime")); #make value of $lpt = raw laptime from DB and
$lptis = $lpt/1000; # convert $lpt into time in seconds only with 2 decimal places.
# and store as $lptis
?>
<?php
$InRaceLapsVoteMinMax = "0-0";
$VoteRestart = -1;
Event OnVoteRestartChange($PlayerOnTrack, $Vote , $Need) # Lapper Event
openGlobalButton( "bargr1",60,1,10,6,6,30,96,langEngine( "%{main_vote_restart1}%"));
openGlobalButton( "bargr2",70,1,20,6,6,30,96,langEngine( "%{main_vote_restart2}%",$Vote,$PlayerOnTrack,$Need ) );
EndEvent
Event OnVoteRestartReach($PlayerOnTrack, $Vote , $Need) # Lapper Event
closeGlobalButton( "bargr1&bargr2" );
EndEvent
Event OnVoteRestartZero() # Lapper Event
closeGlobalButton( "bargr1&bargr2" );
EndEvent
?>
<?php
$InRaceLapsVoteMinMax = "-2";
?>
<?php
Sub LoginMember($userName)
$NickName = GetPlayerVar($userName, "NickName");
privMsg ("^7Hi there, ^8" . $NickName);
globalMsg ($NickName . "^8 has logged in");
EndSub
?>
<?php
Sub LoginMember($userName)
$NickName = GetPlayerVar($userName, "NickName");
privMsg ("^7Hi there, ^8" . $NickName);
globalMsg ($NickName . "^8 has logged in");
OnConnectClose_Pitboard();
EndSub
?>
<?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
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
?>
<?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
privMsg( langEngine( "%{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 ) == 1 )
THEN
privMsg( "^3You have admin status and wont be kicked ;)");
ELSE
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privMsg( langEngine( "%{main_idle2}%" ) );
ENDIF
EndEvent
?>