Jump to content

Coordinates not working


GeneralDanielC

Recommended Posts

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

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

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.

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.



×
×
  • Create New...