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

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

headscript

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

Recommended Posts

headscript

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

Share this post


Link to post
Share on other sites
mis009

dosen't work it crashes..

Share this post


Link to post
Share on other sites
headscript

dosen't work it crashes..

im sorry gonna fix it right now

Share this post


Link to post
Share on other sites
Bolcksta

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.

Share this post


Link to post
Share on other sites
mis009

 

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...

Share this post


Link to post
Share on other sites
headscript

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

add me on skype: fabs1996

Share this post


Link to post
Share on other sites
mis009

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 !

Share this post


Link to post
Share on other sites
headscript

Updated works now :)

Share this post


Link to post
Share on other sites
burnsyboo

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

Share this post


Link to post
Share on other sites
burnsyboo

 

 

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

Share this post


Link to post
Share on other sites
Swarm96

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
flarn2006

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?

Share this post


Link to post
Share on other sites
mis009

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

Share this post


Link to post
Share on other sites
headscript

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

Share this post


Link to post
Share on other sites
Freakyy

Why is the ASI file so large ?

3mb is a lot

Edited by Freakyy

Share this post


Link to post
Share on other sites
headscript

Why is the ASI file so large ?

3mb is a lot

because of wrapper code from the natives and lua engine itself

Share this post


Link to post
Share on other sites
Swarm96

 

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 :(

Share this post


Link to post
Share on other sites
Freakyy

 

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.

Share this post


Link to post
Share on other sites
headscript

 

 

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

Share this post


Link to post
Share on other sites
Freakyy

 

 

 

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.

Share this post


Link to post
Share on other sites
headscript

 

 

 

 

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

Share this post


Link to post
Share on other sites
Aleph-Zero

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.

Share this post


Link to post
Share on other sites
Freakyy

 

 

 

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

Share this post


Link to post
Share on other sites
KingDong

Im new to this stuff

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

Share this post


Link to post
Share on other sites
Anthony_y

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

Share this post


Link to post
Share on other sites
KingDong

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 3 Users Currently Viewing
    0 members, 0 Anonymous, 3 Guests

×
×
  • Create New...

Important Information

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