Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Tuners
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    2. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    3. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    4. Bugs*

    1. Grand Theft Auto Series

      1. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    6. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[V|REL|HOOK] LUA Plugin for Script Hook V


headscript
 Share

Recommended Posts

Current Version: 9,10.0

Description:

Write any LUA Script for GTA5

you are able to use all Natives from NativeDB

 

 

 

Changelog

 

Requirements:

Installation Instructions:

  1. Extract LUA.zip
  2. Move the LUA.asi in the GTA5 Folder where the ScriptHookV.dll is located
  3. Place the scripts folder in the GTA 5 Folder
  4. Add any Scripts you want into the scripts/addins folder
  5. Run GTA 5 over Steam or Rockstar Launcher

Extra Note:

I can convert your Lua Scripts to fully Independent .asi files for safety/speed just write me a PM

Example:

local basemodule = {}basemodule.GUI = Libs["GUI"]function basemodule.unload()endfunction basemodule.giveWeapon(weapon)    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PLAYER.PLAYER_PED_ID(), GAMEPLAY.GET_HASH_KEY(weapon), 1000, true)endfunction basemodule.init()    bodyguard.GUI.addButton("Give Me RAILGUN",basemodule.giveWeapon,"WEAPON_RAILGUN",0,0.2,0.05,0.05)endfunction basemodule.tick()    basemodule.GUI.tick()endreturn basemodule 

Download:

LUA Plugin Download

 

Found a Bug?

Report them here: https://github.com/gallexme/LuaPlugin-GTAV/issues

 

Thanks for your Love and Support: martysama0134 (i owe you something)

Edited by headscript
Link to comment
Share on other sites

dosen't work it crashes..

 

He did mention it could crash since it's very alpha or new, but this is good news to the modding community, the way I see this is that it's taking a new step towards amazing mods.

Link to comment
Share on other sites

 

dosen't work it crashes..

 

He did mention it could crash since it's very alpha or new, but this is good news to the modding community, the way I see this is that it's taking a new step towards amazing mods.

 

I know but it doesn't work...

Link to comment
Share on other sites

if someone got c++ knowledge andor lua knowledge and wants to help me finding the problem

add me on skype: fabs1996

Link to comment
Share on other sites

if someone got c++ knowledge andor lua knowledge and wants to help me finding the problem

add me on skype: fabs1996

Could be nice so we can have LUA ingame also !

Link to comment
Share on other sites

Updated works now :)

have you updated the download links files as i have just launched the game and it still seams to crash the game

 

Thanks

 

EDIT : Nevermind works bro just reloaded game

Edited by burnsyboo
Link to comment
Share on other sites

 

 

Updated works now :)

have you updated the download links files as i have just launched the game and it still seams to crash the game

 

Thanks

 

make sure u got vc 2013 redist x64 installed

https://www.microsoft.com/de-de/download/details.aspx?id=40784

 

it is working fine now thank you i just reloaded GTA V a second time. :lol:

Edited by burnsyboo
Link to comment
Share on other sites

Hey there, awesome stuff! I'm sort of a noob and I'm just curious where I would find the functions like VEHICLE.SET_VEHICLE_FORWARD_SPEED, etc. Is there a list somewhere or are you loooking through GTA itself?

 

Thanks. :]

 

Edit: Never mind I found it! http://www.dev-c.com/nativedb/

Edited by Swarm96
Link to comment
Share on other sites

Marty McFly

Is there an actual native for that? I would've just read the current vehicle speed and multiplied it with some factor. Interesting what's available already :blink:

Edited by Marty McFly
Link to comment
Share on other sites

Would it be possible for you to add a Lua console to this mod, so you don't need to restart the game and wait for it to load every time you want to try something new?

Link to comment
Share on other sites

Would it be possible for you to add a Lua console to this mod, so you don't need to restart the game and wait for it to load every time you want to try something new?

Good idea..

Edited by mis009
Link to comment
Share on other sites

Would it be possible for you to add a Lua console to this mod, so you don't need to restart the game and wait for it to load every time you want to try something new?

dont u see a console when u join a game?

you cant type anything in but if error occurs u see them there and u can reload your own lua files easily with lua builtin functions

Link to comment
Share on other sites

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

Link to comment
Share on other sites

 

Would it be possible for you to add a Lua console to this mod, so you don't need to restart the game and wait for it to load every time you want to try something new?

dont u see a console when u join a game?

you cant type anything in but if error occurs u see them there and u can reload your own lua files easily with lua builtin functions

 

How would I do this? Googled around a bit on reloading but nothing explained it well. Could you point me in the right direction? It is a pain to restart GTA :(

Link to comment
Share on other sites

 

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

 

 

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

Link to comment
Share on other sites

 

 

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

 

 

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

 

its over 150 000 lines of code what do you think -.-

all like

 lua_module(lua_S,"DLC2",0); lua_beginmodule(lua_S,"DLC2"); lua_function(lua_S,"IS_DLC_PRESENT",lua_natives_DLC2_IS_DLC_PRESENT00); lua_function(lua_S,"_0xF2E07819EF1A5289",lua_natives_DLC2__0xF2E07819EF1A528900); lua_function(lua_S,"_0x9489659372A81585",lua_natives_DLC2__0x9489659372A8158500); lua_function(lua_S,"_0xA213B11DFF526300",lua_natives_DLC2__0xA213B11DFF52630000); lua_function(lua_S,"_0x8D30F648014A92B5",lua_natives_DLC2__0x8D30F648014A92B500); lua_function(lua_S,"_0x10D0A8F259E93EC9",lua_natives_DLC2__0x10D0A8F259E93EC900); lua_function(lua_S,"_0x46E2B844905BC5F0",lua_natives_DLC2__0x46E2B844905BC5F000); lua_function(lua_S,"_0xD7C10C4A637992C9",lua_natives_DLC2__0xD7C10C4A637992C900); lua_function(lua_S,"_0x0888C3502DBBEEF5",lua_natives_DLC2__0x0888C3502DBBEEF500); lua_endmodule(lua_S);

and the wrapped function definitions and type conversions and error checking

Link to comment
Share on other sites

 

 

 

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

 

 

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

 

its over 150 000 lines of code what do you think -.-

all like

 lua_module(lua_S,"DLC2",0); lua_beginmodule(lua_S,"DLC2"); lua_function(lua_S,"IS_DLC_PRESENT",lua_natives_DLC2_IS_DLC_PRESENT00); lua_function(lua_S,"_0xF2E07819EF1A5289",lua_natives_DLC2__0xF2E07819EF1A528900); lua_function(lua_S,"_0x9489659372A81585",lua_natives_DLC2__0x9489659372A8158500); lua_function(lua_S,"_0xA213B11DFF526300",lua_natives_DLC2__0xA213B11DFF52630000); lua_function(lua_S,"_0x8D30F648014A92B5",lua_natives_DLC2__0x8D30F648014A92B500); lua_function(lua_S,"_0x10D0A8F259E93EC9",lua_natives_DLC2__0x10D0A8F259E93EC900); lua_function(lua_S,"_0x46E2B844905BC5F0",lua_natives_DLC2__0x46E2B844905BC5F000); lua_function(lua_S,"_0xD7C10C4A637992C9",lua_natives_DLC2__0xD7C10C4A637992C900); lua_function(lua_S,"_0x0888C3502DBBEEF5",lua_natives_DLC2__0x0888C3502DBBEEF500); lua_endmodule(lua_S);

and the wrapped function definitions and type conversions and error checking

 

 

You do know that you could just put it all into 1 function and do the checking there, right?

That would decrease file size a lot.

Link to comment
Share on other sites

 

 

 

 

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

 

 

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

 

its over 150 000 lines of code what do you think -.-

all like

 lua_module(lua_S,"DLC2",0); lua_beginmodule(lua_S,"DLC2"); lua_function(lua_S,"IS_DLC_PRESENT",lua_natives_DLC2_IS_DLC_PRESENT00); lua_function(lua_S,"_0xF2E07819EF1A5289",lua_natives_DLC2__0xF2E07819EF1A528900); lua_function(lua_S,"_0x9489659372A81585",lua_natives_DLC2__0x9489659372A8158500); lua_function(lua_S,"_0xA213B11DFF526300",lua_natives_DLC2__0xA213B11DFF52630000); lua_function(lua_S,"_0x8D30F648014A92B5",lua_natives_DLC2__0x8D30F648014A92B500); lua_function(lua_S,"_0x10D0A8F259E93EC9",lua_natives_DLC2__0x10D0A8F259E93EC900); lua_function(lua_S,"_0x46E2B844905BC5F0",lua_natives_DLC2__0x46E2B844905BC5F000); lua_function(lua_S,"_0xD7C10C4A637992C9",lua_natives_DLC2__0xD7C10C4A637992C900); lua_function(lua_S,"_0x0888C3502DBBEEF5",lua_natives_DLC2__0x0888C3502DBBEEF500); lua_endmodule(lua_S);

and the wrapped function definitions and type conversions and error checking

 

 

You do know that you could just put it all into 1 function and do the checking there, right?

That would decrease file size a lot.

 

doesnt work in this particular case but if you want to try contact me on skype: fabs1996

Link to comment
Share on other sites

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

 

This is the dumbest thing i've ever heard someone say.

Link to comment
Share on other sites

 

 

 

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

 

This is the dumbest thing i've ever heard someone say.

 

 

lol, that was just sarcasm

I was making fun of the large disk space the plugin requires ^^

 

 

 

 

 

 

 

 

 

 

 

 

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

 

 

Right, because compiled code is very large.

That's why you should never comment your code, compiled comments take a lot of disk space.

 

its over 150 000 lines of code what do you think -.-

all like

 lua_module(lua_S,"DLC2",0); lua_beginmodule(lua_S,"DLC2"); lua_function(lua_S,"IS_DLC_PRESENT",lua_natives_DLC2_IS_DLC_PRESENT00); lua_function(lua_S,"_0xF2E07819EF1A5289",lua_natives_DLC2__0xF2E07819EF1A528900); lua_function(lua_S,"_0x9489659372A81585",lua_natives_DLC2__0x9489659372A8158500); lua_function(lua_S,"_0xA213B11DFF526300",lua_natives_DLC2__0xA213B11DFF52630000); lua_function(lua_S,"_0x8D30F648014A92B5",lua_natives_DLC2__0x8D30F648014A92B500); lua_function(lua_S,"_0x10D0A8F259E93EC9",lua_natives_DLC2__0x10D0A8F259E93EC900); lua_function(lua_S,"_0x46E2B844905BC5F0",lua_natives_DLC2__0x46E2B844905BC5F000); lua_function(lua_S,"_0xD7C10C4A637992C9",lua_natives_DLC2__0xD7C10C4A637992C900); lua_function(lua_S,"_0x0888C3502DBBEEF5",lua_natives_DLC2__0x0888C3502DBBEEF500); lua_endmodule(lua_S);

 

and the wrapped function definitions and type conversions and error checking

 

 

You do know that you could just put it all into 1 function and do the checking there, right?

That would decrease file size a lot.

 

doesnt work in this particular case but if you want to try contact me on skype: fabs1996

 

 

Why wouldn't it? It takes some work, yes. But it's definetly possible.

For inspiration you could take a look at my repo.

Edited by TJGM
Link to comment
Share on other sites

Im new to this stuff

Is this a mod that lets you create your own scripts or something?

Link to comment
Share on other sites

Im new to this stuff

Is this a mod that lets you create your own scripts or something?

Yes you can write .asi scripts/plugins in Lua instead of C++. Edited by Anthony_y
Link to comment
Share on other sites

Im having some trouble do i delete everything in the main lua and replace the code with my own code?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.