I am using this menu here [Release] Vehicle Extra Menu
I am trying to figure out how to change it from using the keybind to using /extras to open the menu.
I tried registering a command but I just can’t get it working correctly.
Here is the client.lua
(there is no server.lua but I created one for testing while trying to get it working)
if IsControlJustPressed(1, 168) or IsDisabledControlJustPressed(1, 168) then
if not menu then
if IsPedInAnyVehicle(GetPlayerPed(-1), 0) and (GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1), 0), -1) == GetPlayerPed(-1)) then
menu = true
else
drawNotification("~r~You have to be the driver of a vehicle to use this Menu.")
end
elseif menu then
menu = false
end
end
if IsDisabledControlJustPressed(1, 177) then
if menu then
menu = false
bool = true
ExtraCount = 0
elseif trailer then
trailer = false
bool = true
ExtraCount = 0
menu = true
end
elseif not (IsPedInAnyVehicle(GetPlayerPed(-1), 0) and (GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1), 0), -1) == GetPlayerPed(-1))) then
menu = false
trailer = false
bool = true
ExtraCount = 0
end
if menu then
TriggerEvent("VEM:Title", "~y~~bold~Vehicle Extra Menu")