Jump to content

Drug Dealer Hours Doesn't Account for entire night

Closed 0.2 0.3

Rob Vary
Rob Vary

Posted

If I'd like my dealers to only spawn at night, say between the hours of 20:00 and 6:00, and I set that in the config, they will never spawn. Consider a helper function to account for when config.basicSettings.hoursFrom > config.basicSettings.hoursTill. For instance, I believe this should cover it.

 

private bool inTimeRange(float hour)
{
    var start = config.basicSettings.hoursFrom;
    var end = config.basicSettings.hoursTill;

    if (start <= end)
    {
        return start <= hour && hour <= end;
    }
    else
    {
        return start <= hour || hour <= end;
    }
}

 

Nod Js

Posted

Changed Status from Pending to Work in Progress

Nod Js

Posted

Changed Fixed In to 0.3

Nod Js

Posted

Changed Status from Work in Progress to Closed

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.5m
Total downloads
Customers
11.1k
Customers served
Files Sold
158.8k
Marketplace sales
Payments
3.4m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.