[Release] /help, /rules, /cmds [HRC] [1.4]

I have set most of it up got the ping and player name & id working. I’m just working on the server players. I’m just trying to figure out why it won’t display the png when I’m doing /serverinfo, I have set the code, and implemented the HTML, CSS and Javascript. So it is strange it won’t display.

3 Likes

it shows on command.

1 Like

i kept that but also changed it to open on player join as well.

1 Like

Pretty nice, I’m just scripting my own version it has command and on join, however the on join requires /continue to exit the screen, I have also disabled player movement until they type /continue, if you want it to be very similar to highspeed-gaming.com.

I’m currently working on a fuel, rpm, mph and damage resource similar to Highspeed-gaming’s.

1 Like

thats something i would want lol tired of people not knowing the rules of my servers.

1 Like

Any idea why the image won’t display via command.

do you have it all linked up in the java and CSS

1 Like

Need to fix it so I can implement the Server online time and add it so when I use my roleplay area switch command it updates it in the server info.

Yes i do I’ll show you it now.

HTML

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="stylesheet" href="style.css" type="text/css">
	<link href="https://fonts.googleapis.com/css?family=Teko:600" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Work+Sans:200" rel="stylesheet">
	<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
	<script src="./script.js" type="text/javascript"></script>
</head>
<body>
	<div id="disclaimer">
		<div class="contenair">
			<div class="spacer">&nbsp;</div>		
		</div>
	</div>
	<div id="rules">
		<div class="contenair">
			<div class="spacer">&nbsp;</div>		
		</div>
	</div>
	<div id="cmds">
		<div class="contenair">
			<div class="spacer">&nbsp;</div>		
		</div>
	</div>
	<div id="serverinfo">
		<div class="contenair">
			<div class="spacer">&nbsp;</div>		
		</div>
	</div>
</body>

CSS

/*-------------- SERVER INFO SECTION -------------- */

*{
  margin: 0;
  padding: 0;
}

#serverinfo{
  display: none;
}

#serverinfo h1{
	margin: 0;
	padding: 0;
	color: #59ab6d;
	font-family: 'Teko', sans-serif;
	font-size: 26px;
	-webkit-font-smoothing: antialiased;
}
	
#serverinfo h2{
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: 'Work Sans', sans-serif;
	font-size: 1em;
	-webkit-font-smoothing: antialiased;
}

#serverinfo h3{
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: 'Work Sans', sans-serif;
	font-size: 1em;
	-webkit-font-smoothing: antialiased;
}

#serverinfo p{
	margin: 0;
	padding: 0;
	-webkit-font-smoothing: antialiased;
}

#serverinfo p.imp {
	color: #fff;
	font-size: 0.8em;
	text-align: left;
	margin: auto;
	-webkit-font-smoothing: antialiased;
}
   
#serverinfo .overlay{
	position:fixed;
	z-index: 1;    
	width: 100%;					
	height:100%;					
	margin: 0;    					
	text-align: center;
	background: #000;				
	opacity: 0.40; 									 
}
   
#serverinfo .contenair{
	position:absolute;
	z-index: 2;    
	width: 1000px;									
	height:700px;									
	left:70%;										
	top:50%;										
	margin:-350px 0 0 -500px;    					
	text-align: center;
	background: url('img/bg-img3.png');				
	padding: none; 									
    
}
	
#serverinfo .innerbox{
	z-index: 2;
	width: 550px;	
	margin: 0px 50px 0px 400px;  
	text-align: left;
	background: transparent;
	-webkit-font-smoothing: antialiased;
}
	
#serverinfo .spacer{
	z-index: 2;
	width: 100%;
	height: 120px;
  margin: 0;  
	text-align: left;
  background: transparent;	
}

#serverinfo .footspacer{
	z-index: 2;
	width: 100%;
	height: 80px;
  margin: 0;  
	text-align: left;
  background: transparent;	
}
	
#serverinfo .footerbox{
  z-index: 2;
  width: 450px;	
  margin: 80px 0px 0px 480px;
  height: 110px;
  text-align: left; 
}

Javascript

$(function(){
	window.onload = function(e){
		window.addEventListener('message', function(event){

			var item = event.data;
			if (item !== undefined && item.type === "disclaimer") {

				if (item.display === true) {
					$('#disclaimer').delay(100).fadeIn( "slow" );
				} else if (item.display === false) {
					$('#disclaimer').fadeOut( "slow" );
				}
			}

			if (item !== undefined && item.type === "rules") {

				if (item.display === true) {
					$('#rules').delay(100).fadeIn( "slow" );
				} else if (item.display === false) {
					$('#rules').fadeOut( "slow" );
				}
			}
			
			if (item !== undefined && item.type === "cmds") {

				if (item.display === true) {
					$('#cmds').delay(100).fadeIn( "slow" );
				} else if (item.display === false) {
					$('#cmds').fadeOut( "slow" );
				}
			}
			
			if (item !== undefined && item.type === "serverinfo") {

				if (item.display === true) {
					$('#serverinfo').delay(100).fadeIn( "slow" );
				} else if (item.display === false) {
					$('#serverinfo').fadeOut( "slow" );
				}
			}
		});
	};
});

where do you add the commands and rules and such?

Its all in a picture so;
bg-img: Is the help
bg-img1: Is the rules
bg-img2: is the commands.

They are pictures, I may make it all HTML, but for now is a picture, All the photoshop files are in the download :slight_smile:

1 Like

its great but its conflicts with disclaimer script, tried renaming my disclaimer entries in my lua but /rules opens the disclaimer, how can i fix this?

ohh okay thank you very much

2 Likes

/rules should not. /help might. You can go through and rename all the id’s in the files :slight_smile:

1 Like

yeah cause your script has the same coding at the disclaimer script, where can i set in ur script the name of each file that is called?

somewhat yeah. in the help code the event and id’s are called disclaimer change them to help? and should be fine.

All files should have the id’s in them (client.lua, script.js,index.html and style.css)

1 Like

yeah i m gonna change disclaimer to help:display

1 Like

Going to hopefully change the script so all wording on the background image is via html. This would make it easier to add scripts like ping etc.

Coming next week maybe

1 Like

@FAXES Hows it going?

good yourself? Whats up?

1 Like

Does this script include /emote scenario?? Caue it showed it in the picture but would like to souble check.