Jump to content

choky10

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Gallery

Downloads

News Articles

Modding Wiki

RDR2 Native Database

RDR2 Native Parameters

RDR2 Player Clothes Database

RDR2 Ped Voices Database

RDR2 Ped Speech Lines

RDR Modding Tutorials

RDR2 Ped Model Database

RDR2 Animations Database

RDRFR Changelog

RDRFR Installation Guide

RDRFR Features

RDRFR Settings

LML User Contributions

Everything posted by choky10

  1. So is supose we need this native: void_SET_PED_COMPONENT_VARIATION( Ped ped, Hash componentHash, Hash variationHash, BOOL updatePed, BOOL isMpComponent, Any p5 ) So i have some questions, on gtav i think this was different i remember we need two more native, to get the variationsHash, and the component. Or what i need to doe? So i try with this hat: So for example, i put on componentHash, the Hash of the HAT. But how i get the variationHash. Any help with this?
  2. Hello, any idea how make a camera zoom? I have my script camera for the object create on my map. But some times object are to big or small and i need to adjust the zoom level. Or other case, the gameplay camera (my camera character) is any way to zoom out and in?
  3. Hello i have this code for my raycast.cpp: But when i hit a entity with the IntersectOptions on int 12. My game crash any idea why? I use like this: if (features::activateRaycast) { Entity target; Vector3 camPos = Position(); Vector3 camDir = DirectionFromScreenCentre(); auto ray = RaycastResult::Raycast(camPos, camDir, 20000.0f, IntersectOptions::Peds1, features::myPed()); if (ray.DidHitEntity()) { auto hitEntity = ray.HitEntity(); printf("Entity id: %d", hitEntity); } } Raycast.cpp RaycastResult::RaycastResult() : mResult(0), mDidHit(false) { } RaycastResult::RaycastResult(const RaycastResult& handle) : mResult(handle.mResult), mDidHit(handle.mDidHit), mHitEntity(handle.mHitEntity), mHitCoords(handle.mHitCoords), mSurfaceNormal(handle.mSurfaceNormal) { } RaycastResult::RaycastResult(int handle) { int hitsomething = 0; int enthandle = 0; Vector3 hitCoords, surfaceNormal; this->mResult = SHAPETEST::GET_SHAPE_TEST_RESULT(handle, &hitsomething, &hitCoords, &surfaceNormal, &enthandle); this->mDidHit = hitsomething != 0; this->mHitCoords = hitCoords; this->mSurfaceNormal = surfaceNormal; if (ENTITY::DOES_ENTITY_EXIST(enthandle) && (ENTITY::IS_ENTITY_A_PED(enthandle) || ENTITY::IS_ENTITY_A_VEHICLE(enthandle) || ENTITY::IS_ENTITY_AN_OBJECT(enthandle))) { this->mHitEntity = enthandle; } else { this->mHitEntity = 0; } } int RaycastResult::Result() { return this->mResult; } bool RaycastResult::DidHitEntity() { return mHitEntity != 0; } bool RaycastResult::DidHitAnything() { return this->mDidHit; } Entity RaycastResult::HitEntity() { return this->mHitEntity; } Vector3 RaycastResult::HitCoords() { return this->mHitCoords; } Vector3 RaycastResult::SurfaceNormal() { return this->mSurfaceNormal; } RaycastResult RaycastResult::Raycast(const Vector3& source, const Vector3& target, IntersectOptions options, Entity ignoreEntity) { return RaycastResult(SHAPETEST::_START_SHAPE_TEST_RAY(source.x, source.y, source.z, target.x, target.y, target.z, static_cast<int>(options), ignoreEntity, 7)); } RaycastResult RaycastResult::Raycast(const Vector3& source, const Vector3& direction, float maxDistance, IntersectOptions options, Entity ignoreEntity) { Vector3 target = source + (direction * maxDistance); return RaycastResult(SHAPETEST::_START_SHAPE_TEST_RAY(source.x, source.y, source.z, target.x, target.y, target.z, static_cast<int>(options), ignoreEntity, 7)); }
×
×
  • Create New...