To edit it, open economy.sln
in Visual Studio.
To build it, run build.cmd
. To run it, run the following commands to make a symbolic link in your server data directory:
cd /d [PATH TO THIS RESOURCE]
mklink /d X:\cfx-server-data\resources\[local]\economy dist
Afterwards, you can use ensure economy
in your server.cfg or server console to start the resource.
Get Current Money on hand
// Easy and simple
int playerMoney = Exports["economy"].getHandMoney()
Remove Current Money on hand
// Easy and simple
int quantityToRemoveFromHand = 10;
Exports["economy"].removeHandMoney(quantityToRemoveFromHand)
Add Current Money on hand
// Easy and simple
int quantityToAddFromHand = 10;
Exports["economy"].AddHandMoney(quantityToAddFromHand)