Car Jacker [LUA] 1.2
1,480
40
1,480
40
Tired of all the manual work when getting into a car?
I got something right here that will make your life better, and no its not meth.
What does this mod do?
It does what its told!
Opens the door for you.
Starts the engine for you.
Disables alarm, unlocks and hotwires stolen car for you.
Scares the the 5 levels of crap out of people in other cars.
Makes you and your car immortal.
Teleports you into car.
(all of these can be easily toggled in the lua file)
What doesnt this mod do?
Everything else
Compatibility:
It should be compatible with almost everything, including the IVStyleExitVehicle mod since this script will only attempt to start the engine when you are not touching the vehicle.
However do not activate its immortality feature if you use immortality from other mods.
How to Install:
1. Get Script Hook V
2. Get LUA Plugin for Script Hook V
3. Unpack the contents of CarJacker.rar into Grand Theft Auto V\scripts\addins
How to configure and use:
1. Open the CarJacker.lua and you will know exactly what to do
2. Ingame, go to any vehicles and ettempt to enter it
Changelog:
v1.0
start engine function
v1.1
unlock door function added
v1.2
code rewritten
5 new functions added
mod name changed
If this mod does not work for you, or should any other issue arise with this mod, or if you have a fancy idea that we could implement, please do comment, however keep in mind that this script should activate things only when you attempt to enter/exit a vehicle, so not all the good ideas will be implemented simply because they do not fit the nature of this mod.
You can modify and reupload this mod without my permission, but please credit me as the original author.
I got something right here that will make your life better, and no its not meth.
What does this mod do?
It does what its told!
Opens the door for you.
Starts the engine for you.
Disables alarm, unlocks and hotwires stolen car for you.
Scares the the 5 levels of crap out of people in other cars.
Makes you and your car immortal.
Teleports you into car.
(all of these can be easily toggled in the lua file)
What doesnt this mod do?
Everything else
Compatibility:
It should be compatible with almost everything, including the IVStyleExitVehicle mod since this script will only attempt to start the engine when you are not touching the vehicle.
However do not activate its immortality feature if you use immortality from other mods.
How to Install:
1. Get Script Hook V
2. Get LUA Plugin for Script Hook V
3. Unpack the contents of CarJacker.rar into Grand Theft Auto V\scripts\addins
How to configure and use:
1. Open the CarJacker.lua and you will know exactly what to do
2. Ingame, go to any vehicles and ettempt to enter it
Changelog:
v1.0
start engine function
v1.1
unlock door function added
v1.2
code rewritten
5 new functions added
mod name changed
If this mod does not work for you, or should any other issue arise with this mod, or if you have a fancy idea that we could implement, please do comment, however keep in mind that this script should activate things only when you attempt to enter/exit a vehicle, so not all the good ideas will be implemented simply because they do not fit the nature of this mod.
You can modify and reupload this mod without my permission, but please credit me as the original author.
首次上传时间: 2015年6月02日
最后更新时间: 2015年6月05日
最后下载: 2024年11月21日
28个评论
More mods by XKillER:
Tired of all the manual work when getting into a car?
I got something right here that will make your life better, and no its not meth.
What does this mod do?
It does what its told!
Opens the door for you.
Starts the engine for you.
Disables alarm, unlocks and hotwires stolen car for you.
Scares the the 5 levels of crap out of people in other cars.
Makes you and your car immortal.
Teleports you into car.
(all of these can be easily toggled in the lua file)
What doesnt this mod do?
Everything else
Compatibility:
It should be compatible with almost everything, including the IVStyleExitVehicle mod since this script will only attempt to start the engine when you are not touching the vehicle.
However do not activate its immortality feature if you use immortality from other mods.
How to Install:
1. Get Script Hook V
2. Get LUA Plugin for Script Hook V
3. Unpack the contents of CarJacker.rar into Grand Theft Auto V\scripts\addins
How to configure and use:
1. Open the CarJacker.lua and you will know exactly what to do
2. Ingame, go to any vehicles and ettempt to enter it
Changelog:
v1.0
start engine function
v1.1
unlock door function added
v1.2
code rewritten
5 new functions added
mod name changed
If this mod does not work for you, or should any other issue arise with this mod, or if you have a fancy idea that we could implement, please do comment, however keep in mind that this script should activate things only when you attempt to enter/exit a vehicle, so not all the good ideas will be implemented simply because they do not fit the nature of this mod.
You can modify and reupload this mod without my permission, but please credit me as the original author.
I got something right here that will make your life better, and no its not meth.
What does this mod do?
It does what its told!
Opens the door for you.
Starts the engine for you.
Disables alarm, unlocks and hotwires stolen car for you.
Scares the the 5 levels of crap out of people in other cars.
Makes you and your car immortal.
Teleports you into car.
(all of these can be easily toggled in the lua file)
What doesnt this mod do?
Everything else
Compatibility:
It should be compatible with almost everything, including the IVStyleExitVehicle mod since this script will only attempt to start the engine when you are not touching the vehicle.
However do not activate its immortality feature if you use immortality from other mods.
How to Install:
1. Get Script Hook V
2. Get LUA Plugin for Script Hook V
3. Unpack the contents of CarJacker.rar into Grand Theft Auto V\scripts\addins
How to configure and use:
1. Open the CarJacker.lua and you will know exactly what to do
2. Ingame, go to any vehicles and ettempt to enter it
Changelog:
v1.0
start engine function
v1.1
unlock door function added
v1.2
code rewritten
5 new functions added
mod name changed
If this mod does not work for you, or should any other issue arise with this mod, or if you have a fancy idea that we could implement, please do comment, however keep in mind that this script should activate things only when you attempt to enter/exit a vehicle, so not all the good ideas will be implemented simply because they do not fit the nature of this mod.
You can modify and reupload this mod without my permission, but please credit me as the original author.
首次上传时间: 2015年6月02日
最后更新时间: 2015年6月05日
最后下载: 2024年11月21日
init: scripts/addins/engineHack.lua:1: attempt to index global 'lfs' (a nil value)
hm.. that would mean the directory doesnt exist..or that the luafilesystem isnt installed? i thought those scripts work on every machine, damnit.
how did you get this error message anyway? how can i see the errors when i do things?
yeah, now i realize this makes the changeable enter-car-key feature not work for every single normal user..
@XKillER Once the game starts ALT-TAB back to the desktop. There is a DOS window there that opened while the game loaded and you'll see any errors there from mods. Let me know if there is anything I can do to fix engine hack so it will work for me! Thanks...
open it in notepad or something useful, press ctrl+f, search for lfs.currentdir():gsub("[/\\]", "/").." and replace this with "C:/Games/Grand Theft Auto V or the adress where you have gtav installed, notice the quote i put before C:/, it must be put there, and also notice the slashes are not backslashes, let me know if it works
This is almost too bizarre for me to even debug! To keep it simple I put the text file at
C:\engineHack.txt
and changed the code to
p=io.open("c:/engineHack.txt","r")
What is it with the forward slashes instead of the back slashes? Is that a LUA thing?
Anyway, all I got from that change was this:
init: scripts/main.lua:221: module 'engineHack.txt' not found:
no field package.preload['engineHack.txt']
no file 'scripts/libs/engineHack\txt.lua'
no file 'scripts/addins/engineHack\txt.lua'
no file 'scripts/engineHack\txt.lua'
no file 'C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto
V\lua\engineHack\txt.lua'
no file 'C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto
V\lua\engineHack\txt\init.lua'
and a few more lines of the same. Are you using the latest version of Script Hook V?
http://www.dev-c.com/gtav/scripthookv/
I'm beginning to see more issues where mods work for some people and not others being caused by folks falling behind on updates to ScriptHookV and ScriptHookVDotNet. I had to get myself up to date for the VAutodrive mod.
If I may whine for a second, I'd also like to request that you not put all your source code on a single line! I know you can, but it makes it a bitch to read and I didn't spend the time I normally would have debugging when I first tried your mod because of it. Just a suggestion!
That's all I've got. Update to the latest Script Hook V and see if it breaks your mod for you! :)
Should have said LUA plugin for Script Hook V. Going to go check all my versions now... :)
Ha! Turns out that *I'm* not running the latest LUA plugin for Script Hook V! Jeesh... I'm getting too old for this crap! I'll go install the latest VS 2013 x64 redist to get my lua scripts working again and I'll let you know if that fixes it. Sorry for all the hassle...
ugh i hate myself for puttin you in this mess
anyway those slashes, thats a lua thing, i dont know why, but it is
i would upload it here but it would take a day to get approved, so heres this..
http://www.megafileupload.com/N2p/engineHack_v1.1b.lua
bottom left theres free download button
replace original with this, delete that stupid txt file that came with previous version, and open this one in notepad
you should see on the very top local k=Keys.F just change the F into whatever you use, and i dont think you can change this to gamepad buttons, yeah.. frankly, screw this version and this pseudo fix
i promise the proper new version will come out in next 2 days, theres alot i need to test and figure out.. im workin on 2 scripts right now, switching between them all the time.. damnit, so unefficient
anyway.. a thought back.. your hard drive adress is "C:" right? not "D:" or something else
No worries... it's good to find out I'm falling behind!
But now the new lua plugin doesn't work at all, so I'm going to go back to the previous one and leave it alone until I verify I have the new versions of everything!
Thanks again for your time and good luck!
well you could still try one more thing with the original file, you could try searching for k=0 and replace the 0 with Keys.E or Keys.Execute(if you want enter key to be used)
the window will still say that nil error, but it will work i think, unless the script worked for 8 out of 100 people in which case i might aswell kill myself
which key you want to use by the way? im really curious now.. i remember i used E in all the previous games but then i switched to default F for some reason..
I use "F" because it's the default. I've got enough to remember with all these mods without changing that! :) I'll go try that last suggestion and let you know if anything changes. Thanks!
It works! The only other thing you need to add is entering the car with the gamepad as well as the keyboard. I have no clue how to do that off the top of my head! Here is the final code I used (in readable form).
local engineHack={}
local k=Keys.F
function engineHack.tick()
if get_key_pressed(k)then
while get_key_pressed(k)do
wait(0)
end
local p=PLAYER.PLAYER_PED_ID()
if PED.IS_PED_IN_ANY_VEHICLE(p,true)==false then
local v=PED.GET_VEHICLE_PED_IS_USING(p)
if v~=0 then
VEHICLE.SET_VEHICLE_ENGINE_ON(v,true,true)
if VEHICLE.GET_VEHICLE_DOOR_LOCK_STATUS(v)==7 then
VEHICLE.SET_VEHICLE_DOORS_LOCKED(v,1)
end
end
end
end
end
function engineHack.unload()
end
return engineHack
I wouldn't worry too much about making a separate .ini type file for changing the key. Just put a comment in the code to tell people where to change it if they want to.
Good mod. Thanks for helping me get it working!
"I use "F" because it's the default."
that sentence confirms that it shouldnt be working for anybody who doesnt have the luafilesystem thing, basically everyone, how did this mod get likes and why wasnt it reported sooner that it doesnt work at all, why wasnt it deleted for that reason...
so many questions, so little answers..
Of course the messages here pull out leading spaces so some of the formatting is lost! :)
Well that turned out to be easy! Here is the code that works when the car is opened with the keyboard (F) or gamepad (yellow Y button):
local engineHack={}
local k=Keys.F
function engineHack.tick()
if get_key_pressed(k) or CONTROLS.IS_CONTROL_PRESSED(2,75) then
while get_key_pressed(k) or CONTROLS.IS_CONTROL_PRESSED(2,75) do
wait(0)
end
local p=PLAYER.PLAYER_PED_ID()
if PED.IS_PED_IN_ANY_VEHICLE(p,true)==false then
local v=PED.GET_VEHICLE_PED_IS_USING(p)
if v~=0 then
VEHICLE.SET_VEHICLE_ENGINE_ON(v,true,true)
if VEHICLE.GET_VEHICLE_DOOR_LOCK_STATUS(v)==7 then
VEHICLE.SET_VEHICLE_DOORS_LOCKED(v,1)
end
end
end
end
end
function engineHack.unload()
end
return engineHack
Have fun!
Ew, cheats.
Hi me and my team are working on a potentially massive mod for gta v and we a looking for coders of C' and we seen you mod which is great btw and wondered if you would like to jump onboard
@ali mc Im not around V since i got bored of it pretty fast, im beginner with LUA and with C im nothing, im sorry but i have to refuse, but i wish you good luck with your project and hope that you make somethin badass.