Jump to content
View in the app

A better way to browse. Learn more.

RDR2Mods.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can I play a scenario on a ped in C#?

Featured Replies

Posted

I've been trying to give my ped a beer bottle scenario where you can drink / drop it (I found it in the rampage trainer) but it doesn't do anything. 

Here is what I tried:

Game.Player.Character.Task.StartScenario("WORLD_HUMAN_BOTTLE_PICKUP_BOX_TABLE_BEER");

and

    Function.Call(Hash.TASK_START_SCENARIO_AT_POSITION, Game.Player.Character, "WORLD_HUMAN_BOTTLE_PICKUP_BOX_TABLE_BEER", Game.Player.Character.Position.X, Game.Player.Character.Position.Y, Game.Player.Character.Position.Z, Game.Player.Character.Heading, -1, false, false, 0, 0, 0);

I also tried a smoking scenario which also did not work.

Are the GPS coordinates usually blank? 

 

You got an X Y and Z value of nothing up there it looks like > > > > > Position.X, [SEEMS THERE SHOULD BE A VALUE HERE, NO?] Or maybe that's how animations work, maybe they don't need GPS as they are attached to the ped but why even list X,Y,Z, values then?

 

 

  • Author
4 hours ago, joebeefhash said:

Are the GPS coordinates usually blank? 

 

You got an X Y and Z value of nothing up there it looks like > > > > > Position.X, [SEEMS THERE SHOULD BE A VALUE HERE, NO?] Or maybe that's how animations work, maybe they don't need GPS as they are attached to the ped but why even list X,Y,Z, values then?

 

 

Game.Player.Position.X is the Players X coordinate and so on, these are not empty variables. The reason I need them is because the native hash requires them as params, otherwise the coordinate would be at 0, 0, 0 by default.

Edited by M8T

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.