📕->[ESX/ QBCore/ ND-Core] ScrapMan-Job⚙️(fixed version + last update)

Hi there, I am back again after some time with a fix
I recommend you to read well before download the script!

A long time ago I posted my job with a big fail → 📕->[ESX] ScrapMan-Job⚙️
I wasn’t ready to share my script like i thought, I also felt so bad and wanted to fix everything and share it once again but unfortunately i didn’t have enough time.

After a while of thinking and fixing i want to share it again with the community.
All the information about the script is explained in the download.

About the script: this is a scrapman job that enables to search scraps in the scrap area or in any area that you want to set , players search for the scraps and when a scrap is found it spawns an object on the player hands and then they have to sell the scrap they have.
After selling players get money for the scrap and they can keep searching and sell over and over again!

Script dependencies: [Release] pNotify - In-game JS Notifications Using NOTY
pNotify is needed because of the notifications, of course you can change to your own notifications if you want.

Script preview: https://www.youtube.com/watch?v=IwyuYvpQi-4

Some pictures:





Script download: GitHub - ArielZ123/Scrapman-job: OverTrue RolePlay scrapman-job

Big thanks to the photographer & tester: @Reem22 .
Also big thanks to @DRIPZYZX for helping me testing the script.

To sum up: I am very happy to share it again and hope you will use the script and let me know if you have problems down below, thank you all!

Coming soon: script optimize thank to @Tuna_Terps.

Fix for the last error: [ script:scrapman-job] SCRIPT ERROR: @scrapman-job/main/sv_scrapman.lua:35: attempt to compare number with nil

thank to @undergroundofficial :+1: for letting me know about the script error.

Update: script is now updated without any problems also made some script optimization.

Note: the script supports only esx for now without qbcore.

-------- Update - > 16/7/2022 → QBCore Support --------
Hello :smile: I have for you a QBCore version.
Here you can get an explanation about the item add if you don’t know: [Tutorial] QBCore - How to add items correctly
Thank you friend: @Yorzen.
Download: GitHub - ArielZ123/Scrapman-job-QBCore
:closed_book:Note: If you have any problems feel free to share it with me, have a good day :kissing_smiling_eyes:.
-------- Update - > 26/11/2022 --------
Added script optimization.

-------- Update - > 20/1/2023 --------
Coming soon - esx legacy support.

-------- Update - > 21/1/2023 --------
Welcome legacy version :wave:.
here is what you need to do if you use this version:
Config.Lua - > will give you the option to switch between the old esx to the new one (esx legacy).
If you are using the esx legacy version please set the config to false and do the following thing:
Go to → fxmanifest.lua - > then go to → shared_scripts and then add this line → ‘@es_extended/imports.lua’ under → ‘main/config.lua’.

-------- Update - > 8/3/2024 --------
Welcome ND-Core :wave:.
Thank you @Andyyy7666 for your beautiful core, it was nice to learn about it:).
All the information about this version is explained in the readme file, if you have problems let me know.

Showcase: https://www.youtube.com/watch?v=DoKo0nQVNjE
Download: GitHub - ArielZ123/ScrapMan-Job-ND-Core: OverTrue RolePlay scrapman-job for ND-Core

[:red_circle:]Latest scripts:

42 Likes

love it, thank you to share it!

2 Likes

NP, enjoy it.

3 Likes

Amazing! Great Developer!

Dude! LOOKS so nice ! Thanks for the share!

1 Like

No problem have fun enjoy it!!!

I remember this script :slight_smile: Glad to see you revised it;

I went ahead and forked it and will be submitting a few pull requests :heart:

(Specifically i went ahead and added a toggle for esx/qbcore)

  • item check/add/remove
  • money add/remove
  • notifications

Thank you I appreciate that a lot! :heart_eyes:

Nice!

Very nice!

[ script:scrapman-job] SCRIPT ERROR: @scrapman-job/main/sv_scrapman.lua:35: attempt to compare number with nil
[ script:scrapman-job] SCRIPT ERROR: @scrapman-job/main/sv_scrapman.lua:35: attempt to compare number with nil
[ script:scrapman-job] SCRIPT ERROR: @scrapman-job/main/sv_scrapman.lua:35: attempt to compare number with nil
[ script:scrapman-job] SCRIPT ERROR: @scrapman-job/main/sv_scrapman.lua:35: attempt to compare number with nil

i use esx v1.2 final

1 Like

Did u download the new update?

yes… i already download new

OK give me a moment to fix this.

okey sir… i wait

replace the lines 22 - 64 in the server side please to this it will fix that…
but when i will update the script you will have to download him again from here.

RegisterServerEvent('scrapjob:scrap:sell')
AddEventHandler('scrapjob:scrap:sell', function()
   local _source = source
   local xPlayer = ESX.GetPlayerFromId(source)
   local scrapQuantity = xPlayer.getInventoryItem('scrap').count
   local addmoney = math.random(20, 50) -- change here the price of the scrap sell
   if scrapQuantity >= 1 then
       xPlayer.removeInventoryItem('scrap', 1)
       xPlayer.addMoney(addmoney)
       TriggerClientEvent("pNotify:SendNotification", source, {
          text = "you sold a scrap type for <b style=color:#1588d4>"  .. addmoney .. " <b style=color:#d1d1d1> keep working</b>",
          type = "success",
          queue = "lmao",
          timeout = 7000,
          layout = "Centerleft"
       })
   elseif scrapQuantity then
      	TriggerClientEvent("pNotify:SendNotification", source, {
          text = "you dont have any scrap type",
          type = "success",
          queue = "lmao",
          timeout = 7000,
          layout = "Centerleft"
        })
   end
end)

okey sir thank you so much… i try back

This should help for now…
i am working for a fix to the other problem as i posted i got some update from another person and there are some problems due to this update i am on it!

1 Like

You can download the script again, I updated the server side and as soon as possible will make some script optimization.
GOOD DAY!

1 Like

it work… i already replace