Hi, I'm interested that how can I make free zones where the auto spec wont put players on spectate. I want to make the pit "zone" unspectable. How can I add them ?
CatchEvent 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 "!setfreezone":
SetFreeZone(GetCurrentPlayerVar("X"),GetCurrentPlayerVar("Y"));
BREAK;
ENDSWITCH
EndCatchEvent
Event OnIdle1( $userName ) # Player event
IF(GetPlayerVar($userName, "InFreeZone) != "1")
THEN
//your code here
ENDIF
EndEvent
Event OnIdle2( $userName ) # Player event
IF(GetPlayerVar($userName, "InFreeZone) != "1")
THEN
//your code here
ENDIF
EndEvent
Sub FreeZone( $userName )
SetPlayerVar($userName, "InFreeZone,"1");
EndSub
Sub SetFreeZone($NewXNode,$NewYNode)
RegisterzoneAction( getLapperVar( "ShortTrackName" ), $NewXNode,$NewYNode,1, FreeZone, "");
EndSub
<?php
Sub DoWhoMemberInfo ( $KeyFlags, $id )
$rowHeight = 5;
$origT = $CifOrigT + 1;
$DialogPrefix = split( $id,"_",0 ) . "_";
$Ucid = ToNum(split( $id,"_",1 ));
$thisPlayer = GetPlayerInfo();
$thatPlayer = GetPlayerInfo( GetPlayerVarByUcid($Ucid, "UserName") );
closeButtonRegex ($thisPlayer["UserName"], $DialogPrefix . ".*");
openPrivButton ( $DialogPrefix . "statsdetails", 73, 48, 90, 6, 5, -1, 16, langEngine ( "%{main_statsdetails}%", $thatPlayer["UserName"], $thatPlayer["NickName"], $thatPlayer["Car"], $thatPlayer["PBDrift"], getLapperVar("LongTrackName"), $thatPlayer["Dist"], $thatPlayer["UnitDist"] ) );
?>
<?php
Lang "EN" # Race Events messages
info_header_1 = "^7Detailed Player Information";
info_name = "^7Racer Name:";
info_membertype = "^7Member Type:";
info_header_2 = "^7Player Statistics";
info_distance = "^7Total Distance:";
main_statsdetails = "^7Username: ^3{0}^7 - Nickname: {1}"
. "%nl%"
. "%nl%^7Your current best Drift Score (with ^3{3}^7): ^3{4}"
. "%nl%"
. "%nl%^7Current Track: ^3{5}^0 [ {0} ]"
. "%nl%^7You've done: ^3{6} ^7laps, which is approx ^3{7} ^7{6}KM"
. "%nl%";
EndLang
?>