This LPR script provides a GUI to enable Admins to set a connected users authorisation level. users can be set from Visitor up to Admin, and there is also an overloaded UserIsAdmin function included to activate new admins straight away.
Once a user's auth level has been set, you can use the MemberStype stored var to limit other functions execution.
Installation:
1. Save file into your includes file as member_admin.lpr and add the filename to your addonsused.lpr file.
2. Replace the existing OnConnect functions in the main LFSLapper.lpr file with these:
                
                
                    
            Once a user's auth level has been set, you can use the MemberStype stored var to limit other functions execution.
Installation:
1. Save file into your includes file as member_admin.lpr and add the filename to your addonsused.lpr file.
2. Replace the existing OnConnect functions in the main LFSLapper.lpr file with these:
<?php 
Event OnConnect( $userName ) # Player event
    $NickName = GetCurrentPlayerVar("NickName");
    $Posabs = GetCurrentPlayerVar("PosAbs");
    $Groupqual = GetCurrentPlayerVar("GroupQual");
    IF ( GetUserStoredNum("MemberType") >= $MEMBERTYPE_AFFILIATE )
    THEN
        LoginMember($userName);
    ELSE
        openPrivButton( "welc",25,50,150,15,12,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );
        openPrivButton( "pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual  ) );
        openPrivButton( "clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
        openPrivButton( "ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
    ENDIF
EndEvent
Sub OnConnectClose( $KeyFlags,$id )
    closePrivButton("welc&pos&clos&ref");
    LoginNonMember(GetCurrentPlayerVar( "UserName" ));
EndSub
Sub OnConnectCloseKick( $KeyFlags,$id )
    closePrivButton("welc&pos&clos&ref");
    cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
EndSub
?>

