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.

Entity Spawning?

Featured Replies

Hey guys,

I am attempting to make my first callout which is a convoy attack. I am running into a problem with spawning peds and vehicles.

This is the problem:

Spoiler

2015-12-09_00001.thumb.jpg.4c6cb3abbe0082015-12-09_00002.thumb.jpg.2dcde03b3e7a5

It all spawns on top of each other, so I tried to resolve this problem by doing this:
 

 //Officer Spawns
            officer1 = new Ped("s_m_y_hwaycop_01", spawn, 0f);
            Vector3 o1 = officer1.GetOffsetPosition(new Vector3(15f, -3f, 0f));
            officer2 = new Ped("s_m_y_hwaycop_01", o1, 0f);
            officer2.GetTextureVariationCount(0, 1); //Another "look" or "clothing style" of this ped
            o1 = officer1.GetOffsetPosition(new Vector3(12f, -8f, 0f));
            officer3 = new Ped("s_m_y_hwaycop_01", o1, 0f);
            officer3.GetTextureVariationCount(0, 2);

Basically just using GetoffsetPosition..

Is there a better / more efficient way of doing this? I'd prefer to have officers on one side, and bad guys on the other (all shielded by their vehicles).

Thanks,
Tanu / Talatactics

Edited by tanu1215

Vector3 o1 = officer1.GetOffsetPosition(Vector3.RelativeFront * 3f);

Same can be done with Vector3.RelativeBack etc.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

  • Author
30 minutes ago, Albo1125 said:

Vector3 o1 = officer1.GetOffsetPosition(Vector3.RelativeFront * 3f);

Same can be done with Vector3.RelativeBack etc.

So if I use this, I can make it have officers and their vehicles on one side of the street and gunmen and their vehicle on the other?

What if streets happen to be too narrow? Ex: Vinewood hills?

1 hour ago, tanu1215 said:

So if I use this, I can make it have officers and their vehicles on one side of the street and gunmen and their vehicle on the other?

What if streets happen to be too narrow? Ex: Vinewood hills?

If you want precise locations, the best thing is to collect the location data yourself. 

You can oppose vehicles and officers with RelativeLeft or relativeright and relative front or relative back respectively.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

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.