CatchEvent OnConnect( $userName ) # Player event OnConnect_Dislay_rules(); EndCatchEvent CatchSub OnConnectClose( $KeyFlags,$id ) OnConnectClose_Close_rules(); EndCatchSub CatchSub OnConnectCloseKick( $KeyFlags,$id ) OnConnectCloseKick_Close_rules(); EndCatchSub Sub OnConnect_Dislay_rules() IF ( GetUserStoredValue( "rules_accepted" ) == "no" || GetUserStoredValue( "rules_accepted" ) == "" ) THEN $left_right_welcome=10; $top_bottom_welcome=40; openPrivButton( "welcome_bg",$left_right_welcome,$top_bottom_welcome,122,118,5,-1,16,"" ); openPrivButton( "welcome_accept",$left_right_welcome+1,$top_bottom_welcome+111,60,5,5,-1,32,"^2Accept",OnConnectClose ); openPrivButton( "welcome_refuse",$left_right_welcome+61,$top_bottom_welcome+111,60,5,5,-1,32,"^1Deny",OnConnectCloseKick ); ENDIF EndSub Sub OnConnectClose_Close_rules() SetUserStoredValue( "rules_accepted" , "yes" ); closePrivButton("welcome_bg&welcome_accept&welcome_refuse"); EndSub Sub OnConnectCloseKick_Close_rules() SetUserStoredValue( "rules_accepted" , "no" ); closePrivButton("welcome_bg&welcome_accept&welcome_refuse"); EndSub