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.

Coordinates not working

Featured Replies

Hello!

 

I'm working on my callout plugin and have been running into a problem. The problem is that when I write in the coordinates that a vehicle should spawn, it just spawns on other locations. I'm 100% sure that I've written the right coordinates but it still doesn't work.

 

You can see the yellow blip, that is where the vehicles spawn, which is wrong. You can also see me, and that's where the vehicles should spawn.

 

Regards,

Daniel C.

5a061b531c968_Skrmklipp6.thumb.JPG.a1b260d2ee31c79113bcb392c3abba9f.JPG

Skärmklipp5.JPG

Edited by GeneralDanielC

  • Author
18 hours ago, OJdoesIt said:

Paste a snippet of the spawning code.

 

        public override bool OnCalloutAccepted()
        {
            // ---------------------------------------

            // Vehicles

 

            truck = new Vehicle("VEHICLE", truckSpawnPoint, 0f);
            policeVehicle = new Vehicle("VEHICLE", policeVehicleSpawnPoint, 0f);

 

            // Spawnpoints Vehicles

 

            truckSpawnPoint = new Vector3(-11.79322f, -685.6841f, 31.4895f);
            policeVehicleSpawnPoint = new Vector3(-1.427841f, -685.052f, 31.48894f);

 

            // ---------------------------------------

         }

Edited by GeneralDanielC

8 hours ago, GeneralDanielC said:

 

        public override bool OnCalloutAccepted()
        {
            // ---------------------------------------

            // Vehicles

 

            truck = new Vehicle("VEHICLE", truckSpawnPoint, 0f);
            policeVehicle = new Vehicle("VEHICLE", policeVehicleSpawnPoint, 0f);

 

            // Spawnpoints Vehicles

 

            truckSpawnPoint = new Vector3(-11.79322f, -685.6841f, 31.4895f);
            policeVehicleSpawnPoint = new Vector3(-1.427841f, -685.052f, 31.48894f);

 

            // ---------------------------------------

         }

From how you showed the code, you are spawning the vehicles before setting the coordinates of your Vector3 variables.

  • Author
On 2017-11-12 at 2:32 AM, OJdoesIt said:

From how you showed the code, you are spawning the vehicles before setting the coordinates of your Vector3 variables.

Thanks, it worked after I fixed it.

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.