-
Hi @Halen84 ! Lately I looked into RDR3 Native DB to gather informations about the events of the game, and I'd like your feedback to get a better understanding. What I'm interest into are probably the eventTypes, and I'd be interested to know if they can be listened to. Ideally I'd like to intercept all the events of the game, more specifically the interactions between player and NPCs. A second specificity that I noticed but do not quite understand are methods like TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS and their usage: what are the Thanks for your time :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Yes, events can be listened to, but it's very annoying. Each event has it's own unique struct, which means you'll need to know the size and members of each struct. Here's an example with // Event Struct
struct sHitchAnimalEventData
{
alignas(8) Ped Human;
alignas(8) Ped Animal;
};
// Main Game Loop (called every frame)
int numberOfEvents = SCRIPTS::GET_NUMBER_OF_EVENTS(0);
for (int i = 0; i < numberOfEvents; i++)
{
if (SCRIPTS::GET_EVENT_AT_INDEX(0, i) == MISC::GET_HASH_KEY("EVENT_HITCH_ANIMAL"))
{
sHitchAnimalEventData data;
if (SCRIPTS::GET_EVENT_DATA(0, i, (Any*)&data, 4))
{
PED::SET_PED_TO_RAGDOLL(data.Human, 5000, 5000, 0, false, false, "");
}
}
}
|
Beta Was this translation helpful? Give feedback.
Yes, events can be listened to, but it's very annoying. Each event has it's own unique struct, which means you'll need to know the size and members of each struct. Here's an example with
EVENT_HITCH_ANIMAL
in C++