-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbike.lua
More file actions
30 lines (27 loc) · 1006 Bytes
/
Abike.lua
File metadata and controls
30 lines (27 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
script_name("Abike")
script_description("Pressing W on the bike or skate automatically accelerates it")
script_url("https://github.com/ins1x/moonloader-scripts")
script_version("0.2")
local bikeModel = {[481] = true, [509] = true, [510] = true, [15882] = true}
local accelDelay = 200
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(0)
if not sampIsChatInputActive() and not sampIsDialogActive() and not isSampfuncsConsoleActive() then
if isCharOnAnyBike(playerPed) and isKeyDown(0x57) then
if bikeModel[getCarModel(storeCarCharIsInNoSave(playerPed))] then
if accelDelay > 10 then
accelDelay = accelDelay - 10
end
setGameKeyState(16, 255)
wait(accelDelay)
setGameKeyState(16, 0)
end
else
accelDelay = 200
end
end
end
end