Scripts baffled

Ok I have searched high and low questions on 3 things

  1. How can i change what button opens the esx_phone

  2. Simple interactions button also what file do I edit to change that.

  3. When I type /revive [player ID] they revive but are a new or default character??

Thanks in advancement if any help I have looked at the files with notepad++ but all I see is things like this for keys…
currently F1 opens the phone but it will not close i have to log out

I have,
FX
ES 5
ESX

document.onkeydown = function (data) {
		if ((data.which == 120 || data.which == 27) && isPhoneShowed) { // || data.which == 8
			$.post('http://esx_phone/escape');
		}
	};

F1 opens the phone, backspace closes the phone. The code you provided above has nothing to do with opening closing the phone on key press.

  if IsControlPressed(0, Keys['F1']) and (GetGameTimer() - GUI.Time) > 150 then
1 Like

I know backspace is supposed to close it but it does not I even tried ESC no change

I found this but its just a “key” no number… Don’t it have to be numbers that refer to
these ? https://wiki.fivem.net/wiki/Controls

-- Key controls
Citizen.CreateThread(function()
  while true do

    Citizen.Wait(0)

    if CurrentAction ~= nil then

      SetTextComponentFormat('STRING')
      AddTextComponentString(CurrentActionMsg)
      DisplayHelpTextFromStringLabel(0, 0, 1, -1)

      if IsControlPressed(0,  Keys['E']) and (GetGameTimer() - GUI.Time) > 300 then

        if CurrentAction == 'dispatch' then
          TriggerServerEvent('esx_phone:stopDispatch', CurrentDispatchRequestId)
          SetNewWaypoint(CurrentActionData.position.x,  CurrentActionData.position.y)
        end

        CurrentAction = nil
        GUI.Time      = GetGameTimer()

      end

    end

  end
end)

The key tables are improper but still ppl use them. You should see a key table in a script using them. The number corresponds to a control press. Example E=38. The code you just provided is from esx_ambulance or police. It does not control the phone.

You are correct I’m sorry I went to far down… If this is indeed correct then why is it opened when pressing F1?

if IsControlPressed(0, Keys['u']) and (GetGameTimer() - GUI.Time) > 150 then

        if not ESX.UI.Menu.IsOpen('phone', GetCurrentResourceName(), 'main') then
          ESX.UI.Menu.CloseAll()
          ESX.UI.Menu.Open('phone', GetCurrentResourceName(), 'main')
        end

        GUI.Time = GetGameTimer()

      end

To be honest, I really don’t know. This is something I’m working on too. I’m trying to make my server both keyboard and controller friendly. However when I change the keys the keyboard changes properly but the controller still does the same. Testing on a PS4 controller ∆ opens the phone and no one can enter a vehicle. L1 opens a menu, forget which one and so does R2. Probably has something to do with the improper key tables. Maybe erasing the key table and the keys in the code and using controls like we’re supposed to.