Enumerator Posted July 10, 2015 Share Posted July 10, 2015 Problem, Your .net scripthook crashes when i try to receive an event from public withevents. Can you explain what's causing this? Link to comment Share on other sites More sharing options...
Enumerator Posted July 10, 2015 Share Posted July 10, 2015 (edited) Ignore this, i figured out another way. Edited July 10, 2015 by Enumerator Link to comment Share on other sites More sharing options...
identitymatrix Posted July 10, 2015 Share Posted July 10, 2015 I got it working, Julio helped. Anyone know how to get custom cameras working? I have had no luck so far. Which is the camera activator method? isActive? That doesn't work Seems like it should be a readonly property Link to comment Share on other sites More sharing options...
unknown modder Posted July 10, 2015 Share Posted July 10, 2015 I got it working, Julio helped. Anyone know how to get custom cameras working? I have had no luck so far. Which is the camera activator method? isActive? That doesn't work Seems like it should be a readonly property show the code your using to try and make it work Link to comment Share on other sites More sharing options...
alexslx Posted July 11, 2015 Share Posted July 11, 2015 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "ScriptHookVDotNet", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1> Mod_1 -> F:\GTAV_MOD\Projects\Mod_1\Mod_1\bin\Debug\Mod_1.dll I get this when i try to call a native. And [14:37:07] CORE: An exception occurred while executing 'ScriptHookVDotNet.asi' On ScrtipHoobV.log Change your project settings architecture to x64. Link to comment Share on other sites More sharing options...
Inco Posted July 11, 2015 Share Posted July 11, 2015 I got it working, Julio helped. Anyone know how to get custom cameras working? I have had no luck so far. Which is the camera activator method? isActive? That doesn't work Seems like it should be a readonly property http://gtaforums.com/topic/789907-vrel-community-script-hook-v-net/page-28?do=findComment&comment=1067659774 http://gtaforums.com/topic/789907-vrel-community-script-hook-v-net/page-28?do=findComment&comment=1067660068 Link to comment Share on other sites More sharing options...
identitymatrix Posted July 12, 2015 Share Posted July 12, 2015 Wrote a checkpoint class in VB.NET if intrested http://pastebin.com/Jam0rw0u Link to comment Share on other sites More sharing options...
unknown modder Posted July 12, 2015 Share Posted July 12, 2015 Wrote a checkpoint class in VB.NET if intrested http://pastebin.com/Jam0rw0u instead of using rgba arguments you can use the System.Drawing.Color class then pass the color r,g,b,a values Link to comment Share on other sites More sharing options...
nordi Posted July 12, 2015 Share Posted July 12, 2015 I would like to use the camera on the helicopter (like in the missions, with the police maverick): and therefore be able to zoom in / out, etc. But I can't find a native to do that. Does anyone know a way to get it to work ? Link to comment Share on other sites More sharing options...
Enumerator Posted July 14, 2015 Share Posted July 14, 2015 (edited) When will crosire implement texture drawing? Scripthookv has this, obviously we can have it to, crosire??? oh and we need texture rotation/angle ectt.......... Edited July 14, 2015 by Enumerator Link to comment Share on other sites More sharing options...
crosire Posted July 14, 2015 Author Share Posted July 14, 2015 When will crosire implement texture drawing? Scripthookv has this, obviously we can have it to, crosire??? oh and we need texture rotation/angle ectt.......... Ehm, it's been there since v1.1: "UI.DrawTexture()"?!! Link to comment Share on other sites More sharing options...
Enumerator Posted July 14, 2015 Share Posted July 14, 2015 When will crosire implement texture drawing? Scripthookv has this, obviously we can have it to, crosire??? oh and we need texture rotation/angle ectt.......... Ehm, it's been there since v1.1: "UI.DrawTexture()"?!! o.0 Link to comment Share on other sites More sharing options...
unknown modder Posted July 14, 2015 Share Posted July 14, 2015 (edited) When will crosire implement texture drawing? Scripthookv has this, obviously we can have it to, crosire??? oh and we need texture rotation/angle ectt.......... Ehm, it's been there since v1.1: "UI.DrawTexture()"?!! o.0 you are not using v1.1 , if you are make sure you are also using the correct ScriptHookVDotNet.dll file as a reference Edited July 14, 2015 by unknown modder Enumerator 1 Link to comment Share on other sites More sharing options...
Enumerator Posted July 14, 2015 Share Posted July 14, 2015 (edited) dblepost,delete. Edited July 14, 2015 by Enumerator Link to comment Share on other sites More sharing options...
Enumerator Posted July 14, 2015 Share Posted July 14, 2015 When will crosire implement texture drawing? Scripthookv has this, obviously we can have it to, crosire??? oh and we need texture rotation/angle ectt.......... Ehm, it's been there since v1.1: "UI.DrawTexture()"?!! o.0 you are not using v1.1 , if you are make sure you are also using the correct ScriptHookVDotNet.dll file as a reference I think crosire should build in an auto updater into his scripthook, a simple downloader and using zipforge to extract the package to the "./" same directory.. Downloading these scripthooks constantly is annoying. I completely forgot to check the updates, thanks allot though The simple things always slip my mind. Link to comment Share on other sites More sharing options...
unknown modder Posted July 14, 2015 Share Posted July 14, 2015 When will crosire implement texture drawing? Scripthookv has this, obviously we can have it to, crosire??? oh and we need texture rotation/angle ectt.......... Ehm, it's been there since v1.1: "UI.DrawTexture()"?!! o.0 you are not using v1.1 , if you are make sure you are also using the correct ScriptHookVDotNet.dll file as a reference I think crosire should build in an auto updater into his scripthook, a simple downloader and using zipforge to extract the package to the "./" same directory.. Downloading these scripthooks constantly is annoying. I completely forgot to check the updates, thanks allot though The simple things always slip my mind. its not really constantly, 1.1 came out 10 days ago Link to comment Share on other sites More sharing options...
identitymatrix Posted July 15, 2015 Share Posted July 15, 2015 (edited) Wrote a checkpoint class in VB.NET if intrested http://pastebin.com/Jam0rw0u instead of using rgba arguments you can use the System.Drawing.Color class then pass the color r,g,b,a values What, I did, didn't I? - Well an overload Edited July 15, 2015 by TheVideoVolcano Link to comment Share on other sites More sharing options...
identitymatrix Posted July 16, 2015 Share Posted July 16, 2015 Anyone know how to get renderingcamera camera direction? I am able to get all these Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_RELATIVE_HEADING) Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_RELATIVE_PITCH) Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_ROT) Native.Function.Call(Of Vector3)(Native.Hash.GET_GAMEPLAY_CAM_COORD) Link to comment Share on other sites More sharing options...
identitymatrix Posted July 16, 2015 Share Posted July 16, 2015 Anyone know how to get renderingcamera camera direction? I am able to get all these Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_RELATIVE_HEADING) Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_RELATIVE_PITCH) Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_ROT) Native.Function.Call(Of Vector3)(Native.Hash.GET_GAMEPLAY_CAM_COORD) Well from ScripthookDotNet (iv) GTA::Vector3 Helper::RotationToDirection(GTA::Vector3 Rotation) { float rotZ = DegreeToRadian(Rotation.Z); float rotX = DegreeToRadian(Rotation.X); float multXY = System::Math::Abs((float)Math::Cos(rotX)); GTA::Vector3 res; res.X = float(-Math::Sin(rotZ)) * multXY; res.Y = float(Math::Cos(rotZ)) * multXY; res.Z = float(Math::Sin(rotX)); return res; } Link to comment Share on other sites More sharing options...
Raxdiam Posted July 17, 2015 Share Posted July 17, 2015 (edited) I cannot for the life of me figure out how to spawn a bodyguard. That is, spawn a ped, and actually have it follow and defend you. I've referenced other sources and tried to convert that code to C# (which I did), but no matter what, the ped just would not follow you character. Asking this here was my last resort. Can anybody help, point me in the right direction, or give me an example? Edited July 17, 2015 by Raxdiam Link to comment Share on other sites More sharing options...
LizNet Posted July 17, 2015 Share Posted July 17, 2015 (edited) I dont know if this is the right section to ask this, but how can I check if player is inside a building? What is a correct Property for that? Is there something like Game.Player.Character.IsInBuilding? I tried to look those functions and properties under Namespace GTA, but didn't find anything which is relevant to what I'm looking for Edited July 17, 2015 by LizNet Link to comment Share on other sites More sharing options...
identitymatrix Posted July 17, 2015 Share Posted July 17, 2015 (edited) I cannot for the life of me figure out how to spawn a bodyguard. That is, spawn a ped, and actually have it follow and defend you. I've referenced other sources and tried to convert that code to C# (which I did), but no matter what, the ped just would not follow you character. Asking this here was my last resort. Can anybody help, point me in the right direction, or give me an example? Well, I haven't done that myself too much, but maybe try with ped p = world.createRandomPed(player.position.around(2));p.isPersistent() = True; And maybe just task the ped in the tick to goto player like so. p.task.goto(player.position.around(2)); Oh, for defend, I would imagine it would be something 'like' if (player.IsBeingJacked() || player.isInMeleeCombat()) {ped enemyped = world.getClosestPed(player.position, 2);if (enemyped.exists()) {enemyped.isEnemy();p.task.clearAll();//p.task.shootAt(enemyped);p.FightAgainstHatedTargets();}} Something along those lines, this is untested and may not work. Ofcourse, build upon that, that is not nearly enough checks etc... Sorry If the syntax is incorrect, I use vb.net for gta. Edited July 17, 2015 by TheVideoVolcano Link to comment Share on other sites More sharing options...
identitymatrix Posted July 17, 2015 Share Posted July 17, 2015 (edited) Anyone know how to get renderingcamera camera direction? I am able to get all these Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_RELATIVE_HEADING) Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_RELATIVE_PITCH) Native.Function.Call(Of Double)(Native.Hash.GET_GAMEPLAY_CAM_ROT) Native.Function.Call(Of Vector3)(Native.Hash.GET_GAMEPLAY_CAM_COORD) Well from ScripthookDotNet (iv) GTA::Vector3 Helper::RotationToDirection(GTA::Vector3 Rotation) { float rotZ = DegreeToRadian(Rotation.Z); float rotX = DegreeToRadian(Rotation.X); float multXY = System::Math::Abs((float)Math::Cos(rotX)); GTA::Vector3 res; res.X = float(-Math::Sin(rotZ)) * multXY; res.Y = float(Math::Cos(rotZ)) * multXY; res.Z = float(Math::Sin(rotX)); return res; } Doesn't matter I figured it out, I just converted Hazard Trigonometric calculations to VB.net Here is the code in VB.NET http://pastebin.com/WZDyfBcV use like so: dim dir as vector3 = THelper.rotationToDirection(gameplayCamera.rotation) 'WRITTEN BY HAZARDX/CODEAPARAT/TIM'TRANSLATED FROM C++ TO VB.NET BY THEVIDEOVOLCANOPublic Class THelperPublic Shared Function RadianToDegree(ByVal radians As Double) As DoubleReturn radians * Convert.ToDouble(180.0 / Math.PI)End FunctionPublic Shared Function DegreeToRadian(ByVal degrees As Double) As DoubleReturn degrees * Convert.ToDouble(Math.PI / 180.0)End FunctionPublic Shared Function DirectionToHeading(ByVal dir As GTA.Math.Vector3) As Doubledir.Z = 0.0Fdir.Normalize()Return RadianToDegree(-Math.Atan2(dir.X, dir.Y))End FunctionPublic Shared Function HeadingToDirection(ByVal Heading As Double) As GTA.Math.Vector3Heading = DegreeToRadian(Heading)Dim res As GTA.Math.Vector3res.X = Convert.ToDouble(-Math.Sin(Heading))res.Y = Convert.ToDouble(Math.Cos(Heading))res.Z = 0.0FReturn resEnd FunctionPublic Shared Function DirectionToRotation(ByVal dir As GTA.Math.Vector3, ByVal roll As Double)dir = GTA.Math.Vector3.Normalize(dir)Dim rotval As GTA.Math.Vector3' Z rotation calculated from the Floor - Vector of Direction . (Normal X and Z)rotval.Z = -RadianToDegree(Math.Atan2(dir.X, dir.Y))' X rotation calculated from the angle between the length of the floor and the height VectorsDim rotpos As GTA.Math.Vector3 = GTA.Math.Vector3.Normalize(New GTA.Math.Vector3(dir.Z, New GTA.Math.Vector3(dir.X, dir.Y, 0.0F).Length(), 0.0F))rotval.X = RadianToDegree(Math.Atan2(rotpos.X, rotpos.Y))rotval.Y = roll 'RollReturn rotvalEnd FunctionPublic Shared Function RotationToDirection(ByVal Rotation As GTA.Math.Vector3) As GTA.Math.Vector3Dim rotZ As Double = DegreeToRadian(Rotation.Z)Dim rotX As Double = DegreeToRadian(Rotation.X)Dim multiXY As Double = Math.Abs(Convert.ToDouble(Math.Cos(rotX)))Dim res As GTA.Math.Vector3res.X = Convert.ToDouble(-Math.Sin(rotZ)) * multiXYres.Y = Convert.ToDouble(Math.Cos(rotZ)) * multiXYres.Z = Convert.ToDouble(Math.Sin(rotX))Return resEnd FunctionEnd Class Edited July 17, 2015 by TheVideoVolcano Link to comment Share on other sites More sharing options...
Enumerator Posted July 17, 2015 Share Posted July 17, 2015 (edited) Pointless asking questions here. Edited July 19, 2015 by Enumerator Link to comment Share on other sites More sharing options...
timnboys Posted July 19, 2015 Share Posted July 19, 2015 Wrote a checkpoint class in VB.NET if intrested http://pastebin.com/Jam0rw0u Okay could I ask does this work like for example like a police checkpoint? or could you help me out by helping me get sample code to make a police checkpoint script? Link to comment Share on other sites More sharing options...
nordi Posted July 19, 2015 Share Posted July 19, 2015 (edited) I have a question: when I change my ped model, I can't access the hair cut saloon, nor the clothing stores. How can I fix that ? Edited July 20, 2015 by nordi Link to comment Share on other sites More sharing options...
TheRealMofu Posted July 21, 2015 Share Posted July 21, 2015 (edited) Is it possible that ScriptHookVDotNet stopped working after latest patch ?I'm just curious because i installed win10 today and after install i recognized that there is a new Update for GTA V, or if ScriptHookVDotNet has a problem with win10 Problem solved, i forgot to install the Redistributable Packages xD Edited July 21, 2015 by TheRealMofu Link to comment Share on other sites More sharing options...
GhostStorm Posted July 21, 2015 Share Posted July 21, 2015 Is this working with the patch released last night? I don't want to install it when RageHook is updated if it's broken. Link to comment Share on other sites More sharing options...
TheRealMofu Posted July 21, 2015 Share Posted July 21, 2015 Is this working with the patch released last night? I don't want to install it when RageHook is updated if it's broken. Read my post above yours, yeah is working flawless Link to comment Share on other sites More sharing options...
timnboys Posted July 21, 2015 Share Posted July 21, 2015 (edited) Is this working with the patch released last night? I don't want to install it when RageHook is updated if it's broken. Read my post above yours, yeah is working flawless Nevermind it works it appears the latest ci build fixed it Edited July 22, 2015 by timnboys 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