[No-Support] [Release] esx_personmeny

I don’t know which community you belong? Beacuse if it is from the swedish community then you should try to figure out that it might be a script that everyone wants to get hold of and in addition, I can not give this out. Because it’s not mine!
:angry::angry:

I could easily create a “toilet” script that works together with esx_status, there’s no problem with that. Not even hard.

Steps:

  1. Install esx_basicneeds and insert the following rows under the “resetStatus” section in client/main.lua:

TriggerEvent(‘esx_status:set’, ‘poop’, 500000)
TriggerEvent(‘esx_status:set’, ‘pee’, 500000)

  1. Copy/paste inside of the same file (main/client.lua) under the “loaded” section the following two sections:

TriggerEvent(‘esx_status:registerStatus’, ‘poop’, 1000000, ‘#4d2600’,
function(status)
return true
end,
function(status)
status.remove(250)
end
)

TriggerEvent(‘esx_status:registerStatus’, ‘pee’, 1000000, ‘#fcd36c’,
function(status)
return true
end,
function(status)
status.remove(250)
end
)

  1. Go into the shitty toilet (client.lua)

  2. Add the following row all the way down under "RegisterNetEvent(‘pee’)

TriggerServerEvent(‘esx_pee:pee’)

  1. Do the same as #4 but under "RegisterNetEvent(‘poop’)

TriggerServerEvent(‘esx_poop:poop’)

  1. Create a shitty server.lua file

  2. Inside of the server.lua write the following rows:

ESX = nil

TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)

RegisterServerEvent(‘esx_pee:pee’)
AddEventHandler(‘esx_pee:pee’, function(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
TriggerClientEvent(‘esx_status:add’, _source, ‘pee’, 750000)
print(‘event’)
end)

RegisterServerEvent(‘esx_poop:poop’)
AddEventHandler(‘esx_poop:poop’, function(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
TriggerClientEvent(‘esx_status:add’, _source, ‘poop’, 750000)
print(‘event’)
end)

  1. Rewrite the __resource.lua file to make it work together with the server.lua file. It should look like this:

resource_manifest_version ‘44febabe-d386-4d18-afbe-5e627f4af937’
server_scripts {
‘server.lua’
}

client_scripts {
‘client.lua’
}

  1. Done, this wasn’t hard was it?
2 Likes

I would lower the status.remove(250) to 50 or under.

1 Like

Yea of course, this was just an sample. But it works.

disabling cruise control make my car un movable?

1 Like

yeah it’S broken still, just completely remove the menu item for now so no one can use it

To disable cruisecontrol, i changed:
if data.current.value == ‘none’ then
local playerPed = GetPlayerPed(-1)
local playerVeh = GetVehiclePedIsIn(playerPed, false)
local modelVeh = GetEntityModel(playerVeh)
local maxSpeed = GetVehicleMaxSpeed(modelVeh)
SetEntityMaxSpeed(playerVeh, maxSpeed)
TriggerEvent(“pNotify:SendNotification”, {text = “Du stängde av farthållaren”, type = “error”, queue = “vehiclemenu”, timeout = 1000, layout = “bottomLeft”})
end

with
if data.current.value == ‘none’ then
local speedkm = 300
local speed = speedkm/3.6
local playerPed = GetPlayerPed(-1)
local playerVeh = GetVehiclePedIsIn(playerPed, false)
SetEntityMaxSpeed(playerVeh, speed)
TriggerEvent(“pNotify:SendNotification”, {text = “Sie haben den Tempomat ausgeschaltet”, type = “error”, queue = “vehiclemenu”, timeout = 1000, layout = “bottomLeft”})
end

I know its not perfect, but it was a simple way to remove cruisecontrol if its not needed. Maybe 300kmh is not enough, just raise it.

Is it possible to add a search function in the menu?

This should fix the cruise control. I have tested it, it is working perfect so far… I put a pull request on GitHub for this change

 if data.current.value == 'none' then
              local playerPed = GetPlayerPed(-1)
                local playerVeh = GetVehiclePedIsIn(playerPed, false)
                local modelVeh  = GetEntityModel(playerVeh, false)
		local maxSpeed = GetVehicleHandlingFloat(playerVeh,"CHandlingData","fInitialDriveMaxFlatVel")
                SetEntityMaxSpeed(playerVeh, maxSpeed)
                TriggerEvent("pNotify:SendNotification", {text = "Du stängde av farthållaren", type = "error", queue = "vehiclemenu", timeout = 1000, layout = "bottomLeft"})
            end
1 Like

There are problems showing the identity card of someone close to you or to the police. Is there a solution if you allow?

On the last update from 2018-08-08 is the bugg fixed! :slight_smile:

Where is the config.lua? :smiley:

Thank you for the nice work but missing one thing config.lua

Fixed the config.lua

Good work from you. thank you for your effort

Error parsing script locales/sv.lua in resource esx_personmeny: locales/sv.lua:46: '}' expected (to close '{' at line 1) near '['
Failed to load script locales/sv.lua.
Error parsing script locales/en.lua in resource esx_personmeny: locales/en.lua:46: '}' expected (to close '{' at line 1) near '['
Failed to load script locales/en.lua.

Interesting error, the locale files soom to be fine

[FIXED] had to edit the locale files abit… Nice release!

how do i add pet meny and animations to esx_personmeny?

can you share what has been FIXED please :wink:

For the locales, last 2 entries are missing commas at the end.

Change

	-- Seatbelt
	["seatbelt_on"]				= "Fasten seatbelt!"
	["seatbelt_off"]			= "Unbuckled seatbelt!"
}

to

	-- Seatbelt
	["seatbelt_on"]				= "Fasten seatbelt!",   -- add comma here
	["seatbelt_off"]			= "Unbuckled seatbelt!"
}