+---------------------------------------------------------------+
|Changes from 7.0.6.0 to 7.0.6.1 |
+---------------------------------------------------------------+
=================================================
Changed:
=================================================
1: GetLapperVar("racetime"); More accurate racetime.
2: Privmsg(); Can now be used in non-playerevents.
3: EditFile(); can now delete lines.
Set '-1' as $NewText and set $LineToEdit which line you want to delete.
###EXAMPLECODE###
$Filename = "TestFile";
$Folder = "C:\Users\Blah\Desktop";
$NewText = -1;
$LineToEdit = 5;
$Extension = ".txt";
EditFile($Filename,$Folder,$NewText,$LineToEdit,$Extension);
=================================================
Fix:
=================================================
1: Couldnt clear the selected objects with SetLytSelection();
-Keep the function empty to clear the selection: SetLytSelection();
=================================================
Removed:
=================================================
1: 2 functions in Sourcecode for requesting: GetLapperVars.
-Requesting Lappervars is a littlebit faster (not really noticable) and using less CPU Usage
+---------------------------------------------------------------+
|Changes from 7.0.5.0 to 7.0.6.0 |
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New LapperFunction: CreateDirectory();
$Source = "C:\Users\Danny\Desktop";
$Name = "TestDir";
CreateDirectory($Source,$Name);
2: New LapperFunction: DeleteDirectory();
$Source = "C:\Users\Danny\Desktop";
$Name = "TestDir";
DeleteDirectory($Source,$Name);
3: New LapperFunction: DirectoryExist();
$Source = "C:\Users\Danny\Desktop";
$Name = "TestDir";
IF (DirectoryExist($Source,$Name) == 1) THEN
privmsg("Directory Exist!");
ELSE
privmsg("Directory does not Exist!");
ENDIF
#New Math Functions:
4: New lapperfunction: Cos(); #Calculate Cos
5: New lapperfunction: Sin();
6: New lapperfunction: Tan();
#Examples:
$cos = Cos(66);
$sin = Sin(66);
$angle = 30;
$Pi = 3.14;
$Radians = $angle * ($Pi/180);
$tan = Tan($Radians);
privMsg("Cos: " . $cos);
privMsg("Sin: " . $sin);
privMsg("Tan: " . $tan);
7: New debugoptions in LFSLapper.LPR # Will be displayed in you lapper console.
-$DisplayGetPlayerVar = 0; #Display GetPlayerVars
-$DisplaySetPlayerVar = 0; #Display SetPlayerVars
-$DisplayLapperVar = 0; #Display LapperVars
-$DisplayLapperFunction = 0; #Display LapperFunctions
8: New LapperFunction: GetLytSelection(); # Request info about objects selected in layout editor - response is seen in OnObjectInfo event with $Action 5
9: New LapperFunction: SetLytSelection(); #Place objects to clipboard or select them.
CASE "!setsel":
# X:Y:Z:Flag:Index:Heading,X:Y:Z:Flag:Index:Heading,...
$obj_L = "-244.25:-1282.62:17:1:178:0,-244.25:-1282:16.75:229:178:0";
$obj_A = "-244.25:-1281.88:16.5:33:178:-180,-244.25:-1281.56:17:9:178:0,-244.25:-1281.25:16.5:33:178:0";
$obj_PP = "-244.25:-1280.12:16.5:1:178:0,-244.25:-1279.88:17:25:178:0,-244.25:-1280.69:17:25:178:0,-244.25:-1280.94:16.5:1:178:0";
$obj_E = "-244.25:-1279.19:16.75:1:178:0,-244.25:-1278.69:17:225:178:0,-244.25:-1278.62:16.5:225:178:0,-244.25:-1278.69:17.5:245:178:0";
$obj_R = "-244.25:-1278.44:16.5:1:178:0,-244.25:-1278.19:17:25:178:-180,-244.25:-1277.88:16.5:65:178:0";
$objects = $obj_L.",".$obj_A.",".$obj_PP.",".$obj_E.",".$obj_R;
$PMOFlag = 0; # PMOFlag 0 -> clipboard selection, PMOFlag 4 -> select placed objects
SetLytSelection($PMOFlag,$objects);
BREAK;
=================================================
Changed:
=================================================
1: GetListOfLayout(); will display all the layouts instead of only the layouts of the current track
2: Soundoption for globalmsg(); / privmsg();
NOTE: is compatible with older scripts.
0 = No Sound
1 = Message Sound
2 = SystemMessage Sound
3 = InvalidKey Sound
4 = ERROR Sound
5 = NUM Sound
-Possible options for globalmsg() :
globalmsg("BLAHBLAH");
globalmsg("BLAHBLAH",0);
-Possible options for privmsg() :
privmsg("BLAHBLAH");
privmsg("BLAHBLAH",0);
privmsg($userName,"BLAHBLAH");
privmsg($userName,"BLAHBLAH",0);
3: X and Y playervars now returns Floating values: -123.45 instead of rounded -123
4: JoinRequest(); allows now floating X and Y values. See the line above.
5: RegisterZoneAction() allows floating X and Y values.
6: Event OnObjectInfo() New way for displaying Object info. See Code Example in LFSLapper.LPR
Old: OnObjectInfo($userName,$NumO,$Action,$X,$Y,$Z,$Flags,$Type,$InDex,$Heading)
New: OnObjectInfo($userName,$NumO,$Action,$ObjectsInfo)
=================================================
Fixed:
=================================================
1: Lappercrash when a non existing folder is added in addonused.lpr Include().
2: Path of several script in addonsused.lpr were wrong.
3: PlayerVars couldnt be used in OnDisconnect Player event.
4: Japanese Charbug
5: HTTP(); A Host or other invalid player couldnt send a webrequest.
6: Connectioninfo(); Must to execute this function twice after reloading lapper to set the playervars ( language,IP)
7: Lappercrash when a $var is placed outside a sub or (Catch)event
8: NON-admins couldnt add/remove objects since the last LFS Version
9: Typo in hardcoded objectslist.
10: Event OnObjectInfo didnt displayed floating values.
11: AddObject()/RemoveObject() doesnt work when input values have 1 digit behind the comma. (XX,5 instead of XX,50)
12: GetLapperVar("RaceTime") could increase CPU usage when use it in a loop.
=================================================
Removed:
=================================================
1: AFK/IDLE Timer playervar ( randomly stopped working)
#------------------------------------------------------------------------------#
# CIF includes
# You can reorder these lines to change the tab order on the sub-menus
#------------------------------------------------------------------------------#
include ("./cif/cif.lpr"); # This MUST be first to define all of the CIF globals
# CIF Info Modules #################
include ("./cif/info_tops.lpr"); # Top output with interactive buttons, replaces tops.lpr, !top, !near, !qual, !nearqual
include ("./cif/info_who.lpr"); # Who, replaces the who,lpr module and !who command
# CIF Config Modules #################
include ("./cif/config_membership.lpr"); # Membership administration
include ("./cif/config_handicaps.lpr"); # Player Handicap Info
# CIF Help Modules #################
include ("./cif/help_general.lpr"); # General Help and !help command
include ("./cif/help_admin.lpr"); # Admin Help
include ("./cif/help_stats.lpr"); # Stats Help
include ("./cif/help_custom.lpr"); # Custom server Help
New changelog:
-New sectorcolor: Magenta (fastest splittime)
V1.13(21-07-2018)
Update: Sectorcolors: Magenta color when you beat the fastest stored sectortime
Update: Chatmessages who beated the fastest time.
Update: Systemmessages: Displays the "Time to beat + driver" at the startline
Update: Renamed 'Checkpoints' to 'Sectors'
Fix: Sectorcounter wasnt set properly at the start, Should be 1 instead of 0
Fix: Random Lapper reboots. (probably)
V1.12(20-07-2018)
Add: SplitColors (Green/Red) to see if you are faster or slower than your stored time.
Update: YellowFlag System: Added blinking yellow buttons.
Update: Few TimeTable changes.
Fix: Checkpoint Counter didnt reset @ startline.
Fix: StartTime invalid during first run after rebooting the insim.
Fix: Admincommand: !cleartimes >> Typo in the code that caused errormessages.
Fix: False 'PB' report. Even when the laptime is higher than the stored time.
Fix: Get penalty when hitting an object after finishing a stage.
V1.11(16-07-2018)
Add: False Start system
Add: Yellow Flag / GreenFlag system.
Add: Display TimeDifference with the current and stored split/total times.
Add: Chatmessage when a player set theire first run on the current stage
Add: Chatmessage when a player set a new Personal Best on the current Stage/Car configuration
Update: System Messages: False Start.
Update: System Messages: Yellow/Green.
Fix: CarClasses: Restricted car not cleared after switching to a non-restricted car
Fix: CarClasses: Couldnt reset cars to default.
V1.09 (14-07-2018)
Add: Delete Countdown clock admincommand (!delclock)
Update: Changed Lapper library to newest (PublicTest) version V7.0.5.1 PT_07
Fix: Button Conflict : Adminmenu and Virtual Co-Driver
Fix: RaceTimer still enabled after spectating.
Fix: HUD not cleared after spectating.
V1.10(15-07-2018)
Fix: Name highlighting in Timetable doesnt work with capital letters.
Fix: Paging UP in timetable didnt work with new LFSLapper version.
Update: Filter Buttons in TimeTable
Update: Set default TimeForNextDriver to 6 seconds.
Update: System Messages: StartTime Error.
#==================================================================================#
#Scriptname: IdleAFKTimer.LPR
#Author: Bass-Driver
#Version: 1.2
#VersionDate: 09-06-2018
#
##Version 1.1:
# -Fixed: Timer didnt work when a new player joined the server.
# -Fixed: Added ToNum() to check time.
##Version 1.2:
# -Add: MaxAFKTime GlobalVar
# -Add: MaxIdleTime GlobalVar
# -Fixed: Driving while lapperreboot still activate the timers. ( added a speedcheck)
#==================================================================================#
IF((ToNum(GetPlayerVar( $Player["value"], "AFKTimer")) > $MaxAFKTime) || (ToNum(GetPlayerVar( $Player["value"], "IdleTimer")) > $MaxIdleTime)) THEN
#Do Something
ENDIF
<?php
privmsg("Your Nickname: '".GetPlayerVar($userName,"NickName")."'!" );
?>
<?php
privmsg("Your Nickname: ".GetPlayerVar($userName,"NickName")."^t qoute ^t qoute" );
?>
<?php
$allowed_list = array(
"TechEdison" => "yes",
"Bass-Driver" => "no"
);
$username = $_GET["u"];
if($allowed_list[$username] == "yes")
{
echo '1';
}
else
{
echo '0';
}
?>
<?php
Event OnConnect($userName)
$Allowed = http("http://myurl.com/script.php?u=".$userName);
IF($Allowed == 0)
THEN
cmdLFS("/kick ".$userName);
GlobalMsg("Kicked: ".$userName.". Reason: Not Alowed");
ELSE
GlobalMsg("Welcome Back: ".$userName);
ENDIF
EndEvent
?>
<?php
#Display list of players in the chatlog
CASE "!lop":
$LoP = GetListOfPlayers("U");
privmsg("-----[List of connected players]-----");
FOREACH ($Player IN $LoP)
$PLYuserName = $Player["value"];
privmsg(GetPlayerVar($PLYuserName,"NickName")." ^8(".$PLYuserName.")");
ENDFOREACH
BREAK;
#Create a list of buttons with the playernames.
CASE "!lop":
$hgt = 80;
$LoP = getListOfPlayers("U");
privmsg("-----[List of buttons with connected players]-----");
FOREACH($Player IN $LoP)
$PLYuserName = $Player["value"];
openButton($userName,"Btn_".$PLYuserName,170,$hgt,30,4,1,-1,16+64,GetPlayerVar($PLYuserName,"NickName")." ^8(".$PLYuserName.")");
$hgt=$hgt+4;
ENDFOREACH
BREAK;
?>