CapYoAzz Posted May 14, 2015 Share Posted May 14, 2015 Thanks for the update. Can basemodule.lua be deleted like exampleGUI.lua or is it needed for functionality? Link to comment Share on other sites More sharing options...
Szabo Posted May 14, 2015 Share Posted May 14, 2015 (edited) v10.0 Auto-builds every 10 min? That's a killer one headscript! Thank you! Edited May 14, 2015 by Szabo Link to comment Share on other sites More sharing options...
Chumillas Posted May 14, 2015 Share Posted May 14, 2015 v10.0 Auto-builds every 10 min? That's a killer one headscript! Thank you! Yeah, nativedb updates each 10mins Link to comment Share on other sites More sharing options...
Mahir007 Posted May 14, 2015 Share Posted May 14, 2015 Just a quick question.What's up with the new files added in this version that weren't in 9.0? I'm talking about the following files inside the scripts folder: keys.lua utils.lua Also inside the addins folder there's: basemodule.lua exampleGUI.lua I already deleted the example gui thing but I'm not sure about the basemodule file, is it important? Link to comment Share on other sites More sharing options...
diamond-optic Posted May 14, 2015 Share Posted May 14, 2015 (edited) anyone know how to get how much ammo is in a weapons clip? trying GET_AMMO_IN_CLIP, and going by http://www.gtamodding.com/wiki/GET_AMMO_IN_CLIP the 3rd param should be a variable for it to save the amount of ammo to, but when using the native its saying the 3rd param has to be a number and not an empty variable *edit* ughh maybe that native description is wrong, just noticed it says its from gta iv even tho i was brought to that page from the gta v native listing and the gta v entry from the nativedb isnt very helpful when it comes to figuring out how to get an actual clip ammo value: BOOL GET_AMMO_IN_CLIP(Ped Handle, Hash WeaponHash, Any *p2) Edited May 14, 2015 by diamond-optic Link to comment Share on other sites More sharing options...
flynhigh09 Posted May 14, 2015 Share Posted May 14, 2015 (edited) GET_AMMO_IN_CLIP(Pedid, WeaponHash, true); anyone know how to get how much ammo is in a weapons clip? trying GET_AMMO_IN_CLIP, and going by http://www.gtamodding.com/wiki/GET_AMMO_IN_CLIP the 3rd param should be a variable for it to save the amount of ammo to, but when using the native its saying the 3rd param has to be a number and not an empty variable *edit* ughh maybe that native description is wrong, just noticed it says its from gta iv even tho i was brought to that page from the gta v native listing and the gta v entry from the nativedb isnt very helpful when it comes to figuring out how to get an actual clip ammo value: BOOL GET_AMMO_IN_CLIP(Ped Handle, Hash WeaponHash, Any *p2) Edited May 14, 2015 by flynhigh09 Link to comment Share on other sites More sharing options...
diamond-optic Posted May 14, 2015 Share Posted May 14, 2015 (edited) GET_AMMO_IN_CLIP(Pedid, WeaponHash, true); error in function 'GET_AMMO_IN_CLIP'. argument #3 is 'boolean'; 'number' expected. *edit* ..but i did just now notice v10 of this is out.. installed it, and basically my entire script is now broken lol.. so I guess its more important for me to figure out why its not working anymore :-\ hmm lol *edit 2* i think i see what my problem is now.. im not getting the same hashes I was with the previous version.... before these would give the same hash, now they are different... -- have UNARMED selected print("get_hash: ".. GAMEPLAY.GET_HASH_KEY("WEAPON_UNARMED")) print("player_weap: ".. WEAPON.GET_SELECTED_PED_WEAPON(PLAYER.PLAYER_PED_ID()))console output: get_hash: -1569615261 player_weap: 2725352035 *edit 4* using the old version: get_hash: 2725352035 player_weap: 2725352035 Edited May 15, 2015 by diamond-optic Link to comment Share on other sites More sharing options...
headscript Posted May 15, 2015 Author Share Posted May 15, 2015 (edited) GET_AMMO_IN_CLIP(Pedid, WeaponHash, true); error in function 'GET_AMMO_IN_CLIP'. argument #3 is 'boolean'; 'number' expected. *edit* ..but i did just now notice v10 of this is out.. installed it, and basically my entire script is now broken lol.. so I guess its more important for me to figure out why its not working anymore :-\ hmm lol *edit 2* i think i see what my problem is now.. im not getting the same hashes I was with the previous version.... before these would give the same hash, now they are different... -- have UNARMED selected print("get_hash: ".. GAMEPLAY.GET_HASH_KEY("WEAPON_UNARMED")) print("player_weap: ".. WEAPON.GET_SELECTED_PED_WEAPON(PLAYER.PLAYER_PED_ID()))console output: get_hash: -1569615261 player_weap: 2725352035 *edit 4* using the old version: get_hash: 2725352035 player_weap: 2725352035 not my fault on nativedb GET_HASH_KEY(char *ToHash) returns a int instead of a Hash change it there and wait 10-20 min for the next version on github Edited May 15, 2015 by headscript Link to comment Share on other sites More sharing options...
Chumillas Posted May 15, 2015 Share Posted May 15, 2015 Just a quick question. What's up with the new files added in this version that weren't in 9.0? I'm talking about the following files inside the scripts folder: keys.lua utils.lua Also inside the addins folder there's: basemodule.lua exampleGUI.lua I already deleted the example gui thing but I'm not sure about the basemodule file, is it important? Keys.lua & Utils.lua is a split of main.lua to keep it more organized. You can remove both basemodule.lua and exampleGUI.lua Link to comment Share on other sites More sharing options...
diamond-optic Posted May 15, 2015 Share Posted May 15, 2015 (edited) changing the return from int to Hash for the GET_HASH_KEY fixed the issue I was having earliar, on to the next one now lol but.. did the natives get like.. messed up or something? because now im also finding that: local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 0.0, 0.0, 0.0) print("x: ", playerPosition.x) print("y: ", playerPosition.y) print("z: ", playerPosition.z)outputs the same coords as: local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 10.0, 5.0, 0.5) print("x: ", playerPosition.x) print("y: ", playerPosition.y) print("z: ", playerPosition.z)..like its not doing anything with the offset values anymore *edit* GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS is working now after changing the coord params from int to float ..what happened to all this stuff that was working fine before? Edited May 15, 2015 by diamond-optic Link to comment Share on other sites More sharing options...
headscript Posted May 15, 2015 Author Share Posted May 15, 2015 changing the return from int to Hash for the GET_HASH_KEY fixed the issue I was having earliar, on to the next one now lol but.. did the natives get like.. messed up or something? because now im also finding that: local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 0.0, 0.0, 0.0) print("x: ", playerPosition.x) print("y: ", playerPosition.y) print("z: ", playerPosition.z)outputs the same coords as: local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 10.0, 5.0, 0.5) print("x: ", playerPosition.x) print("y: ", playerPosition.y) print("z: ", playerPosition.z)..like its not doing anything with the offset values anymore *edit* GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS is working now after changing the coord params from int to float ..what happened to all this stuff that was working fine before? well i hate made many changes myself in my private natives.h to fix some of those issues and on nativedb they were changed to it before the update but the update didnt only changed the hashes it also reverted the argument and return types Link to comment Share on other sites More sharing options...
Neutrinobeam Posted May 15, 2015 Share Posted May 15, 2015 Headscript, are you who I should talk to about getting Mod Menu https://www.gta5-mods.com/scripts/mod-menu-no-more-hotkeys compatible with the lua plugin? Link to comment Share on other sites More sharing options...
Kosdemo Posted May 15, 2015 Share Posted May 15, 2015 The SDK file works however the Lua.ASI does not. I don't want the file updated every 10 mins. Link to comment Share on other sites More sharing options...
Kosdemo Posted May 15, 2015 Share Posted May 15, 2015 Anyone have the lua plugin for 9.0 for download? I was stupid and didn't back up but replaced my lua with this update and want to roll back. Link to comment Share on other sites More sharing options...
headscript Posted May 15, 2015 Author Share Posted May 15, 2015 Anyone have the lua plugin for 9.0 for download? I was stupid and didn't back up but replaced my lua with this update and want to roll back. whats wrong with it? The SDK file works however the Lua.ASI does not. I don't want the file updated every 10 mins. how does it not work? and why dont u want it to be rebuild every 10 mins? Link to comment Share on other sites More sharing options...
xToK3x Posted May 16, 2015 Share Posted May 16, 2015 (edited) Can anyone tell me why is says nil value for get_frame_count? I am very new to this and tried to test my first easy lua file to learn from, I obviously am doing something wrong, but what? local FPSCounter = {}local FPS = 30function FPSCounter.init() wait(0) FPSCounter.FPS = GAMEPLAY.GET_FRAME_COUNT() FPSUI.SET_TEXT_FONT(0) FPSUI.SET_TEXT_PROPORTIONAL(1) FPSUI.SET_TEXT_SCALE(0.0, 0.35) FPSUI.SET_TEXT_COLOUR(255, 255, 255, 255) FPSUI.SET_TEXT_DROPSHADOW(0, 0, 0, 0,255) FPSUI.SET_TEXT_EDGE(1, 0, 0, 0, 255) FPSUI.SET_TEXT_DROP_SHADOW() FPSUI.SET_TEXT_OUTLINE() FPSUI._SET_TEXT_ENTRY("STRING") FPSUI._ADD_TEXT_COMPONENT_STRING(FPSCounter.FPS) FPSUI._DRAW_TEXT(0.05, 0.05)endreturn FPSCounter Edited May 16, 2015 by xToK3x Link to comment Share on other sites More sharing options...
alfonsouchiha Posted May 16, 2015 Share Posted May 16, 2015 is it possible to install this LUA Plugin side-by-side with the GTALua? Because some mods need this plugin, the other need GTALua please answer Link to comment Share on other sites More sharing options...
Freakyy Posted May 16, 2015 Share Posted May 16, 2015 is it possible to install this LUA Plugin side-by-side with the GTALua? Because some mods need this plugin, the other need GTALua please answer Yes, it's possible. But make sure you dont put GTALua addons into this addons folder and the other way around Link to comment Share on other sites More sharing options...
Tazzilo Posted May 16, 2015 Share Posted May 16, 2015 What key is it to reload the files? it used to be F3 but i think he changed it ctrl + R nvm that doesnt work do you use the sdk? No Reload don't work for me too even with the SDK version. Link to comment Share on other sites More sharing options...
diamond-optic Posted May 16, 2015 Share Posted May 16, 2015 (edited) Reload don't work for me too even with the SDK version. do you have the game paused or something? reload only works while not in the menu/loading screen/paused Edited May 16, 2015 by diamond-optic Link to comment Share on other sites More sharing options...
Winroo Posted May 16, 2015 Share Posted May 16, 2015 (edited) I can't get this work. Please help me Edited May 16, 2015 by Winroo Link to comment Share on other sites More sharing options...
H1Vltg3 Posted May 16, 2015 Share Posted May 16, 2015 (edited) I'm having an issue swapping the player skin, causing Script Hook/LUA to crash. I can spawn any ped just fine, but when I try to swap the player skin, I get an error and the game crashes. With this code, the game doesn't crash, but the player skin doesn't swap either: local player = PLAYER.PLAYER_ID()local playerPed = PLAYER.PLAYER_PED_ID()local ImpoSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_imporage");ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true); if(CONTROLS.IS_CONTROL_PRESSED(x,x))then STREAMING.REQUEST_MODEL(ImpoSkinID); PLAYER.SET_PLAYER_MODEL(playerPed, ImpoSkinID); AI.TASK_SKY_DIVE(playerPed); ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true); With this code, the game crashes: local player = PLAYER.PLAYER_ID()local playerPed = PLAYER.PLAYER_PED_ID()local ImpoSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_imporage");ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true); if(CONTROLS.IS_CONTROL_PRESSED(x,x))then STREAMING.REQUEST_MODEL(ImpoSkinID); PLAYER.SET_PLAYER_MODEL(player, ImpoSkinID); AI.TASK_SKY_DIVE(playerPed); ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true); The only thing I change is playerPed to player in PLAYER.SET_PLAYER_MODEL. I've tried all combinations, this is how scripthook itself does it, or am I missing something? Ignore the button push line, I removed the variables for display here. Edit: I added the following checks and it spawned him, but now it's crashing again after a restart: STREAMING.IS_MODEL_IN_CDIMAGE(ImpoSkinID) and STREAMING.IS_MODEL_VALID(ImpoSkinID) Edit2: Seems to be a LUA issue, if I start the game with the following code, it crashes when I press the button for spawning: if CONTROLS.IS_CONTROL_PRESSED(x,x) and CONTROLS.IS_CONTROL_PRESSED(x,x) and STREAMING.IS_MODEL_IN_CDIMAGE(ImpoSkinID) and STREAMING.IS_MODEL_VALID(ImpoSkinID) then STREAMING.REQUEST_MODEL(ImpoSkinID); PLAYER.SET_PLAYER_MODEL(player, ImpoSkinID); However, if I start the game with this code, then change the playerPed variable to player and reload the scripts using Ctrl+R, it works fine. if CONTROLS.IS_CONTROL_PRESSED(x,x) and CONTROLS.IS_CONTROL_PRESSED(x,x) and STREAMING.IS_MODEL_IN_CDIMAGE(ImpoSkinID) and STREAMING.IS_MODEL_VALID(ImpoSkinID) then STREAMING.REQUEST_MODEL(ImpoSkinID); PLAYER.SET_PLAYER_MODEL(playerPed, ImpoSkinID);**Change PLAYER.SET_PLAYER_MODEL(playerPed, ImpoSkinID); to PLAYER.SET_PLAYER_MODEL(player, ImpoSkinID); then reload scripts, works fine Edit3: STREAMING.REQUEST_MODEL(ImpoSkinID); has to be declared before the button is pressed, works now with the following: function ImpotentRage.tick() local player = PLAYER.PLAYER_ID() local playerPed = PLAYER.PLAYER_PED_ID() local ImpoSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_imporage"); STREAMING.REQUEST_MODEL(ImpoSkinID); ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true); if CONTROLS.IS_CONTROL_PRESSED(x,x) and CONTROLS.IS_CONTROL_PRESSED(x,x) and STREAMING.IS_MODEL_IN_CDIMAGE(ImpoSkinID) and STREAMING.IS_MODEL_VALID(ImpoSkinID) then keypress0=true PLAYER.SET_PLAYER_MODEL(player, ImpoSkinID); ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true); Edited May 16, 2015 by H1Vltg3 Link to comment Share on other sites More sharing options...
Kosdemo Posted May 16, 2015 Share Posted May 16, 2015 Anyone have the lua plugin for 9.0 for download? I was stupid and didn't back up but replaced my lua with this update and want to roll back. whats wrong with it? The SDK file works however the Lua.ASI does not. I don't want the file updated every 10 mins. how does it not work? and why dont u want it to be rebuild every 10 mins? None of my lua scripted plugins work with this version of the injector as of last evening. The SDK loaded fine, but the normal asi did not load the lua scripts at all. The GUI was not appearing. I do not want the script injector to rebuild every 10 mins because entire mods are created based on predictable code. If this code can change every ten mins with updates to a website then all mods will become unstable with this version. This will prove much more useful as time goes by but at present, mod development is still in its infancy, which means significant changes are still to come to. Link to comment Share on other sites More sharing options...
kasakka Posted May 17, 2015 Share Posted May 17, 2015 Anyone have the lua plugin for 9.0 for download? I was stupid and didn't back up but replaced my lua with this update and want to roll back. whats wrong with it? The SDK file works however the Lua.ASI does not. I don't want the file updated every 10 mins. how does it not work? and why dont u want it to be rebuild every 10 mins? None of my lua scripted plugins work with this version of the injector as of last evening. The SDK loaded fine, but the normal asi did not load the lua scripts at all. The GUI was not appearing. I do not want the script injector to rebuild every 10 mins because entire mods are created based on predictable code. If this code can change every ten mins with updates to a website then all mods will become unstable with this version. This will prove much more useful as time goes by but at present, mod development is still in its infancy, which means significant changes are still to come to. I agree. Plus I can't think that rebuilding every 10 mins is good for performance either. Any errors will also cause issues. I guess you want to reduce maintenance but being able to just manually trigger the update (for example on game start) should the developer wish to do so would be best. The non-SDK LUA.asi should not update. Link to comment Share on other sites More sharing options...
headscript Posted May 17, 2015 Author Share Posted May 17, 2015 (edited) Anyone have the lua plugin for 9.0 for download? I was stupid and didn't back up but replaced my lua with this update and want to roll back. whats wrong with it? The SDK file works however the Lua.ASI does not. I don't want the file updated every 10 mins. how does it not work? and why dont u want it to be rebuild every 10 mins? None of my lua scripted plugins work with this version of the injector as of last evening. The SDK loaded fine, but the normal asi did not load the lua scripts at all. The GUI was not appearing. I do not want the script injector to rebuild every 10 mins because entire mods are created based on predictable code. If this code can change every ten mins with updates to a website then all mods will become unstable with this version. This will prove much more useful as time goes by but at present, mod development is still in its infancy, which means significant changes are still to come to. I agree. Plus I can't think that rebuilding every 10 mins is good for performance either. Any errors will also cause issues. I guess you want to reduce maintenance but being able to just manually trigger the update (for example on game start) should the developer wish to do so would be best. The non-SDK LUA.asi should not update. it has nothing to do with performance, also it only updates when u download the new version from github else u still have the version The non-SDK LUA.asi should not update. it doesnt anyways Anyone have the lua plugin for 9.0 for download? I was stupid and didn't back up but replaced my lua with this update and want to roll back. whats wrong with it? The SDK file works however the Lua.ASI does not. I don't want the file updated every 10 mins. how does it not work? and why dont u want it to be rebuild every 10 mins? None of my lua scripted plugins work with this version of the injector as of last evening. The SDK loaded fine, but the normal asi did not load the lua scripts at all. The GUI was not appearing. I do not want the script injector to rebuild every 10 mins because entire mods are created based on predictable code. If this code can change every ten mins with updates to a website then all mods will become unstable with this version. This will prove much more useful as time goes by but at present, mod development is still in its infancy, which means significant changes are still to come to. did u tried if it works with the lua.asi in the sdk? Edit: revert to v9 Edited May 17, 2015 by headscript Link to comment Share on other sites More sharing options...
diamond-optic Posted May 17, 2015 Share Posted May 17, 2015 (edited) the whole nativedb setup is starting to annoy me lol.. I spend hours going through the game scripts and debugging natives just to have any edits i make reverted within a few hours. Even things that are obviously right when checking the native usage in the game scripts, such as native returns being int's yet they keep getting changed back to bool's in the nativedb. Pretty much dont even want to bother trying to fix things in it anymore ..but at the same time, i dont know if someone else is reverting the changes, or if theres some sort of automation involved that's resetting things too bad there isnt anything like edit time/user/reason info with the db Edited May 17, 2015 by diamond-optic Link to comment Share on other sites More sharing options...
vitalik2187836 Posted May 17, 2015 Share Posted May 17, 2015 Hey, headscript, can you add ability to reload scipts in non sdk version? Cos sdk version dont work fine for me. Idk why(. And also i hate console ^^ Link to comment Share on other sites More sharing options...
diamond-optic Posted May 17, 2015 Share Posted May 17, 2015 (edited) you should probably just dump v10 and recompile it as v11 (or at least like v10.1 or something to make it different) to get past the issue with some people having a v10 copy that has messed up natives Because using the non-sdk v10 from your website causes both of my released scripts to not work, so I have to tell people now to get the non-sdk version from the github master instead... which will probably lead to confusion among some people (if they even notice that i said to use the github version instead to begin with lol) ..it would just be easier to tell people that my scripts require v11+ instead *edit* also, is there any way to tell which LUA.asi (or LUA_SDK.asi) version you have installed? And if not, would there be some way to add something like this? Even maybe a variable or some such that you can call in a script to check the version, which other then being able to see which version you have installed, it could be useful to make your script require at least a specific version or something that might have fixed natives you are using in the script (or maybe at least warn the user to update). Edited May 17, 2015 by diamond-optic vithepunisher and Chumillas 2 Link to comment Share on other sites More sharing options...
carcols.dat Posted May 17, 2015 Share Posted May 17, 2015 Hey, headscript, can you add ability to reload scipts in non sdk version? Cos sdk version dont work fine for me. Idk why(. And also i hate console ^^ Seconding this. I don't have any issues but there really needs to be a reload function, and a per-script reload. Link to comment Share on other sites More sharing options...
XXCrimsonXX Posted May 18, 2015 Share Posted May 18, 2015 Um everytime I install this I'm getting an error depicting that both of the lua.asi files have failed to load, why?? Link to comment Share on other sites More sharing options...