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.

Backup spawns every second

Featured Replies

Here is the code:

myPed -is suspect 

spawnpoint- suspect's spawn point 

        public override void Process()
        {

            if (Vector3.Distance(Game.LocalPlayer.Character.Position, myPed.Position) < 900.0f)
            {



                Functions.RequestBackup(SpawnPoint, EBackupResponseType.Code3, EBackupUnitType.LocalUnit);
            }
            base.Process();
        }

Is process starts my code every second?

it should call backup (as i think ) 1 time, but it calls it every second.

  • Management Team

The code behavior is correct. Process is called every tick/frame. You then check if the distance is lower than 900 and if so, request backup. So for every tick/frame where this is true, a new backup request is made.

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

Oh, I thought that only happens if you call base.Process(); at the end, but apparently not. Then what's the reason you usually do that?

18 hours ago, LMS said:

The code behavior is correct. Process is called every tick/frame. You then check if the distance is lower than 900 and if so, request backup. So for every tick/frame where this is true, a new backup request is made.

 

Logging in...

Launching game...

Error launching game: Cannot load while loading. Please log out and retry.

Logging out...

Error logging out. You are not logged in. You need to be logged in to log out. Please log in to log out.

  • Management Team
2 hours ago, TheUniT said:

Oh, I thought that only happens if you call base.Process(); at the end, but apparently not. Then what's the reason you usually do that?

 

 

Since you are overriding Process the dispatcher will always call your implementation, unless as you said you specify it should call the base's implementation of it. Hence your Process implementation is called every tick and called before the base one. When overriding, you can decide if you want to call the base implementation or not depending on whether you want the functionality the base provides to still work. For a callout, the base call with invoke the state callbacks, if you have any, so you should call it. I try to annotate functions where you want to call base in 9 out of 10 cases with "Call base when overriding" to make that clear.

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

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.