[Release] EssentialMode base

You are 100% correct. I am embarrassed. I had misread this step in a previous post as right-clicking on the file and that Unblock would be there. After going into properties, I found it immediately and the error is gone. Thank you!

You are very welcome :slight_smile:

1 Like

Hi,

i tried to install essentialmode into a bare FiveM server on Windows,
i got the SQL database up and running, i added essentialmode es_admn to the autostart.
i also changed the gamemode from fivem = true to EssentialMode = true.

The server starts without a problem but when clients try to connect they get stuck on “initialising session”

yeah i try and i got the same error and whene i put the fivem = true back its working but the money is stock on the Euro . … and i cant even fix the money you receive every 60sec or whatever we change !

Try adding your example_gamemode name to your map (ex. fivem-map-skater)

resource_type 'map' { gameTypes = { es_example_gamemode = true } }

i already try that and its not working…

The chat resource does this, not essentialmode

idk im waiting on my friend to fix this i will post the fixx after and no i dont receive cash every 60 seconds …

in the old version of hte essentialmode i was getting the amount of my choice and time i choice to but not in this one

i would like to have a full exemple and where to put that to or i will wait on my friend

You can change the currency sign in the ui.html.

1 Like

yo im new in coding i dont know how to change that can you post a exemple how to switch the euro in dollar ! plz :stuck_out_tongue:

<head>
	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto">
	<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
	<script>
		function addCommas(nStr) {
			nStr += '';
			var x = nStr.split('.');
			var x1 = x[0];
			var x2 = x.length > 1 ? '.' + x[1] : '';
			var rgx = /(\d+)(\d{3})/;
			while (rgx.test(x1)) {
				x1 = x1.replace(rgx, '$1' + '<span style="margin-left: 3px; margin-right: 3px;"/>' + '$2');
			}
			return x1 + x2;
		}

		window.onload = function(e){
			// NUI Callback
			window.addEventListener('message', function(event){
				var item = event.data;

				if(item.setmoney == true)
					document.getElementById("cash").innerHTML = "<div><font style='color: rgb(0, 125, 0); font-weight: 700; margin-right: 6px;'>£</font>" + addCommas(item.money);
				if(item.addcash == true){
					$(".tiny").remove();

					var element = $("<div class='tiny'>+<font style='color: rgb(0, 125, 0); font-weight: 700; margin-right: 6px;'>£</font>"+addCommas(item.money)+"</div>")
					$("#money").append(element)

					setTimeout(function(){
						$(element).fadeOut(600, function() { $(this).remove(); })
					}, 1000)
				}
				if(item.removecash == true){
					$(".tiny").remove();
					
					var element = $("<div class='tiny'>-<font style='color: rgb(250, 0, 0); font-weight: 700; margin-right: 6px;'>£</font>"+addCommas(item.money)+"</div>")
					$("#money").append(element)

					setTimeout(function(){
						$(element).fadeOut(600, function() { $(this).remove(); })
					}, 1000)
				}
				if(item.removeStartWindow == true){
					$("#starter").remove();
				}
				if(item.setDisplay == true){
					$("#money").css('opacity', item.display)
				}
			})
		}
	</script>

	<style>
		@font-face {
			font-family: pcdown;
			src: url(pdown.ttf);
		}
		.tiny {
			font-size: 29px;
			position: absolute; right: 10;
		}
		#money {
			font-family: pcdown;
			font-size: 35px;
			color: white;
			padding: 4px;
		text-shadow:
		   -1px -1px 0 #000,
			1px -1px 0 #000,
			-1px 1px 0 #000,
			 1px 1px 0 #000;
				}

		#container {
			position: absolute;
			top: 40; right: 40;
		}
	</style>
</head>

<body>
	<div id="starter" style="font-family: 'roboto'; color: white; position: absolute; left: 20%; top: 5%; width: 60%; background: rgba(40, 40, 40, 0.8)">

	</div>
	<div id="container">
		<div id="money">

			<div id="cash"/>
		</div>
	</div>
</body>

so many cash and money i dont know where i need to change to get the cash in dollars !!

change

to

var element = $("<div class='tiny'>-<font style='color: rgb(250, 0, 0); font-weight: 700; margin-right: 6px;'>$</font>"+addCommas(item.money)+"</div>")
					$("#money").append(element)
1 Like

ty now its working @Streetcorps

Could someone help me out on how to add admin permissions? I’ve changed my permission level and every time I type in a command it just tells me my permission level

Can you please tell me what the formatting for inputting the model should look like? I’ve tried all sorts of formatting and even the model hashes and I can’t seem to get it work. I get stuck at initializing if I even touch that bit.

Much appreciated.

TriggerClientEvent('es_example_gamemode:spawnPlayer', source, -1044.53, -2749.49, 21.3634 --[[, model -- you can put a model here]])

Hello Guys,
Does anyones knows where I can find the retrieving for the identifier ? Because in the database I have an IP, but I would have a Rockstar ID if possible. Do you know how to do that ? Thanks !

I’m not sure thats possible. I do believe the only identifiers possible is either ip og steamid(hexed). If you want it somehow unique i would set DisableAuth to false and require my users to have steam open when joining the server. Thats also a great way of authenticating your users.

I’ve a problem with EssentialMode, i followed the RIB SOSAY’s tuto on Youtube for install it but

I dont have “plugin_data” in my “gta5_gamemode_essential” on SQL…

I only have “bans” and “users”, then when i start the server its ok, 0 error in the console.

But when i want to join it, my game is blocked to “Initializing session…!” and after 1 minute, crash…

Console logs when i join it:

Please help me…

I change my essentialmode/server/player/login.lua

i set my password

and i execute essential/sql.sql

That’s it?