Dont mind my "IF" will work on that later
Here is my code:
CatchEvent OnMSO( $userName, $text ) # Player event
$idxOfFirstSpace = indexOf( $text, " ");
IF( $idxOfFirstSpace == -1 ) THEN
$command = $text;
$argv = "";
ELSE
$command = subStr( $text,0,$idxOfFirstSpace );
$argv = trim( subStr( $text,$idxOfFirstSpace ) );
ENDIF
SWITCH( $command )
CASE "!twin":
IF (9 > 7 )
THEN
$me = GetCurrentPlayerVar("NickName");
$behind = GetPlayerVar( GetCurrentPlayerVar( "UNameBehind" ),"NickName" );
$front = GetPlayerVar( GetCurrentPlayerVar( "UNameBefore" ),"NickName" );
globalMsg( langEngine( "%{main_twin}%" , $me,$behind));
IF (9 >7)
THEN
$AngleVelocity = GetCurrentPlayerVar( "AngleVelocity" );
$DriftScore = (GetCurrentPlayerVar( "DriftScore" ) * 2);
$LastDriftScore = (GetCurrentPlayerVar( "LastDriftScore" ) *2);
openPrivButton( "circledrift_back",97,57,165,165,1,-1,0,"^1•"); # red background
openPrivButton( "circledrift_back1",100,60,159,159,1,-1,0,"^3•"); # yellow foreground
openPrivButton( "circledrift_thisdrift",169,126,20,5,1,-1,0,"^1This Drift"); # red
openPrivButton( "circledrift_lastdriftscore",169,128,20,12,1,-1,0,langEngine( "%{circledrift_score}%" , $LastDriftScore ) );
openPrivButton( "circledrift_lapscore",169,148,20,15,1,-1,0,langEngine( "%{circledrift_combo}%" , $DriftScore ) );
openPrivButton( "circledrift_maxscore",169,159,20,5,1,-1,0,"^0Lap Score"); # black
ELSE
privMsg( langEngine( "%{main_nonearcars}%" ) );
ENDIF
IF( $AngleVelocity < 0 )
THEN
$AngleVelocity = -$AngleVelocity ;
SetCurrentPlayerVar("Angle_Reverse",$AngleVelocity);
closePrivButton( "circledrift_anglerev&circledrift_angle");
openPrivButton( "circledrift_anglerev",169,136,20,17,1,-1,0,langEngine( "%{circledrift_anglerev}%" , GetCurrentPlayerVar( "Angle_Reverse")));
ELSE
closePrivButton( "circledrift_anglerev&circledrift_angle");
openPrivButton( "circledrift_angle",169,136,20,17,1,-1,0,langEngine( "%{circledrift_angle}%" , $AngleVelocity ));
ENDIF
IF (7 > 6)
THEN
openPrivButton( "circledrift_lastdriftscore",169,128,20,12,1,-1,0, "^10" );
openPrivButton( "circledrift_lapscore",169,148,20,15,1,-1,0,"^10" );
ELSE
privMsg( langEngine( "%{main_nonearcars}%" ) );
ENDIF
IF (GetCurrentPlayerVar( SessLaps ) <1)
THEN
openPrivButton( "circledrift_angle",164,137,30,14,1,-1,0,"^1> Scores not saved <%at% " );
openPrivButton( "circledrift_anglerev",164,137,30,14,1,-1,0," %at%^1> on your outlap <" );
ELSE
openPrivButton( "circledrift_angle",164,137,30,14,1,-1,0,"^1> Too slow <%at% " );
openPrivButton( "circledrift_anglerev",164,137,30,14,1,-1,0," %at%^1> lost scores <" );
ENDIF
ELSE
privMsg( langEngine( "%{main_nonearcars}%" ) );
ENDIF
ELSE
privMsg( langEngine( "%{main_nonearcars}%" ) );
ENDIF
BREAK;
ENDSWITCH
EndCatchEvent