IF ( ToNum(GetPlayerVar( $userName, "Z" )) >= 0)
THEN
#Call joinrequest
ELSE
#Something else
ENDIF
GetPlayerVar($userName,"X");
GetPlayerVar($userName,"Y");
GetPlayerVar($userName,"Z");
setconfigvar("DiscordBotStatus",":".GetLapperVar("numplayers")." Players"); #change discordbot statusmessage
<?php
Event OnConnect( $userName ) # Player event
setconfigvar("DiscordBotStatus",":".GetLapperVar("numplayers")." Players"); #change discordbot statusmessage
EndEvent
Event OnDisConnect( $userName, $reason ) # Player event
setconfigvar("DiscordBotStatus",":".GetLapperVar("numplayers")." Players"); #change discordbot statusmessage
EndEvent
?>
<?php
CASE "!gps":
GPSMenu($userName,0);
BREAK;
Sub GPSMenu( $userName,$id )
#Clickable Buttons
EndSub
Sub ClickedButton( $keyflags,$id ) # Lapper Event
$userName = GetCurrentPlayerVar("UserName");
#Close unnecessary buttons here.
GPSLoop( $userName);
EndSub
Sub GPSLoop( $userName) # Lapper Event
#Display Buttons
#Delayedcommand for player
PlayerDelayedCommand($userName,"GPSLoop_".$userName,1,GPSLoop);
EndSub
?>
<?php
RemovePlayerDelayedCommand($userName,"GPSLoop_".$userName);
?>
<?php
PlayerDelayedcommand(); #Start delayedcommand for a specific player
$UserName = "Bass-Driver";
$NameOfDelay = "CloseButton";
$DelayInSeconds = 3;
$SubCallBack = "ThisSub";
PlayerDelayedcommand($UserName,$NameOfDelay,$DelayInSeconds,$SubCallBack);
Sub CloseButton($userName)
privmsg($userName,"debug: this sub works");
EndSub
?>
$GetDistanceInMeters = trackuserdistance($userNameOfPolice, $userNameOfSuspect);
$GetAngleInDegrees = GetAngle($userNameOfPolice,$userNameOfSuspect);
IF((ToNum($GetAngleInDegrees) > 80)&&(ToNum($GetAngleInDegrees) < 120))THEN
privmsg(>>>);
ENDIF
<?php
$SplitCurrTime = SplitToArray(GetLapperVar("ShortTime"), ":");
$SplitSetTime = SplitToArray("21:00:00", ":");
$TimeInSecondsCurrTime = ToNum(($SplitCurrTime[0]*3600) + ($SplitCurrTime[1]*60) + ($SplitCurrTime[2]));
$TimeInSecondsSetTime = ToNum((SplitSetTime[0]*3600) + ($SplitSetTime[1]*60) + ($SplitSetTime[2]));
IF ($TimeInSecondsCurrTime > $TimeInSecondsSetTime) THEN
#code
ENDIF
?>
[*]setuserstoredvalue();
[*]getuserstoredvalue();
<?php
IF(getuserstoredvalue($userName,"LastSeen") == "") THEN
globalmsg(GetPlayerVar($userName,"NickName"). " ^7is a new player");
#Set Date/Time to userstoredvalue.
ELSE
#Get Date/Time from userstoredvalue.
globalmsg(GetPlayerVar($userName,"NickName"). " ^7Last seen @".);
#Set Date/Time to userstoredvalue.
ENDIF
?>
#define INST_ALWAYS_ON 128 // if this bit is set the button is visible in all screens
// NOTE : You should not use INST_ALWAYS_ON for most buttons. This is a special flag for buttons
// that really must be on in all screens (including the garage and options screens). You will
// probably need to confine these buttons to the top or bottom edge of the screen, to avoid
// overwriting LFS buttons. Most buttons should be defined without this flag, and positioned
// in the recommended area so LFS can keep a space clear in the main screens.
<?php
[*]openprivtextbutton();
[*]opentextbutton();
[*]openglobalbutton();
[*]openprivbutton();
[*]openbutton();
?>
$DayNow = GetLapperVar(ShortDate);
$DayNowPlusFive = GetLapperVar(ShortDate,+5);
#DISCORD EMBED MESSAGE
$Title = "";
$Desc = "";
$Color = "0xFFFFFF";
$FieldTitle = "Test Day";
$FieldValue = StripLFSColor("**Day Now: **".$DayNow."\n **Day Now + 5: **".$DayNowPlusFive."");
$FieldInline = "True";
$Footer = "";
$ThumbnailUrl = "";
$ImageUrl = "";
SendDiscordEmbed($DiscordChannel_cmd,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
$Text = Replace( "Day Now: ".$DayNow." + Day Now + 5: ".$DayNowPlusFive."","/","-");
#DISCORD NORMAL MESSAGE
sendmessagetodiscord($DiscordChannel_cmd,StripLFSColor($Text));
<?php
CASE "!day":
privmsg("Date Now: " .GetLapperVar(ShortDate));
privmsg("Date Now + 5: " .GetLapperVar(ShortDate,+5));
BREAK;
?>
$NewDate = GetLapperVar(LongDate,+5);
$NewDate2 = GetLapperVar(LongDate);
$NewDate = GetLapperVar(ShortDate,+5);
$NewDate2 = GetLapperVar(ShortDate);
GetLapperVar(ShortDate): Possible to add an 2nd parameter to add/delete days
$NewDate = GetLapperVar(ShortDate,5); // Adds 5 days to the current date
$NewDate = GetLapperVar(ShortDate,+5); // Adds 5 days to the current date
$NewDate = GetLapperVar(ShortDate,-5); // Deletes 5 days from the current date