Skip to main content
CryptoDeprecated

Installation

Install the legacy crypto resource, compile its TypeScript files and connect its banking functions.

Required dependencies​

MySQL

Database storage used by the crypto resource.

Node.js

Required for npm dependencies and TypeScript compilation.

Installation steps​

  1. 01

    Extract the resource

    Copy the extracted folder into your server resources directory.

  2. 02

    Install dependencies

    Open a terminal in the source directory and install the npm packages.

    npm install
  3. 03

    Configure the source

    Open the source-files directory in your editor and update the required settings.

  4. 04

    Compile the resource

    Build the TypeScript files before starting the resource.

    dev/compile.bat
warning

If you have not compiled your code the resource will not start!

Important file locations​

Configuration
source-files/src/shared/editable-config.ts

Shared TypeScript resource settings.

Shared locales
source-files/src/shared/translations.ts

Server- and client-side translations.

NUI locales
html/js/translations.js

Browser interface translations.

Compiling​

The dev folder inside the base resource contains three batch files:

Install dependencies
dev/installdeps.bat

Run once to install the required dependencies and create the node_modules folder.

Compile
dev/compile.bat

Build the TypeScript files.

Development
dev/developer.bat

Watch the TypeScript files and rebuild them automatically when they change.

Setting up the config​

Configuration

Banking functions

Connect the resource to your framework's bank and notification functions.

exports('avcrypto_getBank', function(source)
return 66666
end)
exports('avcrypto_setBank', function(source, amount)
print(string.format('%s setBank function is missing.', amount))
end)
exports('avcrypto_notification', function(source, message)
print(message)
end)