NeatSquid Posted May 10, 2015 Share Posted May 10, 2015   There is straight hierarchy for this , which excludes multiply script engines at all , for example  - c++ script engine --- c++ plugin (1) (i.e. carspawner.asi) --- .net wrapper built on top of the c++ plugin (2) (i.e. trainer.asi) ----- corresponding script for this wrapper (i.e. trainer.net -- as you can see corresponding file has the same name as the wrapper) --- the same .net wrapper built on top of the c++ plugin (3) (i.e. coolplugin.asi) ----- corresponding script for this wrapper (i.e. coolplugin.net -- same as above)  The goal is to make everything version independent and as much compatible as possible , the only thing that will be changing is the script engine on top of this hierarchy . If we are talking about .net then script developer publishes his script (coolplugin.net) in pair with the wrapper it was written for (coolplugin.asi) , so for the end user there is no difference between installing c++ plugin (carspawner.asi) and installing .net one (coolplugin.asi + coolplugin.net) , meanwhile wrapper developer shouldn't maintain backward compatibility for a scripts his wrapper is running .  So if someone will want to build .net/javascript/python script engine for GTA V the only thing he will need to do is to build a wrapper on top of the c++ plugin . Has anyone done a Python one yet?  a friend of me wants to do one but he just has not enough motivation  I'll give him motivation Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 12, 2015 Share Posted May 12, 2015 (edited) Just spent the past hour and a half (maybe longer) changing as many uppercase parameter names to lowercase, and also filling in the blanks to some obvious parameters. I corrected so many natives that I lost count! Â @Alexander Blade, could you possibly add support to NativeDB for Vector3 pointer parameters? Here's an example: Â void GET_MOBILE_PHONE_POSITION(Any p0) // 0xB2E1E1A0Shouldn't the declaration be:Â void GET_MOBILE_PHONE_POSITION(Vector3 *outPosition) // 0xB2E1E1A0? Edited May 12, 2015 by CarLuver69 LtFlash and Alexander Blade 2 Link to comment Share on other sites More sharing options...
Alexander Blade Posted May 12, 2015 Author Share Posted May 12, 2015 (edited) NATIVE DB is updated to support PC hashes , lots of stuff is rewritten , PC decompiled scripts published , lets test it ! Â CarLuver69 Check it now plz . Edited May 12, 2015 by Alexander Blade Chumillas, TotalCraftGames, BioBrain and 2 others 5 Link to comment Share on other sites More sharing options...
Chumillas Posted May 12, 2015 Share Posted May 12, 2015 NATIVE DB is updated to support PC hashes , lots of stuff is rewritten , PC decompiled scripts published , lets test it ! Â CarLuver69 Check it now plz . You THE MAN Lets do this Link to comment Share on other sites More sharing options...
BioBrain Posted May 12, 2015 Share Posted May 12, 2015 NATIVE DB is updated to support PC hashes , lots of stuff is rewritten , PC decompiled scripts published , lets test it ! Â CarLuver69 Check it now plz . Â Thanks a lot for the updates. Link to comment Share on other sites More sharing options...
TotalCraftGames Posted May 12, 2015 Share Posted May 12, 2015 NATIVE DB is updated to support PC hashes , lots of stuff is rewritten , PC decompiled scripts published , lets test it ! Â CarLuver69 Check it now plz . Thank you so much! Is it now possible to get or set fuel in cars for "Fuel HUD"? Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 12, 2015 Share Posted May 12, 2015 (edited) Great work! Â Sent you a PM about something very important, by the way. Edited May 12, 2015 by CarLuver69 Link to comment Share on other sites More sharing options...
sasuke78200 Posted May 12, 2015 Share Posted May 12, 2015 Decompiled sources are weird, for example I take a function. Â auto sub_182(auto _a0, auto _a1, auto _a2) Â Look at the prototype, parameters always start with an underscore ("_"), but when they're used inside the function, the underscore is after the "a". Â sub_1e0((a_0), (a_2), 0); Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 12, 2015 Share Posted May 12, 2015 (edited) The decompiled scripts are of terrible quality in general. I think "listener" should actually look at the output of his decompiled code before releasing anything... Edited May 12, 2015 by CarLuver69 Link to comment Share on other sites More sharing options...
listener Posted May 13, 2015 Share Posted May 13, 2015 The decompiled scripts are of terrible quality in general. I think "listener" should actually look at the output of his decompiled code before releasing anything... Â At this moment, it noting more than proof-of-concept. In the matter of fact, I haven't planned to release something. At least, until it can fully decompile scripts and compile them back. I don't know, when I'll get some spare time for the scripts. Maybe in 2016. Maybe never. Â Alexander had convinced me, that badly decompiled scripts is better than nothing. If he was wrong, ask him to remove link. Link2012, ThirteenAG, Silent and 2 others 5 Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 13, 2015 Share Posted May 13, 2015 Â The decompiled scripts are of terrible quality in general. I think "listener" should actually look at the output of his decompiled code before releasing anything... At this moment, it noting more than proof-of-concept. In the matter of fact, I haven't planned to release something. At least, until it can fully decompile scripts and compile them back. I don't know, when I'll get some spare time for the scripts. Maybe in 2016. Maybe never. Â Alexander had convinced me, that badly decompiled scripts is better than nothing. If he was wrong, ask him to remove link. Â I shouldn't have been so harsh in my wording. I think your decompiler has potential, and once I get my new rig, I'm going to be looking into making an awesome decompiler (since everything else is taken, lol). Â Are you going to provide any source code/documentation for scripts? Link to comment Share on other sites More sharing options...
sasuke78200 Posted May 13, 2015 Share Posted May 13, 2015 Â The decompiled scripts are of terrible quality in general. I think "listener" should actually look at the output of his decompiled code before releasing anything... Â At this moment, it noting more than proof-of-concept. In the matter of fact, I haven't planned to release something. At least, until it can fully decompile scripts and compile them back. I don't know, when I'll get some spare time for the scripts. Maybe in 2016. Maybe never. Â Alexander had convinced me, that badly decompiled scripts is better than nothing. If he was wrong, ask him to remove link. Â Â Â Which method are you using to decompile ? Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 13, 2015 Share Posted May 13, 2015 (edited) EDIT: The following rant was written under the assumption that my changes were lost forever. I now know that my changes still exist on an old db and have not been lost after all. Â So according to Alex, it's not worth reverting any changes to the NativeDB even though I spent 6 f*cking hours on hundreds of natives. 6 hours of fixing parameter names, figuring out unknown ones, adding easy to understand descriptions... Â What a f*cking joke. No apology or anything. "I'm not reverting anything". Â Don't waste your time on this guys. Your work isn't even appreciated. Edited May 13, 2015 by CarLuver69 Link to comment Share on other sites More sharing options...
Neuntoter Posted May 13, 2015 Share Posted May 13, 2015 So according to Alex, it's not worth reverting any changes to the NativeDB even though I spent 6 f*cking hours on hundreds of natives. 6 hours of fixing parameter names, figuring out unknown ones, adding easy to understand descriptions... Â What a f*cking joke. No apology or anything. "I'm not reverting anything". Â Don't waste your time on this guys. Your work isn't even appreciated. Reverting? You mean you edited them and he didn't accept the edits? Hope this is not true, else the thing is just worthless. If users can't make edits and improve the lack luster information which it provides then no reason for it to exist. Â Maybe there is a misunderstanding though. Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 13, 2015 Share Posted May 13, 2015 (edited) Well nevermind, the old db where I made my changes is still there. I though it was overidden, which is why I was freaking out. Edited May 13, 2015 by CarLuver69 Link to comment Share on other sites More sharing options...
bc7 Posted May 13, 2015 Share Posted May 13, 2015 The function PATHFIND::GET_CLOSEST_ROAD is not yet documented so I went trough the decompiled scripts and tested, and came up wit the following: BOOL GET_CLOSEST_ROAD(float X, float Y, float Z, float unknown1, int unknown2, float &X1, float &X2, float &Z, float &Y1, float &Y2, BOOL unknown3) // 132F52BBA570FE92 567B0E11 The X Y Z speaks for itself unknown1, 2 and 3 doesn't seems to affect anything at this moment. X1 and Y1 is the location of the first road lane, X2 and Y2 is the location of the second road lane. Z is used for both. Â In some cases this works and I get the expected results. But most of the time I get X1 as X1, X2 as Y1 or Y2, Y1 as X2 and the rest is 'garbage' data. Â for example: //e.g. playerLocation.x: 193.497, playerLocation.y: -1348.76, playerLocation.z: 29.3305PATHFIND::GET_CLOSEST_ROAD(playerLocation.x, playerLocation.y, playerLocation.z, 1.0f /*default: 1f*/, 1 /*default: 1*/, &roadX1, &roadX2, &roadZ, &roadY1, &roadY2, FALSE /*default: False*/);//output/*roadX1: 199.0roadY1: 195.25roadX2: -1351.75roadY2: 0roadZ: 2.9026e-045*///Expected output/*roadX1: 199.0roadY1: -1351.75roadX2: 195.25roadY2: ~-1350.75 (something like that)roadZ: ~29.3305*/ Any thoughts? XBLToothPik 1 Link to comment Share on other sites More sharing options...
Alexander Blade Posted May 13, 2015 Author Share Posted May 13, 2015 Check what it calls before , according to the original scripts you need to have valid node around . Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 13, 2015 Share Posted May 13, 2015 (edited) The "UNK_SC" namespace should be updated to "SOCIALCLUB". Edited May 13, 2015 by CarLuver69 Link to comment Share on other sites More sharing options...
filament Posted May 15, 2015 Share Posted May 15, 2015 Guys, I want to get the character ID so which API should I use? PLAYER_ID or PLAYER_PED_ID()? Is there an easier way to find the character that is currently playing as? I want to change my keyboard lighting when player switches character. Â Anyway what is PED? Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 15, 2015 Share Posted May 15, 2015 Guys, I want to get the character ID so which API should I use? PLAYER_ID or PLAYER_PED_ID()? Is there an easier way to find the character that is currently playing as? I want to change my keyboard lighting when player switches character. Â Anyway what is PED? Â Have you looked in the decompiled scripts how they are used? And PED is basically for all things related to characters/pedestrians. Link to comment Share on other sites More sharing options...
filament Posted May 15, 2015 Share Posted May 15, 2015 Â Guys, I want to get the character ID so which API should I use? PLAYER_ID or PLAYER_PED_ID()? Is there an easier way to find the character that is currently playing as? I want to change my keyboard lighting when player switches character. Â Anyway what is PED? Â Have you looked in the decompiled scripts how they are used? And PED is basically for all things related to characters/pedestrians. Â Yea I did use the NativeTrainer as reference. I tried PLAYER_ID and PLAYER_PED_ID both returns me inconsistent numbers. I thought there will be a fixed ID for characters. I also tried changing character use the NativeTrainer but still not getting what I want. Link to comment Share on other sites More sharing options...
Fireboyd78 Posted May 15, 2015 Share Posted May 15, 2015 You might have to resort to using the actual hashes of the character models. Link to comment Share on other sites More sharing options...
filament Posted May 15, 2015 Share Posted May 15, 2015 You might have to resort to using the actual hashes of the character models. Thanks for the advice Link to comment Share on other sites More sharing options...
SSJ2_Snake Posted May 15, 2015 Share Posted May 15, 2015 Guys, I want to get the character ID so which API should I use? PLAYER_ID or PLAYER_PED_ID()? Is there an easier way to find the character that is currently playing as? I want to change my keyboard lighting when player switches character. Â Anyway what is PED? Â Try PLAYER.GET_PLAYER_INDEX(), that seems to be what GTALua is using. Link to comment Share on other sites More sharing options...
diamond-optic Posted May 15, 2015 Share Posted May 15, 2015 did the return for GET_HASH_KEY change? Â like should it return Hash instead of int.. Â before while having unarmed selected ingame the values for these would be the same: Â GET_HASH_KEY("WEAPON_UNARMED")) GET_SELECTED_PED_WEAPON(PLAYER.PLAYER_PED_ID())) Â Old Output: Â get_hash: 2725352035 player_weap: 2725352035 Â but now im getting: Â get_hash: -1569615261 player_weap: 2725352035 Link to comment Share on other sites More sharing options...
Alexander Blade Posted May 15, 2015 Author Share Posted May 15, 2015 Function should return unsigned value , not int  did the return for GET_HASH_KEY change?like should it return Hash instead of int..before while having unarmed selected ingame the values for these would be the same:GET_HASH_KEY("WEAPON_UNARMED"))GET_SELECTED_PED_WEAPON(PLAYER.PLAYER_PED_ID()))Old Output:get_hash: 2725352035player_weap: 2725352035but now im getting:get_hash: -1569615261player_weap: 2725352035 Link to comment Share on other sites More sharing options...
jfmherokiller Posted May 15, 2015 Share Posted May 15, 2015 I have figured out 2 of the parameters to CHANGE_PLAYER_PED the first one is the output of PLAYER.GET_PLAYER_INDEX() and the second one is the id of the ped you wish to change to. here is my example code that works to change the ped natives.PLAYER.CHANGE_PLAYER_PED(natives.PLAYER.GET_PLAYER_INDEX(),ped.ID,false,false) sorry that it is in GTALua I just found it easier than writing test code that would require me to restart the game for every little edit. void PLAYER::CHANGE_PLAYER_PED(int playerindex, int PedId, BOOL p2, BOOL p3)--changes the Ped of the player to the one specified by PedId based upon what I have found I have updated the function. Link to comment Share on other sites More sharing options...
ThalonMook Posted May 15, 2015 Share Posted May 15, 2015 Hi I have found some issues in the native.h from the Script Hook SDK. I think they shoud be also updated in the GTAV NATIVE DB. Wrongstatic Any GET_PLAYER_RADIO_STATION_NAME() { return invoke<Any>(0xF6D733C32076AD03); }Rightstatic char* GET_PLAYER_RADIO_STATION_NAME() { return invoke<char*>(0xF6D733C32076AD03); }Wrongstatic Any GET_PLAYER_RADIO_STATION_NAME(Any p0) { return invoke<Any>(0xF6D733C32076AD03); }Rightstatic char* GET_PLAYER_RADIO_STATION_NAME(Any p0) { return invoke<char*>(0xF6D733C32076AD03); } Thx for all the work. Link to comment Share on other sites More sharing options...
c39687 Posted May 15, 2015 Share Posted May 15, 2015 (edited) Â Â The .net hook didn't call game natives directly (even though you could call them directly) and had many things preconfigured. Yes that is indeed easier to use but makes customization harder to achieve. Â The scripthook came with a development loader in which any asi/dll that was loaded could be unloaded and reloaded. Including the .net scripthook by the way. Which is another downside I mentioned before, it is another layer. Â Â Though I have never programmed in .NET (I'm fluent mainly in only C and C++), I personally noticed large performance hits when using others' .NET modifications. Â because they wrote sh*tty code... if the .net developer knows what he is doing, the user should notice no difference between an asi and .net dlls calling the same native functions & logic Edited May 15, 2015 by c39687 Link to comment Share on other sites More sharing options...
trama09 Posted May 16, 2015 Share Posted May 16, 2015 Is 1.49 the highest movement speed you can set? Â I tried setting PLAYER::_SET_SWIM_SPEED_MULTIPLIER(player, 2.0); but it doesn't seem to take. I tried 2.0f too. Â Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now