Jump to content

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


M8T
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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?

 

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...