julionib Posted April 30, 2015 Share Posted April 30, 2015 (edited) i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Any* pedsAround = new Any[102];pedsAround[0] = 50;int pedCount = PED::GET_PED_NEARBY_PEDS(playerPed, pedsAround, -1);for (int c = 0; c < pedCount; c++){... but i was unable to find the correct types to use in the parameters Edited April 30, 2015 by julionib Link to comment Share on other sites More sharing options...
unknown modder Posted April 30, 2015 Share Posted April 30, 2015 can you add Any NETWORK_GET_PLAYER_INDEX(Ped PedHandle) // 0xBE1C1506 this is not designed for online. i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Any* pedsAround = new Any[102];pedsAround[0] = 50;int pedCount = PED::GET_PED_NEARBY_PEDS(playerPed, pedsAround, -1);for (int c = 0; c < pedCount; c++){...but i was unable to find the correct types to use in the parameterspass the pointer to pedcount[0]Don't think you can do that in c#. I use peds as an int Link to comment Share on other sites More sharing options...
crosire Posted April 30, 2015 Author Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Good that you mentioned that. Wrote two functions, World.GetNearbyPeds and World.GetNearbyVehicles, but can't test them because of the recent GTA update, guess we need to wait for an update to the C++ Script Hook. Link to comment Share on other sites More sharing options...
odiomoratti Posted April 30, 2015 Share Posted April 30, 2015 Thank you and Blade.... For now i'll just wait a more stable/complete version.....but it's great to see these tools already out. Link to comment Share on other sites More sharing options...
identitymatrix Posted April 30, 2015 Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Good that you mentioned that. Wrote two functions, World.GetNearbyPeds and World.GetNearbyVehicles, but can't test them because of the recent GTA update, guess we need to wait for an update to the C++ Script Hook. This auto patching is gonna get really tedious (thanks r*). It's probably going to break the scripthook everytime. Regardless of people say, I think we need to modify the patching system so it is manual only. mis009 1 Link to comment Share on other sites More sharing options...
unknown modder Posted April 30, 2015 Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Good that you mentioned that. Wrote two functions, World.GetNearbyPeds and World.GetNearbyVehicles, but can't test them because of the recent GTA update, guess we need to wait for an update to the C++ Script Hook.the ultimate solution would be to actually get the vehicles and peds pool in memory, but with a new patch every week no point getting yet Link to comment Share on other sites More sharing options...
crosire Posted April 30, 2015 Author Share Posted April 30, 2015 the ultimate solution would be to actually get the vehicles and peds pool in memory, but with a new patch every week no point getting yet Yeah, GTAIV Script Hook did it, cannot get faster than that. But as you said, very likely it wouldn't live long. Link to comment Share on other sites More sharing options...
identitymatrix Posted April 30, 2015 Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Good that you mentioned that. Wrote two functions, World.GetNearbyPeds and World.GetNearbyVehicles, but can't test them because of the recent GTA update, guess we need to wait for an update to the C++ Script Hook. Someone uploaded the files that rockstar updated the hashes to https://mega.co.nz/#F!q88RwL5I!Rk136GJGXNNAo2bAtKiAYQ If you replace your files with these, you can continue your scripthook.net development and testing. Chris S 1 Link to comment Share on other sites More sharing options...
unknown modder Posted April 30, 2015 Share Posted April 30, 2015 (edited) i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Good that you mentioned that. Wrote two functions, World.GetNearbyPeds and World.GetNearbyVehicles, but can't test them because of the recent GTA update, guess we need to wait for an update to the C++ Script Hook. Someone uploaded the files that rockstar updated the hashes to https://mega.co.nz/#F!q88RwL5I!Rk136GJGXNNAo2bAtKiAYQ If you replace your files with these, you can continue your scripthook.net development and testing.is that just the gtavexe launcher and update. Not exactly a good solution Edited April 30, 2015 by unknown modder Link to comment Share on other sites More sharing options...
monsterxsync Posted April 30, 2015 Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? In c++ scripthookv we can do the following: Good that you mentioned that. Wrote two functions, World.GetNearbyPeds and World.GetNearbyVehicles, but can't test them because of the recent GTA update, guess we need to wait for an update to the C++ Script Hook. Someone uploaded the files that rockstar updated the hashes to https://mega.co.nz/#F!q88RwL5I!Rk136GJGXNNAo2bAtKiAYQ If you replace your files with these, you can continue your scripthook.net development and testing. is that just the gtavexe launcher and update. Not exactly a good solution that's what it looks to be not a great solution but i guess if you wanna mod single player its alright..? Link to comment Share on other sites More sharing options...
crosire Posted April 30, 2015 Author Share Posted April 30, 2015 (edited) Now that you said that: I remembered I had another installation of GTA V on a second computer which was still on the old version, so was able to grab the files from there (I prefer not to download files from random sources if possible) and can continue working now, thanks a lot =). Edited April 30, 2015 by Crosire identitymatrix 1 Link to comment Share on other sites More sharing options...
crosire Posted April 30, 2015 Author Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? There you go: https://github.com/crosire/scripthookvdotnet/commit/f9b663750e8436ee41d04016210fcfd22c587abf. Link to comment Share on other sites More sharing options...
monsterxsync Posted April 30, 2015 Share Posted April 30, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? There you go: https://github.com/crosire/scripthookvdotnet/commit/f9b663750e8436ee41d04016210fcfd22c587abf. Thanks for this! just what i was looking for Link to comment Share on other sites More sharing options...
timnboys Posted April 30, 2015 Share Posted April 30, 2015 (edited) is there anyway to teleport? like for example off of the mountain to your safehouse or police station? Edited April 30, 2015 by timnboys Link to comment Share on other sites More sharing options...
unknown modder Posted April 30, 2015 Share Posted April 30, 2015 is there anyway to teleport? like for example off of the mountain to your safehouse or police station? game.player.character.position = Vector3(x,y,z); x y z being the coordinates of where you want to teleport to Link to comment Share on other sites More sharing options...
c39687 Posted May 1, 2015 Share Posted May 1, 2015 This is f*cking awesome! I didn't expected .NET would be possible for GTAV. Lets re-live the GTAIV days again! well it is practically the same game and why wouldnt it be if it was done in iv Cyron43 1 Link to comment Share on other sites More sharing options...
Rugz007 Posted May 1, 2015 Share Posted May 1, 2015 Umm..can we modify the players Money? (Add or subtract) becoz I didn't found a native Link to comment Share on other sites More sharing options...
xsploit Posted May 1, 2015 Share Posted May 1, 2015 i dont know if this was asked here before but its possible list the peds/vehicles from game? There you go: https://github.com/crosire/scripthookvdotnet/commit/f9b663750e8436ee41d04016210fcfd22c587abf. so how would i use this in vb.net? Link to comment Share on other sites More sharing options...
crosire Posted May 1, 2015 Author Share Posted May 1, 2015 Umm..can we modify the players Money? (Add or subtract) becoz I didn't found a native Haven't found one either, maybe it's modified via "STAT_SET_XXX" and "STAT_GET_XXX", but haven't tried. You can edit the money a ped is carrying though, use "Ped.Money" for that. =) so how would i use this in vb.net? First download the latest source code from Github and build it, copy the new ASI to your game and then do something like this in your script: Imports GTA...Dim peds As Ped() = World.GetNearbyPeds(Game.Player.Character, 1000F) Chris S 1 Link to comment Share on other sites More sharing options...
Nada 4K Posted May 1, 2015 Share Posted May 1, 2015 (edited) I'm searching Native function like on the old "ScriptHookDotNet.dll" (Grand Theft Auto IV/ Episodes from Liberty City) for Grand Theft Auto V City but I can't found it in source Native on Alexander Blade site or GTAModding website's. Here's code on the old "ScriptHookDotNet.dll": Game.GetWaypoint Thanks for your reply! Edited May 1, 2015 by Nada_4D Link to comment Share on other sites More sharing options...
identitymatrix Posted May 1, 2015 Share Posted May 1, 2015 Is this .net wrapping basicly contructing classes with methods that run purley native functions? Or is it something more? The code in model.cpp looks like I imagned. Untill you get to vectors, matrix, rotation, anything that uses slimdx..... bool Model::IsBoat::get() { return Native::Function::Call<bool>(Native::Hash::IS_THIS_MODEL_A_BOAT, this->mHash); } bool Model::IsCar::get() { return Native::Function::Call<bool>(Native::Hash::IS_THIS_MODEL_A_CAR, this->mHash); } bool Model::IsHelicopter::get() { return Native::Function::Call<bool>(Native::Hash::IS_THIS_MODEL_A_HELI, this->mHash); } bool Model::IsPed::get() { return IsValid && !IsVehicle; } bool Model::IsPlane::get() { return Native::Function::Call<bool>(Native::Hash::IS_THIS_MODEL_A_PLANE, this->mHash); } Link to comment Share on other sites More sharing options...
unknown modder Posted May 1, 2015 Share Posted May 1, 2015 I'm searching Native function like on the old "ScriptHookDotNet.dll" (Grand Theft Auto IV/ Episodes from Liberty City) for Grand Theft Auto V City but I can't found it in source Native on Alexander Blade site or GTAModding website's. Here's code on the old "ScriptHookDotNet.dll": Game.GetWaypoint Thanks for your reply! something like this? bool Game::IsWaypointActive::get() { return Natives::IS_WAYPOINT_ACTIVE() != 0; } Blip ^Game::Waypoint::get() { return gcnew Blip(Natives::GET_FIRST_BLIP_INFO_ID(Natives::_GET_BLIP_INFO_ID_ITERATOR())); } Link to comment Share on other sites More sharing options...
Nada 4K Posted May 1, 2015 Share Posted May 1, 2015 (edited) 'Source code : Nada 4D Public Sub Hiip_hôp() If ON_or_OFF Then Dot = Game.GetWaypoint If Not Exists(Dot) Then msg("You must place the way point ! ( ~BLIP_8~ )", 1000) End If If Exists(Dot) Then Dim Vector As GTA.Vector3 = New GTA.Vector3() Vector = Dot.Position() If Not Game.LocalPlayer.Character.isInVehicle Then World.LoadEnvironmentNow(Dot.Position) Game.LoadAllPathNodes = True Game.LocalPlayer.Character.Position = Dot.Position.ToGround End If If Game.LocalPlayer.Character.isInVehicle Then If Game.LocalPlayer = Game.LocalPlayer.Character.CurrentVehicle.GetPedOnSeat(VehicleSeat.Driver) Then World.LoadEnvironmentNow(Dot.Position) Game.LoadAllPathNodes = True Game.LocalPlayer.Character.Position = Dot.Position.ToGround End If If Not Game.LocalPlayer = Game.LocalPlayer.Character.CurrentVehicle.GetPedOnSeat(VehicleSeat.Driver) Then msg("You must be the driver !", 1000) End If End If End If End If End Sub Hi, thanks for your reply. Here's my old code for Grand Theft Auto IV/ Episodes from Liberty City. I Wonder if we can set the way point on the map and teleport on the same way point in Grand Theft Auto V. I can't try these Native you shared here because we can't continue in our project on .Net at the moment whitout the new "ScriptHookV.dll"... I hope we can get new version soon of "ScriptHookVDotNet.dll" when Alexander Blade will update his "ScriptHookV.dll"! Edited May 1, 2015 by Nada_4D Link to comment Share on other sites More sharing options...
Raxdiam Posted May 1, 2015 Share Posted May 1, 2015 (edited) Umm..can we modify the players Money? (Add or subtract) becoz I didn't found a native There is a way to add money by using STAT_GET_INT and STAT_SET_INT, which is used in Alexander Blade's native trainer. Here's my translated code: void AddCash(int amount){ for (int i = 0; i < 3; i++) { string statNameFull = string.Format("SP{0}_TOTAL_CASH", i); int hash = Function.Call<int>(Hash.GET_HASH_KEY, statNameFull); int val = 0; OutputArgument outArg = new OutputArgument(); Function.Call<bool>(Hash.STAT_GET_INT, hash, outArg, -1); val = outArg.GetResult<int>() + amount; Function.Call(Hash.STAT_SET_INT, hash, val, true); }} I tested it a little, and it seems to work just fine. Edited May 1, 2015 by Raxdiam Link to comment Share on other sites More sharing options...
timnboys Posted May 1, 2015 Share Posted May 1, 2015 is there anyway to teleport? like for example off of the mountain to your safehouse or police station? game.player.character.position = Vector3(x,y,z); x y z being the coordinates of where you want to teleport to okay but could someone give me example code in vb.net due to I don't know what x,y,z I am supposed to put to teleport the player(me) to whichever character I am using and also to the police station. you know basically if they go to safehouse teleport them to the right safehouse for the character and also it would help if someone could tell me how to change the playerped back to the story character after changing the model to cop model. Link to comment Share on other sites More sharing options...
Raxdiam Posted May 1, 2015 Share Posted May 1, 2015 (edited) is there anyway to teleport? like for example off of the mountain to your safehouse or police station? game.player.character.position = Vector3(x,y,z); x y z being the coordinates of where you want to teleport to okay but could someone give me example code in vb.net due to I don't know what x,y,z I am supposed to put to teleport the player(me) to whichever character I am using and also to the police station. you know basically if they go to safehouse teleport them to the right safehouse for the character and also it would help if someone could tell me how to change the playerped back to the story character after changing the model to cop model. Dim loc As New Vector3(-1336F, -3044F, 13.9F)Game.Player.Character.Position = loc 'Airport Field Edited May 1, 2015 by Raxdiam Link to comment Share on other sites More sharing options...
xsploit Posted May 1, 2015 Share Posted May 1, 2015 (edited) Umm..can we modify the players Money? (Add or subtract) becoz I didn't found a native Haven't found one either, maybe it's modified via "STAT_SET_XXX" and "STAT_GET_XXX", but haven't tried. You can edit the money a ped is carrying though, use "Ped.Money" for that. =) so how would i use this in vb.net? First download the latest source code from Github and build it, copy the new ASI to your game and then do something like this in your script: Imports GTA...Dim peds As Ped() = World.GetNearbyPeds(Game.Player.Character, 1000F) Thank-you, tried compiling before and i was missing nativecaller.h or maybe cpp Edited May 2, 2015 by xsploit Link to comment Share on other sites More sharing options...
crosire Posted May 2, 2015 Author Share Posted May 2, 2015 Thank-you, itried compiling before and i was kjssing nativecaller.h or maybe cpp You need the Script Hook V SDK, as explained in the readme. Link to comment Share on other sites More sharing options...
timnboys Posted May 2, 2015 Share Posted May 2, 2015 Would Anyone mind please help me out by giving me michael's and trevor's and also franklin's ped hashes to change their ped model back? because when I run it off of compiled code off of the github it says conversion to string to integer isn't valid. Link to comment Share on other sites More sharing options...
wozzy Posted May 2, 2015 Share Posted May 2, 2015 Would Anyone mind please help me out by giving me michael's and trevor's and also franklin's ped hashes to change their ped model back? because when I run it off of compiled code off of the github it says conversion to string to integer isn't valid. You need to calculate the hash from the string, and pass that in to SET_PLAYER_MODEL. You can either use: int hash = Native.Function.Call<int>(Native.Hash.GET_HASH_KEY, "player_zero"); Or, you can use the API being built on top of the natives (which internally calls GET_HASH_KEY): Model model = new Model("player_zero");int hash = model.Hash; In case you still want the hashes for some reason: "player_zero" = 0xD7114C9; //Michael"player_one" = 0x9B22DBAF; //Franklin"player_two" = 0x9B810FA2; //Trevor The native hashes were updated in the newest patch from Rockstar. I'm not sure about the model hashes, but if they were changed as well, that means it's probably best to compute the hash, instead of hardcoding it 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