cmdLFS("/What is the command? " . GetCurrentPlayerVar("UserName") );
LFSLapper V7.0.9.4 I use.
LFSLapper V7.0.9.4 I use.
CatchEvent OnConnect( $userName ) # Player event
$userName=GetCurrentPlayerVar("UserName");
MoveUserToGroup( "kurallar",$userName );
UserGroupToFile( "kurallar", "./kurallar.txt" );
openPrivButton( "kurallarmenu",70,60,60,80,4,-1,32,"");
openPrivButton( "kurallarkapat",70,60,60,7,4,-1,16,"OKUDUM ONAYLIYORUM",kurallarkapat);
EndCatchEvent
Sub kurallarkapat ( $KeyFlags, $mesaj )
$userName=GetCurrentPlayerVar("UserName");
RemoveUserFromGroup( "kurallar",$userName );
UserGroupToFile( "kurallar", "./kurallar.txt" );
closeprivbutton("kurallarmenu&kurallarkapat");
EndSub
CatchEvent OnNewPlayerJoin( $userName ) # Player event
$userName=GetCurrentPlayerVar("UserName");
UserGroupToFile( "kurallar", "./kurallar.txt" );
IF( UserInGroup( "kurallar",$userName ) )
THEN
PrivMsg ("^1DİKKAT: ^7Ev sahibi katılmanıza izin vermedi!");
cmdLFS("/spec " . GetCurrentPlayerVar("UserName") );
ENDIF
EndCatchEvent
/* NOTE:
#To enable OnNewJoinRequest event, $ReceiveJoinRequest has to be set to 1.
#If enabled, LFS waits (cca 1 second) for a response from the Lapper on each join request.
#To respond to a join request - use joinrequest() function.
#The Player's unique id (PLID Must be 0 to use the join request system)
#If no response is sent, LFS spawns the car normally (with a delay [because LFS waits for the join request response]).
#For more info see ..\LFS\docs\InSim.txt
*/
$ReceiveJoinRequest = -1; #Enable (1) or disable (-1) for Receive JoinRequest.
Event OnNewJoinRequest( $userName ) # Player event
$Flags = 0; #Move car (128) else (0)
$X_Axis = 0; #X axis SpawnPoint
$Y_Axis = 0; #Y axis SpawnPoint
$Z_Axis = 0; #Z axis SpawnPoint
$Heading = 0; #Heading of the players car at Spawnpoint
$UCID = GetCurrentPlayerVar("UCID"); #Connection unique id
$PLID = 0; #GetCurrentPlayerVar("PLID"); #Player's unique id
###$PLID MUST BE 0 TO USE JOIN REQUEST###
#$JRRAction = 0; # Reject join request.
$JRRAction = 1; # Allow join request.
joinrequest($X_Axis ,$Y_Axis ,$Z_Axis ,$Flags ,$Heading ,$UCID ,$PLID ,$JRRAction); #Send Data to LFS
EndEvent
#####################################################
# Player sends a join request (Shift+J) #
#####################################################
/* NOTE:
#To enable OnNewJoinRequest event, $ReceiveJoinRequest has to be set to 1.
#If enabled, LFS waits (cca 1 second) for a response from the Lapper on each join request.
#To respond to a join request - use joinrequest() function.
#The Player's unique id (PLID Must be 0 to use the join request system)
#If no response is sent, LFS spawns the car normally (with a delay [because LFS waits for the join request response]).
#For more info see ..\LFS\docs\InSim.txt
*/
$ReceiveJoinRequest = 1; #Enable (1) or disable (-1) for Receive JoinRequest.
Event OnNewJoinRequest( $userName ) # Player event
$Flags = 0;
$X_Axis = 0;
$Y_Axis = 0;
$Z_Axis = 0;
$Heading = 0;
$UCID = GetCurrentPlayerVar("UCID");
$PLID = 0; #GetCurrentPlayerVar("PLID");
$JRRAction = 0;
joinrequest($X_Axis ,$Y_Axis ,$Z_Axis ,$Flags ,$Heading ,$UCID ,$PLID ,$JRRAction);
EndEvent