I've just done a simple restriction code but for some reason it does nothing when "Pinto" or "Zetec" is clicked.
Ive spectated every driver when they join aswell as a test and that does not work aswell.
Ive spectated every driver when they join aswell as a test and that does not work aswell.
Event OnMSO( $userName, $text ) # Player event
$idxOfFirtsSpace = indexOf( $text, " ");
IF( $idxOfFirtsSpace == -1 ) THEN
$command = $text;
$argv = "";
ELSE
$command = subStr( $text,0,$idxOfFirtsSpace );
$argv = trim( subStr( $text,$idxOfFirtsSpace ) );
ENDIF
SWITCH( $command )
CASE "!node":
IF ( UserIsAdmin( $userName ) == 1 )
THEN
ENDIF
BREAK;
ENDSWITCH
EndEvent
CatchEvent OnConnect ( $userName )
$userName = GetCurrentPlayerVar("UserName");
openPrivButton( "tws_PLAIN",31,50,148,100,5,-1,96," ");
openPrivButton( "tws_Pinto",46,90,54,15,5,-1,16,"^7Pinto Engine",tws_Pinto);
openPrivButton( "tws_Zetec",110,90,54,15,5,-1,16,"^7Zetec Engine",tws_Zetec);
IF (GetUserStoredValue($userName," register") == 1) THEN
privmsg($userName,"^7Welcome Back!");
ELSE
privmsg($userName,"^7Welcome for the first time on our Server!");
SetUserStoredValue($userName," register", 1);
ENDIF
EndCatchEvent
CatchEvent OnNewPlayerJoin ( $userName )
$userName = GetCurrentPlayerVar("UserName");
cmdLFS("/spec ".$userName); #Test
IF(GetPlayerVar($userName,"Car") == XRT) THEN
IF (GetUserStoredValue($userName," XRT_Pinto") == 1) THEN
IF(GetPlayerVar($userName,"P_Tres") == 25) THEN
privmsg($userName,"you successfully entered the Track with Pinto powered XRT!);
ELSE
privmsg($userName,"To Enter the Track please use 25% of Air Restriction for the Pinto Engine!");
cmdLFS("/spec ".$userName);
ENDIF
ELSE
IF (GetUserStoredValue($userName," XRT_Zetec") == 1) THEN
IF(GetPlayerVar($userName,"P_Tres") == 23) THEN
privmsg($userName,"you successfully entered the Track with Zetec powered XRT!);
ELSE
privmsg($userName,"To Enter the Track please use 23% of Air Restriction and 150kg Mass weight for the Zetec Engine!");
cmdLFS("/spec ".$userName);
ENDIF
ENDIF
ENDIF
ELSE
cmdLFS("/spec ".$userName);
ENDIF
EndCatchEvent
Sub Money( $KeyFlags )
$userName = GetCurrentPlayerVar("UserName");
closePrivButton( "MoneyD&MoneyD1");
openPrivButton( "MoneyD",110,10,20,5,5,-1,16,"^3Money Balance :");
openPrivButton( "MoneyD1",132,10,20,5,5,-1,16,"^3£ ".GetUserStoredValue($userName," Money"));
EndSub
Sub tws_Zetec( $KeyFlags )
$userName = GetCurrentPlayerVar("UserName");
closePrivButton( "tws_Pinto&tws_Zetec&tws_PLAIN");
SetUserStoredValue($userName," XRT_Zetec", 1);
SetUserStoredValue($userName," XRT_Pinto", 0);
EndSub
Sub tws_Pinto( $KeyFlags )
$userName = GetCurrentPlayerVar("UserName");
closePrivButton( "tws_Pinto&tws_Zetec&tws_PLAIN");
SetUserStoredValue($userName," XRT_Zetec", 0);
SetUserStoredValue($userName," XRT_Pinto", 1);
EndSub