[EssentialMode 4] [FXServer] es_rp | _The_ Roleplay Gamemode [Beta-ish or so]

Take a look at jobs.lua

Note

For job garages to properly work you need the new es_admin that comes with EssentialMode 4

Ah, each has its own permission level so you just assign that to the player’s permission level in the db?

setadmin userid level

1 Like

i’m search for other banks system and i find with fix

just replace

https://www.sendspace.com/file/fmp6f0

This is working 100% for me.
If you have your FXserver and essential mode 4 running correctly you shouldn’t really be getting any errors. I have had this running for 48 hours now with no errors at all.
Thanks for the release!

1 Like

how i change job ? the jobofficer dont work to set job

I don’t see the Money/Bank gui in the top right corner, it only appears when I make a transaction, then goes away. Is this intentional? If not, what can I do to fix it?

Currently intentional, a new version of es4 and a new version of es_rp will be released soon which makes it appear for ever.

Just wondering? Did you ever get it working? People are saying the money system works 100 percent but I have a few doubts. Have setup everything quite a few times over again just to make sure but I still cant deposit/withdraw funds.

As I told him more seem to have the issue but I can’t reproduce it. If you could contact me on discord maybe we can figure out a fix.

Currently intentional, a new version of es4 and a new version of es_rp will be released soon which makes it appear for ever.

Why not on key press or when the inventory is opened?

Not 100% sure what the issue is, but when players try to select a job from the Job Office, it shows all the jobs, but does not let them select it. Is this a current issue? Or am I just doing something wrong.

1 Like

I’m getting the same thing, it seems es:getPlayerFromId is returning nil. I’m still trying to track it down.

1 Like

Let me know if you’re able to find what the issue is, and if you’ve got a fix for it. I shall keep looking also.

I’m no lua expert, but, It looks like the global source is going out of scope after triggering the es:getPlayerFromId event.

I was debugging es_rp:showID and getting all sorts of nil errors. This was just one event. I haven’t looked into the switching of jobs yet.

I fixed it by setting source again from the user in the callback, rather than the global. My guess would be something similar; check and make sure the source is valid.

Does this have to do with the event referencing a different module?

I’m also noticing that playerDropped isn’t being called when when disconnecting or exiting game, like on the legacy server. I ended up with multiple entries in Users[source] for the same user. Just something to be aware of.

AddEventHandler('es_rp:showID', function()
	TriggerEvent('es:getPlayerFromId', source, function(user)
		-- source disappears
		local myPos = user.getCoords()
		TriggerEvent('es:getPlayers', function(players)

			-- set source again
			source = user.get('source')
			
			for k,v in pairs(players)do
				local theirPos = v.getCoords()
				if get3DDistance(myPos.x, myPos.y, myPos.z, theirPos.x, theirPos.y, theirPos.z) < 10.0 then
					TriggerClientEvent("es_rp:notify", v.get('source'), "~b~ID was shown: ~w~" .. (playersNames[source] or GetPlayerName(source)) .. ", " .. jobs[source].name)
					if wanted[source] then
						TriggerClientEvent('es_rp:notify', v.get('source'), "~r~WANTED: ~b~" .. wanted[source])
					end
				end
			end
		end)
	end)
end)

EDIT: Yup, the change job feature is affected as well. Insert source = user.get('source') after triggering es:getPlayerFromId in the es_rp:changeJob event handler.

2 Likes

When I attempt to create a custom job, selecting it at the job office just turns your screen black and doesn’t fade away. Why is this?

1 Like

What is FXServer and how do I get it??

Bugfix

Money will appear for ever now, no need to make a transaction.

PS: If anyone has the issue with banking not working properly, could you contact me on discord please.

Hotfix

Banking math functions fixed, also for a fix related to the bank not working at all with an error on line 24 please see below. The folder structure requirements (Thanks to @Cromz)

Thanks to @Cromz for allowing me to test on his server

2 Likes