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

By writing some code that adds a command which in return triggers a client event spawning a vehicle. Or copy it from old es_admin versions which will work.

Nope. Copy/paste doesn’t work for me.

Actually vehicle spawning script exists in cl_admin.lua and looks like this:

RegisterNetEvent('es_admin:spawnVehicle')
AddEventHandler('es_admin:spawnVehicle', function(v)
	local carid = GetHashKey(v)
	local playerPed = GetPlayerPed(-1)
	if playerPed and playerPed ~= -1 then
		RequestModel(carid)
		while not HasModelLoaded(carid) do
				Citizen.Wait(0)
		end
		local playerCoords = GetEntityCoords(playerPed)

		veh = CreateVehicle(carid, playerCoords, 0.0, true, false)
		SetVehicleAsNoLongerNeeded(veh)
		TaskWarpPedIntoVehicle(playerPed, veh, -1)
	end
end)

But there is nothing in sv_admin.lua, where should be chat command settings related to cl_admin.lua.

If i copy needed part from previous versions and type /car in chat, nothing happens.

Well then code it yourself, although it should be working I literally haven’t touched that code for months and can already see a ton of shit code looking at that client stuff.

Thank you for the quick response!

That’s how it looks in prev versions.

TriggerEvent('es:addCommand', 'car', function(source, args, user)
	TriggerClientEvent('es_admin:spawnVehicle', source, args[2])
end)

I edited it a bit and now it works, so if anyone need it…

TriggerEvent('es:addGroupCommand', 'car', "admin", function(source, args, user)
	TriggerClientEvent('es_admin:spawnVehicle', source, args[2])
end, function(source, args, user)
	TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficienct permissions!")
end, {help = "Spawn a vehicle"})

Probably should be pasted somwhere after “Noclip” command, cause (idk why) it doesnt work if pasted at the end of code (after logging)

2 Likes

Quick question is there a coma system implemented in Es_rp that has to be enabled? If so what would it be under. Just asking because es rp has the the ems job where they are able to revive people.

No it was removed because of issues.

same problem how do i solve

make sure in rcon you do setadmin (ID) (Permission level)11 for police 10 for Emergency

i have what do i click in the menu

Im not sure why, but when I go to deposit or withdraw it doesn’t work, besides that great addon! Saves a ton of work!

the job menu doesnt work im trying to work as mechanic not working,

is their a way to make it so the job saves in database?

Not sure why i am getting this?

https://wiki.fivem.net/wiki/Running_FXServer

require doesn’t exist anymore, any scripts/libraries should be loaded using the server_script directive in the resource manifest.

broken, job office not working even if permssional level 11

1 Like

Unfixable as it can’t be reproduced.

Got a questions - how can I disable how EM does respawning I have a death script and EM overrides it. 2. How can I set a player to the job if they have the perms - is there a menu or a command for it.

First off essentialmode doesn’t even handle spawning es rp does. Just remove anything related to spawning in the resource. Do note that will make anything you set in jobs.lua not work.

For the other one there is a job office on the map.

I’ve had this problem for a while now where clicking on stuff in es_rp just doesn’t work. Tried gun store, choosing job, all the illegal jobs, ect. Logs come up clear and banking works fine. Any Idea?


Started resource ■■■■■■■
true
Started resource essentialmode
Started resource es_admin2
Started resource handsup
Started resource livery
Started resource heli
Started resource LoadScreen
Started resource watermark
Started resource NeverWanted
Started resource lux_vehcontrol
Started resource delveh
Started resource frfuel
Started resource disclaimer
Started resource pv-tow
Started resource pausemenu
Started resource pv-voip
Started resource lscustoms
Started resource chp
Started resource crouch
Started resource wk_vehdamage
Started resource k9-master
Started resource NoDriveBy
Started resource rolesFX
Started resource es_pld
Started resource MissionText
Started resource TruckerJob
Started resource carhud
Started resource banking
Started resource es_rp
cfx> Started resource fivem-map-skater
Started map fivem-map-skater
-------------------------------------------------------------
--- No errors detected, essentialmode is setup properly. ---
-------------------------------------------------------------

Current version: 4.4.5
Updater version: 4.4.5

Everything is fine!

1 Like