RegisterKeyMapping("+pmjstcAttach", Config.Controlmessages.AttachVehicle, "keyboard", "g") RegisterKeyMapping("+pmjstcInteract", Config.Controlmessages.RampInteract, "keyboard", "e") RegisterKeyMapping("+pmjstcWarp", "Get in attached vehicle", "keyboard", "f") RegisterKeyMapping("+jstc1", "Toggle Extra 2 Lights", "keyboard", "NUMPAD1") RegisterKeyMapping("+jstc2", "Toggle Extra 3 Lights", "keyboard", "NUMPAD2") RegisterKeyMapping("+jstc3", "Toggle Extra 9 Lights", "keyboard", "NUMPAD3") RegisterKeyMapping("+jstcsound", "Toggle TLS Sounds", "keyboard", "NUMPAD0") function NotiAtt() -- Attached notification BeginTextCommandThefeedPost("STRING") AddTextComponentSubstringPlayerName(Config.NotiLoadMessage) EndTextCommandThefeedPostTicker(true, true) end function NotiDet() -- Detached notification BeginTextCommandThefeedPost("STRING") AddTextComponentSubstringPlayerName(Config.NotiUnLoadMessage) EndTextCommandThefeedPostTicker(true, true) end -- Use this function for job locking. If the job is correct, return true. -- Please refer to your framework's job system for how to implement, I do not support -- job checking integration. -Theebu function allowed() return true end --This function returns if the vehicle is locked or not when trying to get in the loaded vehicle from next to the trailer --false = NOT locked true == LOCKED function IsVehicleLocked(car) return DecorGetInt(car, '_VEH_DOOR_LOCK_STATUS') == 2 or DecorGetInt(car, '_VEH_DOOR_LOCK_STATUS') == 10 end --Help Text Messages function message(lineOne, lineTwo, lineThree, duration) BeginTextCommandDisplayHelp("THREESTRINGS") AddTextComponentSubstringPlayerName(lineOne) AddTextComponentSubstringPlayerName(lineTwo or "") AddTextComponentSubstringPlayerName(lineThree or "") -- shape (always 0), loop (bool), makeSound (bool), duration (5000 max 5 sec) EndTextCommandDisplayHelp(0, false, false, duration or 5000) end function draw2dText(state) Citizen.CreateThread(function() local timer = 100 while timer > 1 do timer = timer -1 Citizen.Wait(0) SetTextFont(0) SetTextProportional(1) SetTextScale(0.0, 0.3) SetTextColour(128, 128, 128, 255) SetTextDropshadow(0, 0, 0, 0, 255) SetTextEdge(1, 0, 0, 0, 255) SetTextDropShadow() SetTextOutline() SetTextEntry("STRING") if state == "on" then AddTextComponentString("🔊") elseif state == "off" then AddTextComponentString("🔇") end DrawText(0.003, 0.955) end if timer == 0 then return end end) end