Skip to content
View in the app

A better way to browse. Learn more.

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

[Fixed]Ped won't spawn at callout location.

Featured Replies

When i accept the callout, it just ignores me and acts like i never got a callout.

 

I tried:

Spawnpoint = Suspect.Position;

Also tried:

Suspect.Position = SpawnPoint;

I also tried without it but still the same.

 

What it looks like:

public override bool OnCalloutAccepted()
        {
            Ped Suspect = new Ped("a_m_o_tramp_01", SpawnPoint, 10f);

            SpawnPoint = Suspect.Position;

 

I need the suspect to be in the callout area but i can't find anything else in object browser.

RagePluginHook.log

Edited by Faya
fixed

🇳🇱

It looks like you're trying to create your suspect ped at spawn point but spawn point is defined as suspects position after you've attempted to spawn the ped.

 

You need to get the coordinates for SpawnPoint before using it.

 

// Define what your Spawn Point coordinates are. This will grab a random position on the street around your player.
Vector3 SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(190, 500));

// Now you can spawn your ped at the specified coordinates held in SpawnPoint
Ped Suspect = new Ped("a_m_o_tramp_01", SpawnPoint, 10f);

// You can then reuse SpawnPoint to get the ped coordinates or assign it to a new Vector3
Vector3 SpawnPoint2 = Suspect.Position;

 

Just be sure to define the SpawnPoint BEFORE trying to create your ped or you'll have issues. If you have a specific location you want to spawn your ped at then just define SpawnPoint as the x, y, z and use it the same way.

 

lspdfrsig.png.9270aca86574b7a164a861f72ccd502d.png

Find all of my LEGACY projects (GTA: SA) plus more in-depth support of current projects on my modding index.

(ONLY my personal work is available and supported on the index)

  • Author
1 hour ago, Adam DeLuca said:

It looks like you're trying to create your suspect ped at spawn point but spawn point is defined as suspects position after you've attempted to spawn the ped.

 

You need to get the coordinates for SpawnPoint before using it.

 


// Define what your Spawn Point coordinates are. This will grab a random position on the street around your player.
Vector3 SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(190, 500));

// Now you can spawn your ped at the specified coordinates held in SpawnPoint
Ped Suspect = new Ped("a_m_o_tramp_01", SpawnPoint, 10f);

// You can then reuse SpawnPoint to get the ped coordinates or assign it to a new Vector3
Vector3 SpawnPoint2 = Suspect.Position;

 

Just be sure to define the SpawnPoint BEFORE trying to create your ped or you'll have issues. If you have a specific location you want to spawn your ped at then just define SpawnPoint as the x, y, z and use it the same way.

It still doesn't work, but i thought it's useful if i provide some extra information: (just does the same as first)

Spoiler

1. at " private Ped Suspect; " it says CS0649: Field 'Gun.Suspect' is never assigned to, and will always have its default value null. (in error log it's a message, not an error or caution.)

 

2. The callout does work(before and after advice) but it just spawns it at 1 location, and I don't have a specific X Y Z position set.

 

3. I put the Vector3 SpawnPoint(the line you gave me) in OnBeforeCalloutDisplayed() , under that, i put the Ped Suspect line.

 

4. public override void Process() is empty, since i don't know what to put there yet.

 

 

🇳🇱

  • Author
7 hours ago, Rich said:

Seeing your actual code is more helpful than you telling us what it looks like.  The Process function is where you put the "meat" of your callout - it's where everything happens after the callout is accepted.

I fixed it, couldn't reply because i went straight to bed after i fixed it, thanks alot for the help everyone.

(I put Ped Suspect line in OnBeforeCallouts() because i was trying to figure out if that was it, but i forgot to move it again.)

🇳🇱

  • The title was changed to [Fixed]Ped won't spawn at callout location.

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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

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.