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.

Creating a Cop

Featured Replies

I'm trying to create a cop but every time I do it I get this error:

[7/23/2015 7:14:58 PM.818] TestSpawn: ==============================
[7/23/2015 7:14:58 PM.818] TestSpawn: UNHANDLED EXCEPTION DURING GAME THREAD TICK
[7/23/2015 7:14:58 PM.818] TestSpawn: ------------------------------
[7/23/2015 7:14:58 PM.818] TestSpawn: Origin: Game fiber "Plugin "TestSpawn" main thread".
[7/23/2015 7:14:58 PM.818] TestSpawn: ------------------------------
[7/23/2015 7:14:58 PM.818] TestSpawn: Exception type: System.NullReferenceException
[7/23/2015 7:14:58 PM.818] TestSpawn: Exception message: Object reference not set to an instance of an object.
[7/23/2015 7:14:58 PM.818] TestSpawn: ------------------------------
[7/23/2015 7:14:58 PM.818] TestSpawn: Inner exceptions:
[7/23/2015 7:14:58 PM.818] TestSpawn: ------------------------------
[7/23/2015 7:14:58 PM.818] TestSpawn: Stack trace:
[7/23/2015 7:14:58 PM.821] TestSpawn: at LSPD_First_Response.Cop..ctor(PoliceAgency agency, Gender gender, Vector3 position, Single heading, ECopFlags flags)
[7/23/2015 7:14:58 PM.821] at TestSpawn.SpawnHelper.SpawnTest() in C:\Users\FtDLulz\Google Drive\Programming\C#\GTA V\Projects\TestSpawn\TestSpawn\EntryPoint.cs:line 93
[7/23/2015 7:14:58 PM.821] at TestSpawn.EntryPoint.Main() in C:\Users\FtDLulz\Google Drive\Programming\C#\GTA V\Projects\TestSpawn\TestSpawn\EntryPoint.cs:line 41
[7/23/2015 7:14:58 PM.821] at Rage.GameFiber.Main()
[7/23/2015 7:14:58 PM.821] TestSpawn: ==============================

Here's my code:

tsCop01 = new Cop(PoliceAgency.CityPolice, Gender.Random,
tsVehicle01.GetOffsetPosition(Vector3.RelativeRight * 2.0f), testspawnSP.Heading - 180f);
tsCop02 = new Cop(PoliceAgency.CityPolice, Gender.Random,
tsVehicle02.GetOffsetPosition(Vector3.RelativeLeft * 2.0f), testspawnSP.Heading - 180f);

 

  • Management Team

Sorry for the confusion, this class is not really meant to be public. You should only really make use of the API namespace, the other public ones will most likely disappear soon.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Sorry for the confusion, this class is not really meant to be public. You should only really make use of the API namespace, the other public ones will most likely disappear soon.

Please dont remove Engine.Scripting.Functions!!! Those are really useful!! :sad:

Edited by Wonka45

Please dont remove Engine.Scripting.Functions!!! Those are really useful!! :sad:

+1 if you do decide to make that namespace private, maybe make clones of those functions that call the private methods in the API Functions class.

Edited by Ethenal

  • Author

I need at least the GetWorldZoneAtPosition function.

Also using this one along with GetNearestRoadPositionSP (there's a native for something like this but the spawn point is useful).

Edited by FtDLulz

I use those too. I can get you a complete list later if you want. 

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

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.