Custom Client

Add Needed Client Events for binds

The resource comes with a custom_client.lua file. It's for those who wants to centralize binds things in one resource. In this file you can add new Client Events to open menus, change voice distance, etc...

--[[

-------------
-- EXAMPLE --
-------------

AddEventHandler("srb_binds:example", function()
    print("Example event")
end)

]]

----------------------------------
-- ADD YOUR CLIENT EVENTS BELOW --
----------------------------------

-- Change cycle proximity of pma-voice (also known as mumble)
AddEventHandler("pma-voice:cycleproximity", function()
	ExecuteCommand("cycleproximity")
end)

UI Focus Problems

It is possible that you encounter problem of UI focus, to solve it, you MUST enable/disable binds when opening/closing your UI. By default, the script already do it for menuapi menus, VORP Inventory and default chat.

Enable Binds

When I close the chat I want to use back my binds as I am playing.

AddEventHandler("chat:OnClose", function()
    TriggerEvent("srb_binds:EnableBinds", true)
end)

Disable Binds

I'm chating I do not want use binds, so, I disable.

AddEventHandler("chat:OnOpen", function()
    TriggerEvent("srb_binds:EnableBinds", false)
end)

Last updated