This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
This resource is simple (yet nifty), it makes it so you enter the seat you are near.
The following is a showcase of the resource in action:
Almost a year later, but this is an easy fix, it might be some better ways to do it. But just add this somewhere.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local ped = PlayerPedId()
if IsControlJustPressed(0, 32) or IsControlJustPressed(0, 34) or IsControlJustPressed(0, 33) or IsControlJustPressed(0, 35) then
local task = GetIsTaskActive(ped, 160)
if task == 1 then
--print(task)
ClearPedTasks(ped)
end
end
end
end)