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

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • 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.