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.

When should I start a new GameFiber?

Featured Replies

After looking at other releases, as well as many other examples I am still confused on when exactly I should be starting a new GameFiber? Is it only when you are going to use the GameFiber.Sleep() command? I am curious if starting a new GameFiber would help prevent my plugins from crashing?

Can someone clear this up for me?

Much appreciated,

minipunch :thumbsup:

Basically, any time you do anything which takes any time to process, you need a game fiber. Otherwise it freezes up the game because nothing else can run while that code is executing if it's not in a separate fiber. So, if you have any kind of while or for loop, if you have any kind of task that you're waiting to complete, any time you want to sleep, etc. 

It's generally good practice to have most of your code in a game fiber so it doesn't freeze up the main game. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

I'm curious if there are any "dont's" when using a game fiber.. Such as don't start a fiber within a fiber. 

 

I haven't noticed any adverse effects to over using fibers.. But Ive only developed things I need.

On 12/04/2016 at 10:51 AM, ainesophaur said:

I'm curious if there are any "dont's" when using a game fiber.. Such as don't start a fiber within a fiber. 

 

I haven't noticed any adverse effects to over using fibers.. But Ive only developed things I need.

I think it just depends on the hardware.

Dispatch we are Code 4. Show me 10-8.

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.