-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #774 from bitpredator/dev
convert: esx_mechanicjob > bpt_mechanicjob
- Loading branch information
Showing
42 changed files
with
456 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- bug | ||
- dependencies | ||
- enhancement | ||
# Label to use when marking an issue as stale | ||
staleLabel: wontfix | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false | ||
name: 'Close stale issues and PRs' | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 */2 * * *' | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
days-before-stale: 60 | ||
days-before-close: 7 | ||
stale-issue-message: 'This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.' | ||
stale-issue-label: Stale | ||
stale-pr-message: 'This pull request is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.' | ||
stale-pr-label: Stale | ||
operations-per-run: 100 | ||
debug-only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h1 align='center'>bpt_holdup</a></h1> | ||
<p align='center'><a href='https://discord.gg/ksGfNvDEfq'>Discord</a> | ||
|
||
Copyright (C) 2022-2024 bitpredator | ||
|
||
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. | ||
|
||
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. | ||
|
||
ATTENTION: | ||
You are not authorized to change the name of the resource and the resources within it. | ||
|
||
If you want to contribute you can open a pull request. | ||
|
||
You are not authorized to sell this software (this is free project). | ||
|
||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 23 additions & 23 deletions
46
...s/[esx_addons]/esx_holdup/server/main.lua → ...s/[bpt_addons]/bpt_holdup/server/main.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
local rob = false | ||
local robbers = {} | ||
|
||
RegisterServerEvent("esx_holdup:tooFar") | ||
AddEventHandler("esx_holdup:tooFar", function(currentStore) | ||
RegisterServerEvent("bpt_holdup:tooFar") | ||
AddEventHandler("bpt_holdup:tooFar", function(currentStore) | ||
local source = source | ||
rob = false | ||
for _, xPlayer in pairs(ESX.GetExtendedPlayers("job", "police")) do | ||
TriggerClientEvent("esx:showNotification", xPlayer.source, _U("robbery_cancelled_at", Stores[currentStore].nameOfStore)) | ||
TriggerClientEvent("esx_holdup:killBlip", xPlayer.source) | ||
TriggerClientEvent("esx:showNotification", xPlayer.source, TranslateCap("robbery_cancelled_at", Stores[currentStore].nameOfStore)) | ||
TriggerClientEvent("bpt_holdup:killBlip", xPlayer.source) | ||
end | ||
if robbers[source] then | ||
TriggerClientEvent("esx_holdup:tooFar", source) | ||
TriggerClientEvent("bpt_holdup:tooFar", source) | ||
ESX.ClearTimeout(robbers[source]) | ||
robbers[source] = nil | ||
TriggerClientEvent("esx:showNotification", source, _U("robbery_cancelled_at", Stores[currentStore].nameOfStore)) | ||
TriggerClientEvent("esx:showNotification", source, TranslateCap("robbery_cancelled_at", Stores[currentStore].nameOfStore)) | ||
end | ||
end) | ||
|
||
RegisterServerEvent("esx_holdup:robberyStarted") | ||
AddEventHandler("esx_holdup:robberyStarted", function(currentStore) | ||
RegisterServerEvent("bpt_holdup:robberyStarted") | ||
AddEventHandler("bpt_holdup:robberyStarted", function(currentStore) | ||
local source = source | ||
local xPlayer = ESX.GetPlayerFromId(source) | ||
if Stores[currentStore] then | ||
local store = Stores[currentStore] | ||
if (os.time() - store.lastRobbed) < Config.TimerBeforeNewRob and store.lastRobbed ~= 0 then | ||
TriggerClientEvent("esx:showNotification", source, _U("recently_robbed", Config.TimerBeforeNewRob - (os.time() - store.lastRobbed))) | ||
TriggerClientEvent("esx:showNotification", source, TranslateCap("recently_robbed", Config.TimerBeforeNewRob - (os.time() - store.lastRobbed))) | ||
return | ||
end | ||
if not rob then | ||
local xPlayers = ESX.GetExtendedPlayers("job", "police") | ||
if #xPlayers >= Config.PoliceNumberRequired then | ||
rob = true | ||
for i = 1, #xPlayers do | ||
local xPlayer = xPlayers[i] | ||
TriggerClientEvent("esx:showNotification", xPlayer.source, _U("rob_in_prog", store.nameOfStore)) | ||
TriggerClientEvent("esx_holdup:setBlip", xPlayer.source, Stores[currentStore].position) | ||
local _ = xPlayers[i] | ||
TriggerClientEvent("esx:showNotification", xPlayer.source, TranslateCap("rob_in_prog", store.nameOfStore)) | ||
TriggerClientEvent("bpt_holdup:setBlip", xPlayer.source, Stores[currentStore].position) | ||
end | ||
TriggerClientEvent("esx:showNotification", source, _U("started_to_rob", store.nameOfStore)) | ||
TriggerClientEvent("esx:showNotification", source, _U("alarm_triggered")) | ||
TriggerClientEvent("esx_holdup:currentlyRobbing", source, currentStore) | ||
TriggerClientEvent("esx_holdup:startTimer", source) | ||
TriggerClientEvent("esx:showNotification", source, TranslateCap("started_to_rob", store.nameOfStore)) | ||
TriggerClientEvent("esx:showNotification", source, TranslateCap("alarm_triggered")) | ||
TriggerClientEvent("bpt_holdup:currentlyRobbing", source, currentStore) | ||
TriggerClientEvent("bpt_holdup:startTimer", source) | ||
Stores[currentStore].lastRobbed = os.time() | ||
robbers[source] = ESX.SetTimeout(store.secondsRemaining * 1000, function() | ||
rob = false | ||
if xPlayer then | ||
TriggerClientEvent("esx_holdup:robberyComplete", source, store.reward) | ||
TriggerClientEvent("bpt_holdup:robberyComplete", source, store.reward) | ||
if Config.GiveBlackMoney then | ||
xPlayer.addAccountMoney("black_money", store.reward, "Robbery") | ||
else | ||
xPlayer.addMoney(store.reward, "Robbery") | ||
end | ||
local xPlayers = ESX.GetExtendedPlayers("job", "police") | ||
local _ = ESX.GetExtendedPlayers("job", "police") | ||
for i = 1, #xPlayers do | ||
local xPlayer = xPlayers[i] | ||
TriggerClientEvent("esx:showNotification", xPlayer.source, _U("robbery_complete_at", store.nameOfStore)) | ||
TriggerClientEvent("esx_holdup:killBlip", xPlayer.source) | ||
local _ = xPlayers[i] | ||
TriggerClientEvent("esx:showNotification", xPlayer.source, TranslateCap("robbery_complete_at", store.nameOfStore)) | ||
TriggerClientEvent("bpt_holdup:killBlip", xPlayer.source) | ||
end | ||
end | ||
end) | ||
else | ||
TriggerClientEvent("esx:showNotification", source, _U("min_police", Config.PoliceNumberRequired)) | ||
TriggerClientEvent("esx:showNotification", source, TranslateCap("min_police", Config.PoliceNumberRequired)) | ||
end | ||
else | ||
TriggerClientEvent("esx:showNotification", source, _U("robbery_already")) | ||
TriggerClientEvent("esx:showNotification", source, TranslateCap("robbery_already")) | ||
end | ||
end | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
server-data/resources/[bpt_addons]/bpt_mechanicjob/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h1 align='center'>bpt_mechanicjob</a></h1> | ||
<p align='center'><a href='https://discord.gg/ksGfNvDEfq'>Discord</a> | ||
|
||
Copyright (C) 2022-2024 bitpredator | ||
|
||
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. | ||
|
||
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. | ||
|
||
ATTENTION: | ||
You are not authorized to change the name of the resource and the resources within it. | ||
|
||
If you want to contribute you can open a pull request. | ||
|
||
You are not authorized to sell this software (this is free project). | ||
|
||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. |
Oops, something went wrong.