Core plugin for creating economic relations between players on cs2 servers
Install
Install https://github.com/roflmuffin/CounterStrikeSharp
Download Economy.zip
Move the Economy folder to addons\counterstrikesharp\plugins\
Done
Usage
On its own, the plugin is nothing of the sort. It does not provide any interface for the player and administration, it is created for developers.
Features
Currency Give, Take, Transfer
Items
Creation, Purchase, Use, Transfer
Events:
Purchasing, Using, Transfer
Created, Destroyed
Attributes
Hook Events (Modules can modify events that are sent by the Economy plugin)
CacheManager
SQLite/MySQL
Config (You can change the max amount, but it doesn't make sense yet xD. Mainly serves to switch debugging)
ModuleAPI (system so that the modules can communicate with each other. For example, if a store module allows you to create a category, another module will be able to use the function to create its own category.)
etc..
API
Best of all, this plugin is built so that its functionality is modules. A module is a plugin from another developer that uses EconomyAPI to create its own economic relationship between players.
Create CSS plugin
Add EconomyAPI.dll your project.
Use Economy.EconomyAPI
As you notice, this is an asynchronous method, which means that the server will not hang if the kernel is not there, and at the same time will not allow an error to be generated because the API functionality will not work.public override async void Load(bool hotReload)
{
await EconomyAPI.RegisterModule(this);
}
Events
since version 0.2-alpha events have been rewritten to attributes
Method Signatures:
ProductPurchasing(iUserId, GuidProductId)
ProductPurchased(iUserId, GuidProductId)[EconomyEvent(EventId = EconomyEvents.ProductPurchasing]
public static EventResult OnProductPurchasing(int userId, Guid productId)
{
return EventResult.Continue;
}
https://github.com/gerod220/Economy/arc ... s/main.zip[EconomyEvent(EventId = EconomyEvents.ProductPurchased]
public static void OnProductPurchased(int userId, Guid productId)
{
}

