[Release][Paid] Scratchcard

scratchcard-banner

Scratchcard for FiveM :turtle:


Features

  • Fully Configurable (Currency, Symbols, Cash Prizes, etc)
  • Works with ESX (Can be very easily ported to other frameworks)
  • Open Source (You can edit the code!)

Video


Purchase Link


Support

  • If you have any questions/enquires leave them down below :slight_smile:
10 Likes

interesting! nice work

1 Like

it this an item you can add to stores?

5 Likes

Yes :slight_smile:

1 Like

Nice script but is there a way to fix this error?

1 Like

Hi, Have you tried to make changes to the app.js?

No there are no changes on the app.js

2 Likes

I was unable to replicate this error, could you explain to me what was done to make this error happen.

Also did you change your resources name?

Im using it with ESX framework enabled and didnt change the resource name. When using a lot of scratchcards (10-30 times) this error will show up. But it still works like it should. To find the error i converted the app.js in JavaScript beautifier. The Error is in line 204

            5061: (e, t, n) => {
                "use strict";
                var r = n(481);
                e.exports = function(e, t, n, o, a) {
                    var i = new Error(e);
                    return r(i, t, n, o, a)
                }
            },

*edit Did you put a IP Lock / auth system on this script? If yes that could be the problem.

1 Like

Error has been fixed :slight_smile:

1 Like

Can you edit the chance to win?

2 Likes

Yes. You can add/remove icons, which increases/decreases the chances of winning.

recently baught your script the code is wrong on it you have it to remove card if you use item but the command to use is /card so its not triggering the event to remove

1 Like

Hi, /card was just for testing and is removed prior to release. There are events in place if using ESX to remove the item when used.

but it doesnt close your inventory when you use it ?

1 Like

This would be down to your inventory and not the scratch card.

im using the standard esx script ive looked in to the code theres not one line to close inventory

@MacaroniandBeans add this into your client file:

function closeInventory()
    isInInventory = false
    SendNUIMessage(
        {
            action = "hide"
        }
    )
    --SetNuiFocus(false, false)
end

RegisterNetEvent("esx_inventoryhud:closeInventory")
AddEventHandler(
    "esx_inventoryhud:closeInventory",
    function()
        closeInventory()
    end
)

And add this under:
currency = Config.CurrencySymbol
})

	TriggerEvent("esx_inventoryhud:closeInventory")

and make sure to edit SetNuiFocus to false like here:

RegisterNUICallback('close', function()
    SetNuiFocus(false, false)
end)

2 Likes

Does this work with a Command or a Item?

1 Like

An item, the command was just for testing.

1 Like