Jump to content

tfalmeida91

Members
  • Posts

    2
  • Joined

  • Last visited

Personal Information

  • Country
    Portugal
  • Gender
    Male

tfalmeida91's Achievements

Feller

Feller (1/10)

1

Reputation

  1. Hi LMS, thank you very much for your answer! I ended up finding out how to do what I wanted. So basicaly, as stated in the NativeDB, "CREATE_OBJECT" (0x509D5878EB39E842) returns an object of type Object, which in Rage is represented by Prop type. You can indeed get the spawned Handle by using Dynamic Native Call, just like this: Prop _prop = Game.Natives.x509D5878EB39E842<Prop>(_objectNameString.HashCode(), _position.X, _position.Y, _position.Z, false, true, true, false, false); After atributting the newly returned Object to the Type Prop, you can do anything you wish with it! Best regards! 😄
  2. Hello everyone, I've successfuly managed to spawn object in the game, although I would need to store it in C# to be able to handle them, rotate them and such. But the thing is that Rage Plugin Hook for RDR2 has no such variables that I could use to store them, and whenever I try to store them to a normal c# object, it throws an error. I call this native "CREATE_OBJECT" (0x509D5878EB39E842), like this: Game.CallNative(0x509D5878EB39E842, "P_GEN_POSTERWANTED05X".HashCode(), PlayerPed.Position.X, PlayerPed.Position.Y, PlayerPed.Position.Z, false, false, true, false, false); But just as the NativeDB states, this native returns a Type "Object". So I would have to use: Some_var_Type _object = Game.CallNative<Some_var_Type>(0x509D5878EB39E842, "P_GEN_POSTERWANTED05X".HashCode(), PlayerPed.Position.X, PlayerPed.Position.Y, PlayerPed.Position.Z, false, false, true, false, false); to store it. Everytime I try to create it like this: object _object = Game.CallNative<object>(0x509D5878EB39E842, "P_GEN_POSTERWANTED05X".HashCode(), TfaRageUtils.PlayerPed.Position.X, TfaRageUtils.PlayerPed.Position.Y, TfaRageUtils.PlayerPed.Position.Z, false, false, true, false, false); it throws the following error: System.ArgumentException: The specified structure must allow representation by bits / bytes or have schema information. With code: -2147024809 How can I manage this? Or is it currently impossible? Thank you in advance!
×
×
  • Create New...